Compare commits

..

794 Commits

Author SHA1 Message Date
Matthias Clasen
a3eccdd272 Document caret CSS properties 2016-01-07 23:56:03 -05:00
Matthias Clasen
2a23b13630 Deprecate cursor-color style properties
These have been replaced by CSS properties.
2016-01-07 23:47:08 -05:00
Matthias Clasen
97bfc84649 Use the caret-color properties for drawing carets
Replace the cursor-color and secondary-cursor-color style
properties with the caret-color and -gtk-secondary-caret-color
CSS properties.

For the 'auto' value of these properties, we keep the same
behavior that we used to have when the style properties are
not explicitly set.
2016-01-07 23:47:08 -05:00
Matthias Clasen
8335b89b37 Add the caret-color CSS property
This property is defined in http://www.w3.org/TR/css3-ui/#caret-color.
We also add a -gtk-secondary-caret-color property, since GTK+ has
supported differently colored split cursors in the past. Unlike
CSS, we don't support the weakly defined auto keyword, and just
use currentColor as the initial value.
2016-01-07 23:47:07 -05:00
Ben Gamari
fa66b271f8 gdkwindow-x11: Ensure that extended update counter is freed
I believe this lead to rampant leakage of SyncCounters by
gnome-terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=760188
2016-01-07 21:13:42 -05:00
Matthias Clasen
a45b1d1e3c inspector: Sort themes in the various theme combos
It is nicer if the themes show up in a predictable order,
so sort them alphabetically.
2016-01-07 19:56:05 -05:00
Matthias Clasen
ec02f055ed inspector: Add HighContrastInverse to list of themes 2016-01-07 19:56:05 -05:00
Matthias Clasen
0e473a5f1c Rename HighContrast-dark to HighContrastInverse
For accessibility purposes, it is better to have this as a
separate theme than as a dark variant of the HighContrast theme.
2016-01-07 19:56:05 -05:00
Lapo Calamandrei
4925493e49 Adwaita: rounded corners on iconview selection 2016-01-08 01:39:16 +01:00
Lapo Calamandrei
c0275b508d Adwaita: fix calendar invisible selection 2016-01-08 01:39:16 +01:00
Matthias Clasen
5b3001b6d5 colorswatch: Fix the overlay
I misunderstood what the overlay is good for: We need to allocate
it the full size of the widget. since we are using it to render
a background gradient *over* the application-rendered color.

At the same time, save some 100 lines of code by using an icon
helper as gadget, instead of handling the icon manually.
2016-01-07 19:20:55 -05:00
Matthias Clasen
1b3bb244b6 color swatch: Fix up rendering
gtk_render_content_path is expecting the full box dimensions,
not just the content area. So, add the border before calling it.

Note it is still possible to have some separation between the
color and the border, by setting padding.
2016-01-07 18:38:31 -05:00
Daiki Ueno
f9e6ccd592 gtkbuilder: Install gettext ITS files
Recent gettext has a feature to allow consumer projects to supply their
own string extraction rules for XML files, in ITS format.

Gettext still ships the rule for *.ui, but it would be better
maintained in the upstream project.

https://bugzilla.gnome.org/show_bug.cgi?id=760202
2016-01-07 18:08:30 -05:00
Daniel Mustieles
b1f6925727 Updated Spanish translation 2016-01-07 23:15:11 +01:00
Daniel Mustieles
c9ee47333f Updated Spanish translation 2016-01-07 23:14:58 +01:00
Matthias Clasen
9e63e61b16 Implement transitions for radial gradients
This was missing in the initial implementation.
2016-01-07 16:30:19 -05:00
Matthias Clasen
a7e2a9d8d3 Don't interpolate between keywords
Transitioning between linear gradients like
linear-gradient(to top, yellow, green) and
linear-gradient(to left, yellow, green) was yielding
nonsensical results, with the gradient line jumping around
wildly. Fix this by falling back to stupid image interpolation
for these cases.
2016-01-07 16:13:26 -05:00
Kjartan Maraas
cd6ca291bd Updated Norwegian bokmål translation. 2016-01-07 21:54:51 +01:00
Timm Bäder
ca6d01a678 GtkCssGadget: Set valid clip values for invisible gadgets 2016-01-07 20:39:37 +01:00
Matthias Clasen
8ecba89991 color swatch: Remove a stray frame
When using a gadget, the border is free, no need to call
gtk_render_frame ourselves.
2016-01-07 14:08:26 -05:00
Timm Bäder
0b96b8a1ee GtkModelButton: Remove some margins
Now that we can use margins from css for this, remove the margins we set
in code and use css instead.
2016-01-07 19:37:18 +01:00
Timm Bäder
2f61bc1866 GtkModelButton: Remove always-zero variable 2016-01-07 19:37:18 +01:00
Eric Williams
bbfec07e06 Clarified the function docs for gtk_css_provider_load_from_data().
https://bugzilla.gnome.org/show_bug.cgi?id=760238
2016-01-06 22:42:37 -05:00
Matthias Clasen
10cc35405e wayland: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 14:57:42 -05:00
Matthias Clasen
d9befb9086 x11: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 14:57:42 -05:00
Matthias Clasen
b6e11d087c Add context-menu to the list of standard cursor names
Adwaita doesn't have this one, but we are falling to the
default cursor anyway.
2016-01-06 14:57:42 -05:00
Matthias Clasen
d76fb63ba8 Add a test for ltr vs rtl boxes.
This tests that horizontal boxes flip their child nodes
according to text direction to maintain the left-to-right
ordering of child nodes for both text directions.
2016-01-06 14:57:42 -05:00
Matthias Clasen
a519a1a928 CSS node tests: Add a way to test rtl vs ltr
CSS nodes have a linear sibling relationship; this is supposed
to correspond to left-to-right placement in horizontal arrangements.
This commit explicitly sets the text direction to rtl if the
filename ends in .rtl.ui, so we can test differences in node
tree layout between text directions.
2016-01-06 14:57:42 -05:00
Timm Bäder
47afccb41b GtkListBox: Optimize _get_row_at_y a bit
Use g_sequence_lookup for a binary search over the rows.
2016-01-06 16:02:59 +01:00
Timm Bäder
a9d5fa4cfe GtkListBox: get_row_at_y can return NULL 2016-01-06 16:02:58 +01:00
Rico Tzschichholz
83fc4d591a HighContrast: Fix make dist 2016-01-06 15:21:22 +01:00
Felipe Borges
98080e0289 printing: always propagate Collate value
https://bugzilla.gnome.org/show_bug.cgi?id=728344
2016-01-06 14:50:49 +01:00
Chun-wei Fan
1fec39ef0b Visual Studio builds: Use _USE_MATH_DEFINES
... to fix the build as some C99 math constant macros are being used, such
as M_SQRT2.
2016-01-06 21:12:19 +08:00
Wonchul Lee
215c28df28 docs: cleanup duplication of words
https://bugzilla.gnome.org/show_bug.cgi?id=760148
2016-01-06 09:02:14 +01:00
Matthias Clasen
f32362e82c HighContrast: Improve search bar appearance
Follow the generally white background we use everywhere else.
This is not perfect, we get double borders when the search bar
is shown, as can be seen in gtk3-widget-factory.
2016-01-05 22:33:20 -05:00
Matthias Clasen
aa9095ff72 HighContrast: Fix up action bar styling
Since HighContrast is not using different background colors
as much as Adwaita, we need to add borders to prevent things
from running into each other.
2016-01-05 22:22:47 -05:00
Matthias Clasen
643454147c HighContrast: Drop deprecated style properties 2016-01-05 20:39:16 -05:00
Matthias Clasen
56ca40996d HighContrast: Add a dark variant
This is just a quick experiment, and so I have another theme with
a dark variant to play with.
2016-01-05 19:25:06 -05:00
Matthias Clasen
474d6bec85 HighContrast: Add a missing unit 2016-01-05 16:54:40 -05:00
Matthias Clasen
907fade7d0 HighContrast: Fix sidebar borders 2016-01-05 16:53:03 -05:00
Matthias Clasen
39b76ec082 HighContrast: Fix checkboxes in selected context
Set a proper color so checks and radios don't disappear on the
black selection background.
2016-01-05 14:37:22 -05:00
Matthias Clasen
9ebb63c71f HighConstast: Some fixes for treeview headers 2016-01-05 14:19:58 -05:00
Matthias Clasen
d60fe93937 HighContrast: Keep spinbuttons from resizing on hover 2016-01-05 13:42:57 -05:00
Matthias Clasen
37ab99d1d2 HighContrast: Fix checks and radios 2016-01-05 13:42:57 -05:00
Matthias Clasen
c25b8e25f5 HighContrast: Some menu fixes 2016-01-05 13:42:57 -05:00
Matthias Clasen
fd57a552cf HighContrast: paned fixes
Mostly copied from Adwaita.
2016-01-05 13:42:57 -05:00
Cosimo Cecchi
0f3f2e7f9c HighContrast: more combobox fixes
Taken from Adwaita.
2016-01-05 10:01:54 -08:00
Paolo Borelli
c4996873dc docs: try to clarify widget_get_state_flags vs context_get_state 2016-01-05 18:46:56 +01:00
Matthias Clasen
4a9c6777a7 HighContrast: Some combobox fixes
Mostly copied from Adwaita.
2016-01-04 23:52:28 -05:00
Matthias Clasen
d17f89f6bf HighContrast: Fix frame styling 2016-01-04 23:45:13 -05:00
Matthias Clasen
a11c30d0df HighContrast: fix up color chooser theming
Mostly copied from Adwaita.
2016-01-04 23:28:32 -05:00
Matthias Clasen
32177aa03b HighContrast: Fix up stackswitcher
Copy Some of the more recent additions from Adwaita.
2016-01-04 22:08:53 -05:00
Matthias Clasen
c110ffcb1a HighContrast: No blue spinners
Spinners are drawing backgrounds now, so setting a blue
background color is pretty distracting.
2016-01-04 21:35:55 -05:00
Matthias Clasen
f63e8edec6 Make sure icons update on theme change
Gadgets don't connect to style-changed for widget nodes, and
GtkImage uses its widget node for the icon helper. The visible
effect of this is that symbolic icons don't change color when
switching to the dark variant of Adwaita.

Fix this by manually invalidating the icon helper.
2016-01-04 21:32:19 -05:00
Matthias Clasen
b387a966ce widget-factory: Make the notebook action truly circular
The sidebar-button class doesn't work out so well for this
since it has horizontal padding.
2016-01-04 21:32:19 -05:00
Cosimo Cecchi
637ade656a levelbar: loop over all block gadgets to determine min size
Instead of just picking the first. This is because the theme might set a
border on only one of them, like the HighContrast theme does.
2016-01-04 18:14:33 -08:00
Cosimo Cecchi
183bcb41ec levelbar: fix parameter confusion
We're always interested in the minimum size.
2016-01-04 17:56:50 -08:00
Cosimo Cecchi
beeefa1629 HighContrast: update to use -gtk-outline-radius 2016-01-04 17:50:24 -08:00
Cosimo Cecchi
bc66c0c31e HighContrast: update to use :hover 2016-01-04 17:49:41 -08:00
Cosimo Cecchi
2780865534 HighContrast: update to use :indeterminate 2016-01-04 17:48:59 -08:00
Cosimo Cecchi
b2b1b0e238 HighContrast: update to use :disabled 2016-01-04 17:46:43 -08:00
Matthias Clasen
bc020fdeb7 tests: Rework the way foreigndrawing works
Instead of the weird PathElt struct, generate a quick-n-dirty parser
that parses CSS selectors into GtkWidgetPath elements.

Based on a patch by Benjamin Otte.
2016-01-04 15:39:48 -05:00
Matthias Clasen
c543712551 Document radial gradient syntax 2016-01-04 13:59:48 -05:00
Matthias Clasen
d9a70bc56a Add a CSS style test for gradients
This mainly just tests that gradients are properly
reproduced by gtk_style_context_to_string.
2016-01-04 13:59:48 -05:00
Matthias Clasen
fcea12f790 Add some tests for radial gradient parsing
These are the examples from the CSS spec.
2016-01-04 13:59:24 -05:00
Matthias Clasen
f727ee5687 Implement CSS radial gradients
Implement parsing and drawing of radial gradients according to
http://www.w3.org/TR/css3-images/#radial-gradients.

Transitions are not implemented yet.
2016-01-04 13:59:24 -05:00
Christoph Reiter
f66191346c Mention GtkIconSize in all docs where the argument/return is annotated as taking an int instead of GtkIconSize
In https://bugzilla.gnome.org/show_bug.cgi?id=601425 the annotations
were changed to int as they not only take the predefined enum values
but also user defined values registered through gtk_icon_size_register()

As a result the typelib doesn't contain any information about
GtkIconSize for those arguments and the Python docstring only
shows the corresponding Python type "int".

This changes the argument docs to mention the type explicitly
so the Python doc generator can add a link to Gtk.IconSize
which contains the most useful predefined values.

https://bugzilla.gnome.org/show_bug.cgi?id=757411
2016-01-04 11:56:44 +01:00
Marek Černocký
10f71dd98c Updated Czech translation 2016-01-04 11:52:10 +01:00
Marek Černocký
77d9248e2a Updated Czech translation 2016-01-04 11:51:20 +01:00
Rico Tzschichholz
e213ec9e36 docs/gtk: Include css.xml 2016-01-04 10:16:45 +01:00
Rico Tzschichholz
2e0a3ec57a docs/gtk: Sort content_files/expand_content_files alphabetically 2016-01-04 09:53:24 +01:00
Piotr Drąg
d29bfb3c7d Updated POTFILES.skip 2016-01-04 08:27:02 +01:00
Chun-wei Fan
aa352168c9 config.h.win32.in: Update for _lock_file()
The Visual Studio versions that we support supports locking functions in
their CRT, so support that to optimize things a bit.  Also update the
config.h.win32.in so that its entries are more in line with the ones in
the autootols builds, and make sure that we use UNIX line endings.
2016-01-04 15:09:14 +08:00
Cosimo Cecchi
a009a50239 cssstyle: fix a compiler warning 2016-01-03 17:20:06 -08:00
Matthias Clasen
d8e1fd6079 Update expected output
The previous commit changed the format of the output
generated by the CSS style tests.
2016-01-03 17:23:59 -05:00
Matthias Clasen
cfa0884165 Improve formatting of CSS style prints
Add a newline after CSS properties, so things don't run into
each other.
2016-01-03 17:05:16 -05:00
Matthias Clasen
12be432df7 Skip GdkX11DeviceManagerCore in default value tests
We already skip the XI2 implementation, and the core
one needs the same treatment.
2016-01-03 16:14:43 -05:00
Matthias Clasen
e1634d18de Update expected output for CSS style tests
The format for CSS values changed slightly in one of the
previous commits.
2016-01-03 15:41:09 -05:00
Matthias Clasen
3c26aef826 Use a custom theme for CSS style tests
Use a custom, empty theme and stop importing reset-to-defaults.css.
This avoids overwriting initial values, so our initial value
filtering works better.
2016-01-03 15:39:55 -05:00
Matthias Clasen
2e921691d9 Redo CSS style printing
Drop the custom style printing implementation in gtkcssnode.c and
instead reuse the existing gtk_css_style_print function, extending
it a bit to suit our needs.

Instead of computing values, just recognize initial values by
having no CSS section. Also do away with the show-initial flag, and
just always filter out initial values. The flag can come back when
it is needed.
2016-01-03 15:36:48 -05:00
Matthias Clasen
d0e648d4f6 Update expected output for node and style tests
The previous commit changed the format of the output.
2016-01-03 14:41:43 -05:00
Matthias Clasen
0c52eca34c Move node printing to GtkCssNodeDeclaration
The node declaration has all the information we are printing
here (except for visibility). At the same time, redo the format
to print the information in selector format, and indicate
(in)visibility by enclosing the selector in square brackets.
2016-01-03 14:41:43 -05:00
Cosimo Cecchi
28e185dd1b tests: fix Makefile.am syntax
It requires a tab character, or the build will fail.
2016-01-03 11:33:19 -08:00
Cosimo Cecchi
dcaffe369f cssnode: fix a compiler warning 2016-01-03 11:25:45 -08:00
Matthias Clasen
489928cbb4 Fix the build 2016-01-03 12:05:57 -05:00
Matthias Clasen
f7a93c015c Forgotten file
I forgot to add this file to source control when the new tests
were initially added.
2016-01-03 12:02:11 -05:00
Felix Riemann
daa08862ff shortcuts: Separate gestures in search results
Gestures where shown separately from other shortcuts in the search
results before. This restores that behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=760097
2016-01-03 17:07:23 +01:00
Felix Riemann
bd4b3091f6 shortcuts: Show icons and subtitles for gestures in search results
https://bugzilla.gnome.org/show_bug.cgi?id=760097
2016-01-03 17:07:23 +01:00
Matthias Clasen
2dd8d1ad53 Update expected results of a11y tests
All of these now have a harmless extra "panel".
2016-01-03 10:56:11 -05:00
Matthias Clasen
1aeaa33e68 lockbutton: Fix up the template
I forgot to clean this up when switching to a stack.
2016-01-03 10:42:13 -05:00
Matthias Clasen
7a01741575 Skip GdkX11DeviceManagerCore in notify tests
We already skip the XI2 implementation, and the core
one needs to the same treatment.
2016-01-03 10:34:40 -05:00
Matthias Clasen
9c39232ab3 assistant: Drop unnecessary frame
We can just style the sidebar box itself, no need for an
extra frame widget.
2016-01-03 10:33:54 -05:00
Matthias Clasen
adfb76dc7e lockbutton: Use a stack
The previous way of manually juggling the visibility of the
labels doesn't work anymore, now that gadgets of invisible
widgets don't allocate space anymore.
2016-01-03 09:55:30 -05:00
Matthias Clasen
ed5ebc0711 Add a css style test for currentColor 2016-01-03 09:19:31 -05:00
Matthias Clasen
33be60b0ab Add a css style test for inherit and initial 2016-01-03 09:19:31 -05:00
Matthias Clasen
1ec34ae085 Add a css style test for :first/last/only-child 2016-01-03 09:19:31 -05:00
Matthias Clasen
82a571e0ca Add a css style test for font inheritance 2016-01-03 09:19:31 -05:00
Matthias Clasen
905ab53c71 Add a test framework for CSS styles
This uses the same function for dumping CSS nodes and styles
as the CSS node test. It can be used to test aspects of inheritance
and matching, as well as initial values.

No actual tests yet.
2016-01-03 09:19:31 -05:00
Matthias Clasen
864693e5aa Add CSS node tests for levelbars 2016-01-03 09:19:31 -05:00
Matthias Clasen
0ce5075748 Add CSS node test for progressbars 2016-01-03 09:19:31 -05:00
Matthias Clasen
5c4efb09e2 Add a CSS node test for buttons 2016-01-03 09:19:31 -05:00
Matthias Clasen
78d715af22 Add a CSS node test for entries 2016-01-03 09:19:30 -05:00
Matthias Clasen
669ced3984 Add a CSS node test for notebooks 2016-01-03 09:19:30 -05:00
Matthias Clasen
d2c1203ef1 Add a test framework for CSS nodes
No actual tests yet.
2016-01-03 09:19:30 -05:00
Matthias Clasen
68edc47f6a Add a function to dump CSS nodes and styles
Add a gtk_style_context_to_string function that can serialize
a CSS node or tree of nodes, optionally including CSS properties
as well.

This will be useful in writing tests.
2016-01-03 09:19:30 -05:00
Cosimo Cecchi
a6624d803e infobar: remove unneeded gadget
It turns out we don't really need to use a separate gadget for the
infobar, if all we do is chaining up to the parent GtkBox which already
uses a gadget.
Just remove all the boilerplate.
2016-01-03 01:02:12 -08:00
Cosimo Cecchi
ef8a5fc542 window: remove unused variables 2016-01-03 00:54:16 -08:00
Cosimo Cecchi
424898e071 levelbar: consolidate code into single function 2016-01-03 00:45:43 -08:00
Cosimo Cecchi
a6e7e72d53 levelbar: port to use gadgets
We now use one gadget for the trough, and one for each block.
2016-01-03 00:45:43 -08:00
Cosimo Cecchi
971f1a9b31 levelbar: split out a function 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
feb741babf infobar: port to use a gadget 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
f246dc1c85 infobar: trivial code cleanups 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
d8b6dbd888 menubar: prefer early return 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
700286c6d8 menubar: port to use a gadget 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
96f10c0b72 menubar: use gtk_container_class_handle_border_width() 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
4328a3a24b HighContrast: remove unused selector
There's no header-bar-separator style class.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
a9d07b6ec6 Adwaita: remove unused selector
There's no header-bar-separator style class.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
28911c595b HighContrast: update for separators deprecations
HighContrast still has a long way to go, but let's get at least
separators working again.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
7dacc7836f HighContrast: reparse theme
For some reason, this got accidentally changed in a previous commit.
This is just the output of running parse-sass.sh again.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
39beebd2cb win32: remove ineffective selector
That style property is deprecated, but the combobox does not have a
separator anymore.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
908deb1bdc widget: deprecate separator style properties
They're not used in GTK anymore. Also remove them from the default
theme.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
64a06adfc0 treeview: don't use wide-separators/separator-height
Those style properties are on their way out; instead, use min-height
with the separator style class to obtain the height.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
2eb7e6a85a treeview: prefer positive polarity in if block 2016-01-03 00:42:51 -08:00
Cosimo Cecchi
1f690ddbfa separator: don't read wide-separators style property
The notion of a separator being wide or not does not make sense when a
theme can set any CSS property on it, and
separator-width/separator-height are on their way out for
min-width/min-height.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
0740f23c77 menuitem: don't read wide-separators or separator-height
Separators inside menus are working completely through CSS since
GtkMenuItem has been ported to use a gadget.
Remove this unused code from here.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
eff8865ab1 separatortoolitem: don't use custom sizing/rendering
Instead, just rely on the CSS gadget; we can stop using wide-separators,
separator-height and separator-width, and at the same time deprecate the
space-size style property of GtkToolbar.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
55e80f9379 separatortoolitem: trivial code cleanups 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
ea25985b67 toolbar: deprecate GtkToolbarSpaceStyle and space-style style property
This is completely unused already.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
48596090af toolbar: port to use a gadget 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
d64304997f toolbar: use gtk_container_handle_border_width() 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
10c222649e toolbar: trivial code cleanup 2016-01-03 00:41:32 -08:00
Felix Riemann
6df8bc2e1a GtkBindings: Fix CSS key in example docs
gtk-key-bindings was renamed to -gtk-key-bindings in d267b8e0.

https://bugzilla.gnome.org/show_bug.cgi?id=760082
2016-01-03 02:04:11 -05:00
Matthias Clasen
d83e9539c5 Fix stylecontext tests to work
Some of the tests don't work anymore because they test
features of saved style contexts that have changed, and some
now trigger deprecation warnings.
2016-01-03 01:25:07 -05:00
Matthias Clasen
6da57d61d5 Skip GdkX11DeviceManagerCore in finalize tets
We already skip the XI2 implementation, and the core
one needs to the same treatment.
2016-01-03 01:23:35 -05:00
Christoph Reiter
6d77b9f316 gtkwindow: fix first allocation size
67ab00e01e removed the fake configure code in gtk_window_show() and
replaced it with a simple gtk_widget_realize(). The initial allocation
code in realize() only allocates the natural size or the last requested
size which now no longer is set, resulting in a too small first allocation.

This builds a configure request to compute the allocation size instead
which includes default size, CSD etc..

This problem could be seen in case of a GtkPaned in a GtkWindow with a
default size set and the pane position set as well. The first allocation
would be the natural size of the GtkPaned which would clamp the pane
position if too larg. Only the second allocation would fill the parent
window using the now wrong pane position.

https://bugzilla.gnome.org/show_bug.cgi?id=759705
2016-01-02 22:12:12 -05:00
Matthias Clasen
e93d64e4c3 Revert "Revert "window: Remove suspicious branch""
This reverts commit 2438a06d54.

See https://bugzilla.gnome.org/show_bug.cgi?id=759705
2016-01-02 22:12:12 -05:00
Cosimo Cecchi
6322b1f647 levelbar: fix a crash
We should not try to access a block with an index that exceeds the
number of blocks in the widget.
2016-01-02 18:44:07 -08:00
Matthias Clasen
8109520d4e separator toolitem: Respect ::draw property
This was lost when I converted the widget to use a gadget.

https://bugzilla.gnome.org/show_bug.cgi?id=760018
2016-01-02 20:55:37 -05:00
Cosimo Cecchi
0401146896 spinbutton: fix a typo 2016-01-02 15:31:23 -08:00
Cosimo Cecchi
664bbe12ba menuitem: move chaining up to draw inside gadget
This is more consistent with what other widgets do.
2016-01-02 15:31:21 -08:00
Marek Černocký
d3bf07594e Updated Czech translation 2016-01-02 21:13:40 +01:00
Timm Bäder
2b2a538629 testframe: Pass correct state to GtkStyleContext API 2016-01-02 15:52:20 +01:00
Timm Bäder
3758762119 GtkImage: Simplify _set_from_icon_name
We don't need to strdup icon_name since that will happen in
_gtk_icon_helper_set_icon_name anyway.
2016-01-02 15:46:45 +01:00
Andika Triwidada
9704f46b38 Updated Indonesian translation
(cherry picked from commit 45b3c553a9)
2016-01-02 12:27:26 +00:00
Andika Triwidada
0a1b746bf8 Updated Indonesian translation
(cherry picked from commit 1aa5f92784)
2016-01-02 12:22:44 +00:00
Rafael Fontenelle
420993af0e Updated Brazilian Portuguese translation
(cherry picked from commit e96c689aa1)
2016-01-02 06:48:37 +00:00
Christoph Reiter
558fb1ecdd gtkdnd-quartz: fix gtk_drag_begin_internal
gtk_drag_begin_internal was changed to take a GtkImageDefinition
instead of a GtkIconHelper. This adjusts the quartz variant
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=759607
2016-01-01 15:05:23 +01:00
Alberts Muktupāvels
a90926c7f0 gtkheaderbar: update window buttons also on realize
After bb34db6 _gtk_header_bar_update_window_buttons function is
called before application menu is set. This caused regression -
app menu button is initially hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2016-01-01 15:55:37 +02:00
Yosef Or Boczko
788de42ffa Updated Hebrew translation 2015-12-31 19:39:41 +02:00
Yosef Or Boczko
7c55841110 Updated Hebrew translation 2015-12-31 19:38:23 +02:00
Yosef Or Boczko
962ff554dc Updated Hebrew translation 2015-12-31 18:49:30 +02:00
Yosef Or Boczko
71c9e39127 Updated Hebrew translation 2015-12-31 18:47:57 +02:00
Руслан Ижбулатов
a8ae549ed0 Fix include path for gtkiconfactoryprivate.h 2015-12-30 21:57:29 +00:00
Руслан Ижбулатов
91bb91dbb9 Fix to compile for C libraries with no flockfile
Also use MS variant of flockfile, if available
(requires MSVCRT compatible with MSVCR90 or newer).
2015-12-30 21:57:29 +00:00
Cosimo Cecchi
f357ef5610 scrolledwindow: add missing deprecation flag 2015-12-30 10:44:12 -08:00
Cosimo Cecchi
354eb5678b menuitem: fix a crash when reserve_indicator is TRUE
In that case, code expects an arrow gadget to be present but we're not
creating it in every occurrence.
Fix it by ensuring there will be an arrow gadget when reserve_indicator
is TRUE.
2015-12-29 18:31:10 -08:00
Cosimo Cecchi
3740c7f092 toolitem: fix a copy/paste typo 2015-12-29 16:33:53 -08:00
Cosimo Cecchi
79c045ed80 scrolledwindow: port to use a gadget 2015-12-29 13:51:06 -08:00
Cosimo Cecchi
7c0f0e882a scrolledwindow: deprecate scrollbars-within-bevel style property
These days all the themes set it to TRUE, and it's not clear what
happens with overlay scrollbars...
2015-12-29 13:51:06 -08:00
Cosimo Cecchi
09835b4c39 viewport: don't render a background over the bin window
GtkViewport currently tries to draw a background over the bin window.
The feature is a bit broken at the moment, as it does not take into
account padding that might have been set on the GtkViewport, but in
general it does not seem very useful, and goes somewhat against the CSS
box model where every widget/gadget is responsible to draw its own
background. For a fix, we could either have the viewport gain a "bin"
gadget, or we could stop drawing the background.

As it isn't clear that there are any users of this feature, stop drawing
the background; a client can achieve the same effect by drawing the
background on the widget inside the viewport itself.
2015-12-29 13:50:19 -08:00
Cosimo Cecchi
5daede51f7 viewport: port to use a gadget
This will get us margin support, among other things, and simplifies the
code.
2015-12-29 13:50:19 -08:00
Cosimo Cecchi
71d7b10dad viewport: trivial code cleanup 2015-12-29 13:50:19 -08:00
Cosimo Cecchi
a37129fd60 viewport: use gtk_container_class_handle_border_width()
No need to do this manually.
2015-12-29 13:50:19 -08:00
Benjamin Otte
acbff85402 gadget: Handle visibility
As GtkCssNode has the visibility concept, it makes sense to mirror it in
gadgets.

Do what visibility does in widgets: Hidden gadgets can't be drawn or
allocated and request a 0x0 size.

Note that just like widgets, gadget visibility must not be changed in
size request, allocate or draw handlers.

GtkWidget::child-visible has no equivalent yet, code will have to
emulate that manually.
2015-12-29 13:48:58 -08:00
Matthias Clasen
9950764f12 Drop deprecated pango-utils api
Copy the few parsing functions we need.
2015-12-29 08:09:23 -05:00
Ben Iofel
1e1af62bee Raleigh: Don't use deprecated pseudo classes 2015-12-28 20:30:51 -08:00
Matthias Clasen
31e97b33e1 Set ID on css node right away
Previously, the ID was only set on the CSS node as a side-effect
of calling gtk_widget_get_style_context. This was showing up
in CSS style tests as nodes lacking their IDs.
2015-12-28 23:18:06 -05:00
Matthias Clasen
0042f9b414 Fix a comment 2015-12-28 22:37:33 -05:00
Matthias Clasen
e71f7d713e Add a transfer annotation
This was confusing me momentarily, so add an explicit annotation.
2015-12-28 22:37:22 -05:00
Mario Blättermann
9ae32adf3c Updated German translation 2015-12-28 21:16:11 +00:00
Matthias Clasen
ba1636be87 statusicon: Avoid criticals
The code handles the possibility of pixbuf being NULL, but
after b411c31832 we must be
prepared for surface already being NULL. Pointed out by
Albert Muktupāvels,

https://bugzilla.gnome.org/show_bug.cgi?id=759917
2015-12-28 10:27:08 -05:00
Matthias Clasen
e8ba058396 checkbutton: Update state initially
Without this, the check node starts out without the :dir(ltr)
state, at least.
2015-12-28 10:24:02 -05:00
Matthias Clasen
eb09bee492 css: Deprecate :sorted pseudo class
This was used with regions in GtkTreeView, and is not used
anymore, so deprecate it.
2015-12-27 18:37:19 -05:00
Matthias Clasen
2b27096fc3 Fix outline-radius css parser test
The outline-radius properties all got a -gtk prefix.
2015-12-27 17:32:45 -05:00
Matthias Clasen
ab182126df Fix the pseudo-classes-known css test
The test needs to be updated for the renamed :dnd pseudo class.
We also need to add a .errors file for the deprecation errors
that we are now producing.
2015-12-27 17:32:30 -05:00
Matthias Clasen
f3069d7e94 css: Redo the pseudo class deprecation warnings
Putting the deprecated class behind the official variant does
not work for the case of :focus and :focused - we were matching
:focus and leave a dangling 'ed'. So, put the deprecated classes
before the official variant, and explicitly mark them as deprecated.
2015-12-27 17:32:11 -05:00
Matthias Clasen
c4ca671a9e test-css-parser: Add a way to generate output
Use test-css-parser --generate foo.css to see the parser
output on stdout. This makes it more convenient to add new
css files to the testsuite.
2015-12-27 17:26:45 -05:00
Matthias Clasen
8bfbb2c103 Cosmetic change 2015-12-26 21:42:10 -05:00
Matthias Clasen
80a91722e5 inspector: Don't leak weak references
These come back to bite us when the inspector is no longer around
at the end of the program.

https://bugzilla.gnome.org/show_bug.cgi?id=759768
2015-12-26 21:42:10 -05:00
Matthias Clasen
787f600d33 inspector: Remove some dead code
Since commit bffeae6203, the
tree path is not used for anything useful anymore, so do away
with it entirely.
2015-12-26 21:42:10 -05:00
Matthias Clasen
f669ccca66 docs: Add missing value syntax for border-image 2015-12-26 21:42:10 -05:00
Руслан Ижбулатов
1f154f576a Fix a surface leak
Was introduced as part of b79a187d47.
Results in memory leaks (and GDI objects leaks on W32).
2015-12-27 02:02:19 +00:00
Carlos Soriano
5404e124b6 gtkframe: format fix 2015-12-26 20:52:53 +01:00
Carlos Soriano
79b6d48983 gtkframe: remove unused variable
And fix the compiler warning
2015-12-26 20:52:31 +01:00
Matthias Clasen
26d8688cb4 Redo the CSS docs
Split the CSS docs off from the GtkCssProvider docs and
give them their own chapter. Among other things, this commit
introduces more or less complete definitions of the syntax for
the supported selectors, a complete list of all supported
properties, and definitions for their values. This includes
documentation for GTK+-specific properties such as -gtk-icon-source.
2015-12-25 22:58:52 -05:00
Matthias Clasen
b3dbf3f41c Drop the :dnd syntax altogether
This was only introduced a few weeks ago. We don't need to keep
this around, now that we support the proper CSS syntax.
2015-12-25 22:58:28 -05:00
Matthias Clasen
39b4efb24e Adwaita: Don't use deprecated pseudo classes 2015-12-25 22:58:28 -05:00
Matthias Clasen
c998fae5ac Add deprecation warnings for pseudo states
Emit a deprecation error in the cases where we have
a CSS name for a custom pseudo class.
2015-12-25 22:58:28 -05:00
Matthias Clasen
158dbbc88f Use CSS syntax for drop highlighting
I hadn't noticed the :drop() pseudo state in the CSS4 Selectors
spec when I added this a while ago. This commit renames
GTK_STATE_FLAG_DND to GTK_STATE_FLAG_DROP_ACTIVE and adds
:drop(active) as equivalent to the :dnd pseudo state.
2015-12-25 22:58:28 -05:00
Matthias Clasen
b3c1454dcc Add docs for GtkCssSection 2015-12-25 22:58:28 -05:00
Carlos Garnacho
9290aa7c46 GdkSeat: Use g_intern_static_string() for signal names
https://bugzilla.gnome.org/show_bug.cgi?id=759857
2015-12-25 14:26:58 +01:00
Marek Černocký
9f06474bcc Updated Czech translation 2015-12-25 10:50:39 +01:00
Lapo Calamandrei
81da0b86f3 Adwaita: fix notebook close button 2015-12-24 00:02:12 +01:00
Lapo Calamandrei
157276b455 Adwaita: use min-height/width for entry and button sizing 2015-12-23 20:35:06 +01:00
Lapo Calamandrei
08f928a4ea Adwata: fix switch slider border clash 2015-12-23 18:57:04 +01:00
Florian Müllner
e20826fe03 label: Deny drag gesture when not selectable
We don't actually do anything when the label is not selectable
except for consuming the event, which breaks for instance titlebar
drags with labels that contain links. Simply deny the gesture in
that case to allow the event to bubble up normally.

https://bugzilla.gnome.org/show_bug.cgi?id=759798
2015-12-23 14:07:00 +01:00
Chun-wei Fan
c0bc0a9ac2 gtkcssnumbervalue.c: Include fallback-c89.c to fix build
... on older Visual Studio versions, where isinf() is not available, and
copy the isinf() implementation from gdk/fallback-c89.c to
gtk/fallback-c89.c.
2015-12-23 19:23:17 +08:00
Matthias Clasen
d0d8671c02 Forgotten files 2015-12-23 01:57:22 -05:00
Matthias Clasen
b6d287aab5 widget: Be safe against windows losing their frame clock
gdk_widget_get_frame_clock can return NULL. In particular,
this can happen when the drag window is destroyed at the end
of a DND operation. Handle this gracefully when it happens.
2015-12-22 23:57:06 -05:00
Alberts Muktupāvels
8ffa8b3a49 gtksettings: notify after property reset 2015-12-23 05:55:47 +02:00
Matthias Clasen
ef71eabfc5 Add parser tests for animation properties
This adds tests for animation-name, animation-duration,
animation-timing-function, animation-iteration-count,
animation-direction, animation-play-state, animation-delay
and animation-fill-mode.
2015-12-22 22:29:38 -05:00
Matthias Clasen
8f44383253 Add a parser tests for transition properties
This adds tests for transition-property, transition-delay
and transition-timing-function.
2015-12-22 22:29:38 -05:00
Matthias Clasen
2b6ab1b8bd Add parser tests for min-width and min-height 2015-12-22 22:29:38 -05:00
Matthias Clasen
a0487f0516 Add parser tests for border-image properties
This adds tests for border-image-source, border-image-repeat,
border-image-slice and border-image-width.
2015-12-22 22:29:38 -05:00
Matthias Clasen
d92111256f fix printing of numbers
We should be printing infinite, not inf.
2015-12-22 22:29:22 -05:00
Matthias Clasen
6b497bcf81 Trivial changes 2015-12-22 22:29:22 -05:00
Cosimo Cecchi
efb8e5bd43 menuitem: don't use content allocation to resize the GdkWindow
This is a fallout from the gadget conversion.
2015-12-22 15:36:00 -08:00
Matthias Clasen
e9aea98969 widget-factory: Rename outline radius in css
Rename all outline*radius properties to -gtk-outline*radius.
2015-12-22 16:20:09 -05:00
Matthias Clasen
ad87ebb5e7 Adwaita: Adapt to previous commit
Rename all outline*radius properties to -gtk-outline*radius.
2015-12-22 16:19:18 -05:00
Matthias Clasen
f61b7ba797 Prefix outline radius CSS properties
These are not in any CSS specifications, so mark them as GTK+
additions by giving them a -gtk prefix. The old names still work.
2015-12-22 16:18:10 -05:00
Matthias Clasen
2d6ce0da08 Add some docs to GtkIcon 2015-12-22 15:03:15 -05:00
Matthias Clasen
5f330418ae Add some docs to GtkBuiltinIcon 2015-12-22 15:03:15 -05:00
Cosimo Cecchi
a5a5091555 stylecontext: fix gtk-doc comment syntax 2015-12-22 11:56:23 -08:00
Cosimo Cecchi
22c9169883 Adwaita: don't set deprecated style property 2015-12-22 11:53:07 -08:00
Matthias Clasen
c8206ca698 Adwaita: Fix app-notification theming
The way to disable the frame border has changed.
2015-12-22 13:53:43 -05:00
Matthias Clasen
f5f80b40c3 Fix GtkFrame padding
This was showing up in the app-notification in widget-factory.
2015-12-22 13:53:43 -05:00
Cosimo Cecchi
23d8791a47 combobox: remove unused struct member
The box was removed a while ago.
2015-12-22 10:53:03 -08:00
Cosimo Cecchi
8d0ad79238 Adwaita: remove combobox separator styling
The separator does not exist anymore.
2015-12-22 10:49:21 -08:00
Cosimo Cecchi
ef41bd7112 combobox: deprecate shadow-type style property
It does not add any value to what can be achieved through regular CSS
styling.
2015-12-22 09:29:43 -08:00
Cosimo Cecchi
f5628f0439 combobox: port to use a gadget
Wrap the size request and allocate code into a GtkCssCustomGadget. This
makes margins work on GtkComboBox.
2015-12-22 09:29:43 -08:00
Cosimo Cecchi
a90d928a34 combobox: use a private variable when possible
Instead of dereferencing the same variable over and over.
2015-12-22 09:29:43 -08:00
Cosimo Cecchi
f03268eabe combobox: trivial code cleanup 2015-12-22 09:29:43 -08:00
Cosimo Cecchi
ebc7b59b44 combobox: remove unneeded check
The combobox always has a window.
2015-12-22 09:29:43 -08:00
Cosimo Cecchi
5764c09272 combobox: use GtkIcon to render button arrow
We can now use the newly introduced GtkIcon widget to properly render
the arrow in the combobox with CSS.
2015-12-22 09:29:43 -08:00
Cosimo Cecchi
9b7473b633 Introduce GtkIcon private class
This is an utility widget that wraps a GtkBuiltinIcon for situations
where using a real widget is more convenient than a gadget.
2015-12-22 09:29:43 -08:00
Matthias Clasen
164e8ed6bd menuitem: Simplify separators
For regular separators, we just rely on standard CSS background
rendering nowadays. Do the same for separators in menus.

https://bugzilla.gnome.org/show_bug.cgi?id=759765
2015-12-22 10:30:51 -05:00
Matthias Clasen
2438a06d54 Revert "window: Remove suspicious branch"
This reverts commit 67ab00e01e.

See https://bugzilla.gnome.org/show_bug.cgi?id=759705
for a case where this makes a difference.
2015-12-22 07:36:58 -05:00
Lapo Calamandrei
a64bf81a9f Adwaita: fix bogus rounded corners on split headerbars
we have to do some assumptions for css selectors limits for this
particular case, so for split headerbars to work correctly the
actual haderbars need not to have the titlebar class applied.
2015-12-22 11:53:27 +01:00
Kjell Ahlstedt
939be8a24b GdkSeat: Add G_BEGIN_DECLS and G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=759771
2015-12-22 10:33:41 +01:00
Chun-wei Fan
7a05432843 gtk/gtkbuiltinicon.c: Fix build
The gtk_builtin_icon_get_default_size_property returns a const char *,
in a way such that some compilers insist that something that is of a
pointer value be returned, so fix that by replacing 0 with NULL.
2015-12-22 16:35:58 +08:00
Paolo Borelli
7f17468afc W32: avoid code duplication in gdkdevice-win32|virtual
The same get_position function is cut and pasted in the two
classes.
2015-12-22 09:31:56 +01:00
Daiki Ueno
75b3eec7a6 inspector: Avoid crash when canceling at startup
When clicking "Cancel" on the "Do you want to use GTK+ Inspector?"
dialog, unregister the update_debugging idle handler.  Also, steal
reference to 'inspector_window' while gtk_destroy_widget(), to make
further gtk_window_update_debugging() calls as a no-op.

https://bugzilla.gnome.org/show_bug.cgi?id=759764
2015-12-22 12:52:27 +09:00
Matthias Clasen
cc50652db5 Adwaita: Fix overwrite cursors in entries
GtkEntry uses the background color to render the text over
the block cursor. A transparent background color makes that
not work.
2015-12-21 20:17:35 -05:00
Matt Watson
11ad60d386 flowbox: remove unused prelight code
It was causing needless redraws

https://bugzilla.gnome.org/show_bug.cgi?id=759757
2015-12-21 14:52:11 -08:00
Matthias Clasen
5c704621ac Fix import css parser tests
Don't use nonexisting properties here either
2015-12-21 16:33:50 -05:00
Alberts Muktupāvels
54c32fae1e x11: create GdkSeat also in GdkX11DeviceManagerCore
There are at least few cases when GdkX11DeviceManagerXI2 will not
be used. Make sure that we have GdkSeat in such cases.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-21 20:58:28 +01:00
Matthias Clasen
31f319d1c7 css parser test: Drop remaining made-up properties
These are not used anymore in any tests, and the css parser
doesn't support parsing custom properties anymore.
2015-12-21 14:53:09 -05:00
Matthias Clasen
ece3d33858 Fix css parser integer test
Use margin-top instead of a made-up property.
2015-12-21 14:52:06 -05:00
Matthias Clasen
ce859a7c65 Update css parser value none test
The test is affected by icon-shadow being renamed and by
engine being deprecated.
2015-12-21 14:44:00 -05:00
Matthias Clasen
0fb84c5a68 Fix the css parser value initial test
This was affected by the recent renaming of icon-shadow to
-gtk-icon-shadow. Also, it produces an error now because
engine is deprecated.
2015-12-21 14:37:09 -05:00
Matthias Clasen
474f5b7784 Fix the css parser value inherit test
This was affected by the recent renaming of icon-shadow to
-gtk-icon-shadow. Also, it produces an error now because
engine is deprecated.
2015-12-21 14:35:11 -05:00
Matthias Clasen
db094092ae Update font-weight css parser test
This is affected by the recent fix for parsing font-weight.
2015-12-21 14:32:01 -05:00
Matthias Clasen
ea651dcd31 Update font-family css parser test
There are no errors here.
2015-12-21 14:31:10 -05:00
Matthias Clasen
b931821f5e Update the css parser unknown pseudo-class test
Use an existing property instead of a made-up one.
2015-12-21 14:29:17 -05:00
Matthias Clasen
8ff127940f Update the css parser selector test
Use an existing property instead of the made-up one, here.
2015-12-21 14:27:52 -05:00
Matthias Clasen
1f298c385f Drop the css parser enum test
We are no longer using and non-css properties, and css enums
are all parsed with custom code.
2015-12-21 14:25:46 -05:00
Matthias Clasen
e567f23bcd Update another css parser test
This test was using the engine property, which has
been deprecated and thus generates an error now.
Instead, use the font property.
2015-12-21 14:18:51 -05:00
Matthias Clasen
dcc3dd1211 Update css parser test for declarations
Use existing CSS properties instead of made-up ones.
2015-12-21 14:14:36 -05:00
Matthias Clasen
0035d526c3 test-css-parser: Drop unused property
The rgba-property is no longer used in any tests, drop it.
2015-12-21 14:11:10 -05:00
Matthias Clasen
6eb4102bf2 Update css parser tests for colors
Use the color property instead of a made-up rgba-valued property.
2015-12-21 14:10:20 -05:00
Matthias Clasen
a21025e096 test-css-parser: Drop unused property
The border-property is no longer used in any tests, drop it.
2015-12-21 14:07:08 -05:00
Matthias Clasen
b56980eba2 Update css parser test for borders
Use the border-image-width property instead of a made-up
border-valued property.
2015-12-21 14:06:07 -05:00
Matthias Clasen
0c9c6b882e Update border-radius-shorthand tests
The name of the css file is in the error output, so we
have to update that after the file was recently renamed.
2015-12-21 14:01:03 -05:00
Matthias Clasen
01f2d4dd0f Update pseudo-class test
We have some more pseudo-classes now, and some are printed
out with their CSS name.
2015-12-21 13:59:24 -05:00
Matthias Clasen
6d86ce516d test-css-parser: Drop unused properties
We don't have any tests involving these style
properties, so don't install those.
2015-12-21 13:57:26 -05:00
Matthias Clasen
a5ccef7470 Don't test parsing boolean values in css
CSS doesn't have any boolean properties.
2015-12-21 13:51:23 -05:00
Carlos Garnacho
fc2879108d wayland: Don't trigger grab on missing capabilities
Those might not be currently there in the first place.
2015-12-21 19:14:21 +01:00
Matthias Clasen
3075dac106 image: Don't assume baseline parameters are non-NULL
The GetSize callback *can* assume that minimum and natural are
non-NULL. Buy minimum_baseline and natural_baseline can and
will be NULL, so handle that. This was causing crashes e.g. in
pavucontrol.
2015-12-21 12:55:12 -05:00
Cosimo Cecchi
485c28d300 menu: port arrow rendering to use a GtkBuiltinIcon
At the same time, remove one spurious background/frame rendering, and
simplify the code a great deal.
2015-12-21 09:22:16 -08:00
Cosimo Cecchi
729801c2a1 menuitem: trivial doc improvement 2015-12-21 09:22:16 -08:00
Cosimo Cecchi
105b45dce0 cssgadget: print more information when warning 2015-12-21 09:22:16 -08:00
Cosimo Cecchi
5611e81bbc cssgadget: fix fallback case
We should be resetting the height here, not the width.
2015-12-21 09:22:16 -08:00
Cosimo Cecchi
655132b87c menu: deprecate double-arrows style property
It does not sound like a good idea anymore to have a style property
change the layout of the menu this drastically.
2015-12-21 09:22:16 -08:00
Cosimo Cecchi
b664ba50c0 menu: deprecate arrow-placement style property
It does not sound like a good idea anymore to have a style property
change the layout of the menu this drastically.
2015-12-21 09:22:16 -08:00
Lapo Calamandrei
8a0a11dae4 Adwaita: set scrollbar style props in a general wildcard
trying to make webkit happy.
2015-12-21 16:58:03 +01:00
Lapo Calamandrei
7c6ca26bfb Adwaita: fix split headerbar styling
applications with split headerbars has a container in the titlebar
slot so the .titlebar style there needs to be reset. Since we can't
go backward with selectors I assumed that any csd application
sports a headerbar hence relying on that styling and resetting
the .titlebar styleclass.
2015-12-21 16:18:04 +01:00
Matthias Clasen
6f889e832c css: Support CSS names for pseudo states
What we call :insensitive is called :disabled in CSS, and
:inconsistent is :indeterminate. Recognize these names, but
still support the old ones.
2015-12-21 08:26:58 -05:00
Matthias Clasen
2599ca4d9f Adwaita: Attempt a fixing split headers
Remove decorations from headerbars which are wrapped in some
other containers (like boxes, or paneds), to prevent double
decorations in those cases.
2015-12-21 07:46:37 -05:00
Matthias Clasen
698fe18521 Add missing tests to Makefile.am 2015-12-21 06:58:29 -05:00
Matthias Clasen
3daeb70182 Fix the build 2015-12-21 06:45:32 -05:00
Matthias Clasen
d081b309d5 Add some css parser tests
These tests exercise many allowed ways to specify various
properties.
2015-12-21 06:28:25 -05:00
Lapo Calamandrei
a54fadced6 Adwaita: make progressbars and scales the same size 2015-12-21 11:50:56 +01:00
Lapo Calamandrei
124923213f Adwaita: progressbar sizing and progress component positioning
shrinked progressbars a bit and moved the progress component start
and end over the trough border.
2015-12-21 11:28:45 +01:00
Matthias Clasen
436a258bb0 Fix a typo 2015-12-20 23:50:40 -05:00
Matthias Clasen
0473736499 Fix parsing of font-weight
The parser was turning a 400 into a 200 and a 700 into a 500.
2015-12-20 17:51:47 -05:00
Matthias Clasen
0520ca3bdf buttonbox: Fix size request
A copy-paste mistake was making us always request too little
space, causing the buttons to be jumbled or cut off.

https://bugzilla.gnome.org/show_bug.cgi?id=759664
2015-12-20 17:03:06 -05:00
Matthias Clasen
6a67df79a8 inspector: Avoid criticals in the css editro
We can't keep text iters around after text buffer has been
changed. Just clear the list errors when the buffer changes
before we've passed it again.
2015-12-20 14:43:14 -05:00
Michael Catanzaro
c3d611fcf2 entry: Fix typo 2015-12-20 11:52:30 -06:00
Aurimas Černius
e37e867048 Updated Lithuanian translation 2015-12-20 15:41:08 +02:00
Matthias Clasen
ea01921d09 modelbutton: Stop saving cairo state
GtkBuiltinIcon does this now on its own.
2015-12-20 01:04:59 -05:00
Matthias Clasen
9ac80c2510 checkbutton: stop saving cairo state
GtkBuiltinIcon now does this on its own.
2015-12-20 01:04:13 -05:00
Matthias Clasen
db7f269c03 Some updates to the CSS docs
Remove references to regions and engines, emphasize
element names over type names, update the list of
pseudo-states.
2015-12-20 01:03:38 -05:00
Cosimo Cecchi
c9e27636b6 checkmenuitem: port indicator gadget to GtkBuiltinIcon
Saves a lot of code.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
ce6cd49475 menuitem: port arrow gadget to GtkBuiltinIcon
Saves a lot of code.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
22ec899f23 menuitem: simplify code
Only cast once.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
aadc13c4ec builtinicon: save/restore cairo context when rendering 2015-12-19 21:22:37 -08:00
Cosimo Cecchi
4ec99db368 checkmenuitem: deprecate indicator-size style property
We can now use min-width/min-height.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
5a87b5bbce menuitem: deprecate toggle-spacing style property
We can move this to just use the actual GtkCssGadget of the menu item.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
3af5c83cd3 checkmenuitem: use a gadget for the check indicator
This will make margins and other CSS properties work correctly on the
indicator.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
0e24d6cd85 theme: fix menu check/radio styling
This is a leftover from the CssNode port of GtkCheckMenuItem and
GtkRadioMenuItem.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
b602dc2eed menuitem: trivial cleanup 2015-12-19 21:21:16 -08:00
Cosimo Cecchi
871a8c0e16 checkmenuitem: prefer early return 2015-12-19 21:21:16 -08:00
Cosimo Cecchi
7959c3fb6e menuitem: deprecate arrow-scaling style property
With this, we can also remove the custom measure function of the arrow
gadget.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
2d5d7d8cf2 menuitem: convert arrow rendering to GtkCssGadget
This also deprecates the arrow-spacing style property, which can be now
replaced with a simple margin.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
f49a5bf116 menuitem: deprecate width-chars style property
Instead, we can just set min-width.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
f2adb5779f menuitem: port to gadgets
This is not a complete conversion yet - more changes will come in later
commits.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
11d9da08a9 menuitem: use gtk_container_class_handle_border_width() 2015-12-19 21:21:16 -08:00
Cosimo Cecchi
35ed13ac54 menuitem: really ignore horizontal-padding
This style property has been documented as been ignored for a long time,
but we were still reading it in some cases.
2015-12-19 21:21:16 -08:00
Matthias Clasen
f792d20507 statusbar: Deprecate style properties
We were not really using the shadow-type style property anyway,
so lets just deprecate it. Themes can directly theme the frame.
2015-12-19 23:53:31 -05:00
Matthias Clasen
57dd855d10 Adwaita: Drop some deprecated style properties
These can now be replaces with min-width/min-height.
2015-12-19 23:24:27 -05:00
Matthias Clasen
c0683d9267 checkbutton: Fix regression from builtin icon
The leaking of cairo transforms from builtin icon drawing
was causing the label to be drawn at the wrong position.
2015-12-19 23:23:09 -05:00
Matthias Clasen
f7236b261b modelbutton: Fix state confusion
Checked buttons were getting the wrong image.
2015-12-19 21:56:05 -05:00
Matthias Clasen
f0fba02dca Adwaita: Try harder to fix arrow rendering
Fiddle with specificity to keep hovered modelbutton arrows
from rendering background.
2015-12-19 20:46:26 -05:00
Matthias Clasen
7aeb57cdfd modelbutton: Hide checks initially
Manually constructed model buttons were always ending up
with a check. Fix that by hiding the indictator node initially.
2015-12-19 20:16:51 -05:00
Matthias Clasen
0b7226e96e Adwaita: Fix treeview headers
The borders went missing on these, at some point.

https://bugzilla.gnome.org/show_bug.cgi?id=759567
2015-12-19 17:34:21 -05:00
Matthias Clasen
bca4755228 modelbutton: Use a builtin icon for the arrow
No need to do this manually.
2015-12-19 14:53:57 -05:00
Matthias Clasen
d36c93b91b expander: Fix drawing in rtl
GtkBuiltinIcon leaves the cairo context in unclean state
when drawing, work around that.
2015-12-19 11:24:27 -05:00
Matthias Clasen
7d801a4f69 Fix a case a height/width confusion 2015-12-19 11:24:27 -05:00
Matthias Clasen
d51de8cff8 expander: Use a builtin icon
This saves quite a bit of code.
2015-12-19 11:24:27 -05:00
Dušan Kazik
22738ad5af Updated Slovak translation 2015-12-19 13:46:14 +00:00
Pedro Albuquerque
5da6947927 Updated Portuguese translation 2015-12-19 07:37:02 +00:00
Pedro Albuquerque
bb3e4feee6 Updated Portuguese translation 2015-12-19 07:33:52 +00:00
Matthias Clasen
f54e0a283b label: Allocate gadget before using it
Move the gtk_css_gadget_allocate call before the
gtk_label_update_layout_width call. This fixes the
statusbar label in widget-factory page 2 coming
up fully ellipsized.
2015-12-19 00:33:20 -05:00
Benjamin Otte
35e98dce9b notebook: Sync menu labels with page list in visibile_cb
It's where it changes. Size requests have nothing to do with that.
2015-12-19 06:13:56 +01:00
Benjamin Otte
c3548328f7 notebook: Don't allocate during size requests
wat?
2015-12-19 06:13:56 +01:00
Benjamin Otte
dd90e020a2 label: Don't use _gtk_mis_get_padding_and_border()
The function takes into account CSS padding and border, which these days
is handled by the gadget code. Use gtk_misc_get_padding() instead.
2015-12-19 06:13:56 +01:00
Christoph Reiter
47325a827b imagedefinition: The storage type is not a boolean 2015-12-19 06:13:56 +01:00
Matthias Clasen
a3fd5a010b Simplify actionbar
We don't need a frame widget here, just render a top border on the
box.
2015-12-18 22:57:16 -05:00
Matthias Clasen
b90fa7dcd1 Adwaita: fix action bar styling
Make action bar buttons have some padding again.
2015-12-18 22:37:57 -05:00
Matthias Clasen
ac65952f0d icon helper: suppress style_changed when transient
Transient nodes should not propagate style-changed signals
that can cause widgets to get reallocated. This was causing
treeviews and iconviews with pixbuf cells to be constantly
resized and redrawn.
2015-12-18 20:53:02 -05:00
Matthias Clasen
7acb670e70 Add more icon entry tests
This test shows that changing icon types works.
2015-12-18 19:38:19 -05:00
Matthias Clasen
18e8842a7e entry: Don't clear when setting icons
Clearing the icon doesn't appear to be necessary with
todays code, and it has the unfortunate side-effect of
temoorarily hiding the icon's window, which breaks grabs
and makes us miss the button release event when the icon
is changed from a button press handler.
2015-12-18 19:38:07 -05:00
Matthias Clasen
6f5b19a0a5 css node: Use g_set_object
Replace unref + assignment + ref combinations by g_set_object_calls.
2015-12-18 16:56:04 -05:00
Matthias Clasen
51ba8421c3 entry: Remove some dead code
These defines are no longer used.
2015-12-18 10:55:26 -05:00
Timm Bäder
e8aa9b0440 Add a way to highlight resizing widgets
https://bugzilla.gnome.org/show_bug.cgi?id=759586
2015-12-18 16:20:19 +01:00
Timm Bäder
20a6ee30b7 GtkWidget: Don't mix code and declarations 2015-12-18 16:08:22 +01:00
Matthias Clasen
666e4135e8 expander: Deprecate style properties
This can all be done with CSS properties now.
2015-12-18 09:26:16 -05:00
Matthias Clasen
53787d29ad expander: Let gadget render focus
This lets us drop lots of allocation fiddling, and reduces
the code that is consulting the style properties we want
to get rid of.
2015-12-18 08:29:49 -05:00
Matthias Clasen
d81f8c1025 box: Add a way to get the gadget
This will be used in GtkButtonBox.
2015-12-18 07:37:52 -05:00
Matthias Clasen
acd339a9a5 buttonbox: Convert to gadgets
Set a css name and use a gadget for button box allocation and
drawing.
2015-12-18 06:52:35 -05:00
Matthias Clasen
2e25407638 Fix a problem with entry gadgets
place_windows is accessing the gadgets allocation, so make sure
to allocate the gadget before calling it.
2015-12-17 15:17:23 -05:00
Daniel Mustieles
fab31e16ed Updated Spanish translation 2015-12-17 19:14:57 +01:00
William Hua
54fa65f544 gdkborder: change types from gint16 to gint 2015-12-17 12:56:35 -05:00
William Hua
5190d010d9 gtkborder: restore original struct definition
We're going to add back the original struct definition removed by
a6e4de28, because using the typedef breaks all sorts of things like
gtkmm and WebKit, and having separate struct definitions allows us to
change the types in GdkBorder from gint16s to gints without breaking
ABI.
2015-12-17 12:56:35 -05:00
Paolo Borelli
8c355d8fe6 Win32: call dnd exit when finalizing the display
Since we init dnd when opening the display, call the corresponding
exit function (which is unused at the moment) when finalizing the
display.
2015-12-17 17:18:02 +01:00
Paolo Borelli
2e5616b27e Win32: move CoInitialize to dnd init
Functions requiring CoInitialize are called just in two places:
 - the filechooser thread which calls its own CoInitializeEx
 - the dnd code

Moving CoInitialize in the dnd specific init is cleaner and
we can pair it with the corresponding CoUninitialize since
CoUninitialize should be called as many times as CoInitialize.
Note that it is ok to call this function multiple times, so it
will not break if another codepath will need it in the future.

The patch also replaces the deprecated CoInitialize with the
equivalent call to CoInitializeEx (already used in the filechooser).
2015-12-17 17:18:01 +01:00
Timm Bäder
f6b0067718 GtkSeparator: Don't leak the gadget 2015-12-17 14:51:34 +01:00
Matthias Clasen
35c243b26f entry: use a gadget
Use a gadget for the entry. Selection and progress still
just use a CSS node. Most things seem to work correctly
with non-zero margin or padding.
2015-12-17 00:01:58 -05:00
Lionel Landwerlin
776778efc8 inspector: Ensure clip is always shown 2015-12-17 01:14:31 +00:00
Matthias Clasen
117ab50922 inspector: Always show clip
It is less confusing than hiding it sometimes.
2015-12-16 19:24:43 -05:00
Matthias Clasen
0e82076527 gadget: Don't warn about unset clip
Instead of warning about an unset clip, simply ignore
empty content clips.
2015-12-16 19:14:39 -05:00
Matthias Clasen
7778c237e6 cellview: Convert to gadgets 2015-12-16 19:07:26 -05:00
Matthias Clasen
f3c95e1c63 gadget: Avoid warning for empty containers
Empty boxes end up setting the clip to { 0, 0, 0, 0}, so warning
for a width or height of 0 triggers false positives. Instead,
initialize the clip to clearly invalid values.
2015-12-16 17:52:47 -05:00
Matthias Clasen
09d9674d69 gadget: Add more information to warnings
We have the gadget at hand, so we should print out some
information that helps tracking down where it comes from.
2015-12-16 17:41:04 -05:00
Matthias Clasen
083a17acd4 gadget: Update docs
Make it clear that out_clip must be set.
2015-12-16 17:32:24 -05:00
Matthias Clasen
ec5596ce20 gadget: Warn if clip is not set
This leads to hard-to-track-down drawing errors, so better
warn explicitly about it.
2015-12-16 17:27:14 -05:00
Matthias Clasen
2417184a1f frame: Fix gadget conversion
The GtkCssAllocateFunc must set the clip to meaningful values.
2015-12-16 17:12:12 -05:00
Matthias Clasen
576028bdec frame: Convert to gadgets
As part of this conversion, remove the hardcoded padding around
the label.

Unfortunately, we cannot use the main gadget for drawing the frame
decoration, since we want to draw a custom border instead of the
stock css border that gadgets insist on drawing for us. Therefore,
add an extra gadget with name border and use it just for rendering
the frame.
2015-12-16 15:15:18 -05:00
Carlos Garnacho
3be4971e05 GtkPopover: Ensure we unset modality before unparenting the popover
Otherwise the gtk_grab_remove() calls on widget destruction will happen
on the default window group, which may leave the real window group
of the popover with a dangling pointer if it is not the default one.

This could be seen on the inspector, open a popover in the properties
list and close the window with alt-F4.
2015-12-16 20:47:25 +01:00
Benjamin Otte
197e42efd8 label: Position the text properly
The PangoLayout needs to be positioned according to the content
allocation of the gadget, not the widget's allocation.
2015-12-16 20:39:51 +01:00
Benjamin Otte
2e362eafc7 cssnode: Redo first/last-child change tracking
Invisible nodes don't change the first/last-child status of the nodes
after/before them. That means we don't have to just check the state of
the adjacent node when modifying this state, but all their siblings
until we hit a visible node.

The same way, a node is not the first child if it has no previous
sibling, it is the first child if it has no previous visible sibling.
This is important for caching in the global lookup cache.
2015-12-16 19:55:50 +01:00
Benjamin Otte
36653bea41 checkbutton: Use a builtin icon
Also, add support to uiltin icons to look up the default size from a
style property.
2015-12-16 19:55:50 +01:00
Matthias Clasen
abbd6b11f6 switch: Deprecate style properties
CSS min-width and min-height on the slider node fit this
perfectly. We still fall back to the slider-width and
slider-height style properties if the CSS properties are
not set.
2015-12-16 13:53:13 -05:00
Matthias Clasen
4e05148bef Simplify some code
Deal with the min-width/min-height fallback the same way
as in GtkBuiltinIcon.
2015-12-16 13:53:13 -05:00
Carlos Garnacho
3f7eefb922 inspector: Use seat grabs for the "inspect widget" feature
And remove some usages of GdkDeviceManager API.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
32c9db8600 GtkTreeView: Add ignore deprecation statements
We still need access to floating devices at places.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
4f9f3f04c0 GtkWindow: Add ignore deprecation statements
We still need access to floating devices at places
2015-12-16 19:47:07 +01:00
Carlos Garnacho
4a7589ea12 GtkWindow: Avoid GdkDeviceManager API
We can iterate over the seats' pointers, instead of over master pointers.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
0f98f225d1 GtkWidget: Add some ignore deprecation statements
We still need access to floating devices here.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
04d7bd49d0 GtkMenu: Avoid GdkDeviceManager API
We used to pick a master pointer "at random", use the default seat pointer
instead.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
26f3d02f03 GtkComboBox: Avoid GdkDeviceManager API
We used to pick a master pointer "at random", use the default seat pointer
instead.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
e2c8d3c680 scrolledwindow: Remove unneeded code
We no longer take a grab here, no need to undo it on grab_notify
2015-12-16 19:47:06 +01:00
Carlos Garnacho
24afce5650 x11: Make fallback window dragging use seat grabs
Also, gdk_seat_ungrab() will undo the implicit grab when EWMH dragging
is used.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
7ead57be8c x11: Add some ignore deprecation statements
In those places we still need access to floating devices, or we need to
use the GdkDeviceManager as its GdkEventTranslator interface.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
c3f1565c18 x11: Avoid gdk_device_manager_get_client_pointer()
We can use the pointer of the default seat instead.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
1fbf2fe4d7 wayland: Avoid GdkDeviceManager APIs
In most places, we can do with the pointer/keyboard of the default seat
instead of the client pointer. We can also remove some code from
gdk_input_init() because we know for sure there's no floating devices to
care about here.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
598dedfe36 broadway: Add a few ignore deprecations statements around GdkDeviceManager
There's places where we still need to deal with floating devices, which are
unseen by seats. Ignore deprecations and keep using GdkDeviceManager until
we can forget about floating devices.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
3e1e02c2bc GdkDisplay: Add a few ignore deprecations statements around GdkDeviceManager
There's places where we still need to deal with floating devices, which are
unseen by seats. Ignore deprecations and keep using GdkDeviceManager until
we can forget about floating devices.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
50859d9efe GdkWindow: Add a few ignore deprecations statements around GdkDeviceManager
There's places where we still need to deal with floating devices, which are
unseen by seats. Ignore deprecations and keep using GdkDeviceManager until
we can forget about floating devices.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
644fa138c3 GdkDisplay: Iterate through seats' pointers/keyboards in older grab functions
Instead of using the GdkDeviceManager.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
ce7bb7c739 GdkWindow: Iterate through seats' pointers/keyboards in older grab functions
Instead of using the GdkDeviceManager.
2015-12-16 19:47:05 +01:00
Carlos Garnacho
7a926cc7e0 gdkevents: Fallback to the event device seat
There's places where we don't set a seat yet, plus the places
outside GTK+ where events are created, we should warn and fall
back to the master device seat with these.
2015-12-16 19:47:05 +01:00
Carlos Garnacho
b0d72a36d8 gdkevents: Ensure the seat data is copied in events 2015-12-16 19:47:05 +01:00
Carlos Garnacho
c70da9b7ae gdk: Set seat on events generated in common code 2015-12-16 19:47:05 +01:00
Cosimo Cecchi
13b9515e63 border: silence a GIScanner warning 2015-12-16 10:40:18 -08:00
Cosimo Cecchi
ea3df24735 gadget: fix copy/paste error in documentation 2015-12-16 10:38:05 -08:00
Cosimo Cecchi
990dc9961a gdkevents: fix a compiler warning 2015-12-16 10:35:46 -08:00
Matthias Clasen
0291978acc check button: Deprecate indicator-size
CSS min-width/min-height can do just the same. We still fall
back to the indicator-size style property if the CSS properties
are not set.
2015-12-16 13:11:24 -05:00
Matthias Clasen
bb67a06bd6 check button: Deprecate and ignore ::indicator-spacing
This can be done just as well with CSS margins, so
do that instead for Adwaita.
2015-12-16 12:27:53 -05:00
Matthias Clasen
86ecdc7a44 model button: Document iconic layout
Document how the CSS nodes look if iconic is TRUE. Add
a .model style class for this case and use it in Adwaita.
2015-12-16 11:37:49 -05:00
Matthias Clasen
2f544655f9 Revise CSS node documentation
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Benjamin Otte
fe9301ac1b widget-factory: Make things compile again
1e1064398c broke the build.

When I run make, I should make sure to run it in the right directory.
And not in the gtk/ subdirectory that will never build widget-factory...
2015-12-16 16:28:34 +01:00
Benjamin Otte
1e1064398c widget-factory: Disconnect clipboard watcher on close
The clipboard emit events after the button we connected it to was
already destroyed (on application close for example), so make sure we
don't try to use that dead button.
2015-12-16 15:44:52 +01:00
Olivier Fourdan
b456db8cf4 wayland: Check transient loop
Gdk Wayland backend walks up the transient windows tree, but does not
check for cycles when doing so.

As a result, if two or more windows are transient to each other, the
Wayland gdk backend will enter an infinite loop.

While this is clearly a bug in the application, gtk+/gdk should be more
robust and handle such errors more gracefully.

To avoid looping infinitely at various point in the code, check for a
possible loop when setting the transient relationship and deny the
request to set a window transient for another if that would create a
loop.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759299
2015-12-16 14:11:11 +01:00
Emmanuele Bassi
0b19197493 Fix the fix to the last commit
I should not push while compilation is still going on
2015-12-16 12:42:27 +00:00
Emmanuele Bassi
00102e35ea Fix previous commit
The scale parameter was missing.
2015-12-16 12:41:16 +00:00
Lars Uebernickel
1f07625705 gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

This is similar to 657a43e (which was reverted), but doesn't modify the
behavior of gdk_pixbuf_get_from_surface().

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-12-16 13:07:58 +01:00
Bastien Nocera
a56a8a8c02 shortcuts: Make sure that hidden shortcuts stay hidden
When doing a gtk_widget_show_all() on the shortcuts window,
accelerators for both RTL and LTR directions are being shown.

Make sure that no-show-all is set by default on hidden shortcuts, and
updated if the widget direction changes.

https://bugzilla.gnome.org/show_bug.cgi?id=759541
2015-12-16 12:22:58 +01:00
Matthias Clasen
6c91f5670c 3.19.5 2015-12-15 23:57:06 -05:00
Matthias Clasen
5db1dad869 paned: Initialize clip properly
This was causing problems in the case when only one of the paned
children is visible - we would use uninitialized memory, leading
to invalide clip regions. Concretely, the signal tab in the inspector
would sometimes not render at all.
2015-12-15 23:56:47 -05:00
Benjamin Otte
42fdfb6af4 renderborder: Actually draw the path as one element
Avoids spurious lines that can sometimes be seen going towards the
center of the widget.
2015-12-16 05:15:04 +01:00
Benjamin Otte
fab181fcfa builtinicon: Change the way size is handled
Make min-width/height have preference over the set default size. This
allows shrinking the widget. The default size is only used if min-width
is not set (or explicitly set to 0.
2015-12-16 04:46:23 +01:00
Benjamin Otte
9d56a076cc gadget: Add builtin icon gadget
This is to be used in all the places where we now call
gtk_render_activity()/option()/check() etc that in turn call the icon
render function.
2015-12-16 04:46:23 +01:00
Benjamin Otte
d3cf3fd267 rendericon: Move a function
The function is identical if used for builtin icons and regular icons
(as per iconhelper). So split it out in a way that doesn't assume
either.
2015-12-16 04:46:22 +01:00
Matthias Clasen
152326bd24 paned: Allocate the handle input area properly
Drop the margin misuse and use the border allocation of the
handle gadget. We use negative margins to make the border allocation
larger without pushing the paned children out.
2015-12-15 21:59:04 -05:00
Matthias Clasen
b14dc6b5a4 gadget: Add api to get the border allocation
This can be useful for giving input windows the right size.
2015-12-15 21:58:45 -05:00
Matthias Clasen
5aec427c1a paned: Fix size allocation
We were passing negative widths to height-for-width calls that
didn't expect this.
2015-12-15 21:58:45 -05:00
Benjamin Otte
26d42771ef progressbar: Change the way the progress gadget gets size
Size of the progress element now grows also when it's close to 0 size.

Previously the size was clamped to the minimum size, now it starts
growing from the minimum size.
So for a 100px trough with a 10px min size progress, the sizes of the
progress element change like this:
        old     new
0%      10      10
5%      10      14
10%     10      19
20%     20      28
50%     50      55
100%    100     100
2015-12-16 01:50:01 +01:00
Benjamin Otte
bf130da741 cssimage: Handle 0x0 images
0x0 images can happen when we fail to load an image - or when we
successfully load a 0x0 image.
2015-12-16 01:50:00 +01:00
Benjamin Otte
a11de0da6b stylecontext: Builtin images can be (and are) transformed
So don't special-case them out.
2015-12-16 01:50:00 +01:00
Benjamin Otte
75d7f7e756 css: Move enum
I want to use it for a gadget, so it's better in the generic file.
2015-12-16 01:50:00 +01:00
Matthias Clasen
65b056142b Really undo the deprecation of separator style properties
I hit the wrong one in the previous commit. For good measure,
undo depecation for all separator-related style properties.
They are still in use.
2015-12-15 19:45:35 -05:00
Matthias Clasen
9b408d911a shortcuts: Fix the circular stack switcher
The buttons need to set min-width now, to make this work.
2015-12-15 19:41:05 -05:00
Matthias Clasen
db684d853d Undo deprecation of the wide-separators style property
This was premature, as this style property is still used
by GtkTreeView and GtkMenu.
2015-12-15 19:41:05 -05:00
Piotr Drąg
60e8cf743d Updated POTFILES.skip 2015-12-16 01:09:00 +01:00
Matthias Clasen
1b174a6f16 shortcuts: Fix view filtering
When adding invisible groups to the pages/columns, we were
mistakenly creating new columns because the row count
stayed at zero.

https://bugzilla.gnome.org/show_bug.cgi?id=759517
2015-12-15 18:40:51 -05:00
Matthias Clasen
5d3f28192c gtk-demo: Add another shortcuts window example
The boxes shortcuts, taken straight from boxes.
This demonstrates a problem with view filtering.
2015-12-15 18:39:39 -05:00
Matthias Clasen
2bb80a9bb2 gadget: Fix a thinko in baseline adjustment
We are making the allocation smaller, so the baseline
needs to get smaller too, not bigger.
2015-12-15 18:15:16 -05:00
Carlos Garnacho
47632df9a5 gdkevents: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated.
2015-12-15 23:24:59 +01:00
Carlos Garnacho
ee549c9ded GdkWindow: Listen to ::seat-removed in order to remove pointer info
Our actions on ::device-removed only actually applied to master
pointers, so listening to GdkDisplay::seat-removed and operating
on the seat pointer is equivalent.
2015-12-15 23:22:00 +01:00
Carlos Garnacho
b4aa498fe7 GdkWindow: Iterate through seats in gdk_window_set_cursor()
And set the pointer on all seat pointers, equivalent to the master
pointer lookup we were performing with GdkDeviceManager
2015-12-15 23:20:40 +01:00
Carlos Garnacho
ff686344c9 GdkWindow: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:19:49 +01:00
Carlos Garnacho
1349ffa0db gtkdnd: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:18:10 +01:00
Carlos Garnacho
56c6c722d1 GtkPlug: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:17:53 +01:00
Carlos Garnacho
3d516449d4 GtkTooltip: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:17:37 +01:00
Carlos Garnacho
7333d7e8bb GtkTreeView: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:17:22 +01:00
Carlos Garnacho
253bf3fd38 GtkWidget: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:17:07 +01:00
Carlos Garnacho
6ac16dc4a6 GtkWindow: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:16:11 +01:00
Matthias Clasen
06b28a610b flowbox: Don't render focus erroneously
The gadget render function should only return TRUE if the
widget has the focus, and wants it rendered.
2015-12-15 15:10:08 -05:00
Carlos Soriano
8858c3aaa0 gtkplacesviewrow: plural form for available space
We were not supporting plural form of the available space, which
is a problem in some languages.
However in this case is kind of a difficult matter, since we use a
formatted string from glib with g_format_size.

To fix it, use the same behavior as g_format_size to decide when
it should be used a plural form or not.

https://bugzilla.gnome.org/show_bug.cgi?id=759491
2015-12-15 14:59:13 -05:00
Matthias Clasen
4eeeb5811d listbox: Fix an oversight in the row gadget conversion 2015-12-15 14:12:50 -05:00
Matthias Clasen
cf6523d9f2 Add some more updates 2015-12-15 14:06:55 -05:00
Matthias Clasen
fdb9625f4f modelbutton: Remove debug spew 2015-12-15 13:14:49 -05:00
Matthias Clasen
af4e7b7a8e Updates for 3.19.5 2015-12-15 11:00:48 -05:00
William Hua
a6e4de2884 gdkborder: add GdkBorder to gdktypes.h 2015-12-15 10:13:03 -05:00
William Hua
c6bd3ddb8a gdkwindow: move GdkWindowTypeHint to gdktypes.h 2015-12-15 10:13:03 -05:00
Matthias Clasen
03bb75b1cf gdk: Add gdk_drag_drop_done to the docs 2015-12-15 10:00:21 -05:00
Matthias Clasen
246fcd6563 Complete docs for gtk_stack_get_interpolate_size 2015-12-15 09:48:16 -05:00
Matthias Clasen
44baf19330 paned: Add a deprecation note 2015-12-15 08:41:16 -05:00
Matthias Clasen
d891bb815b checkbutton: Remove dead code 2015-12-15 08:41:16 -05:00
Matthias Clasen
e02c21fdd8 button box: Deprecate style properties
These can all be replaced by standard CSS properties.
2015-12-15 08:41:16 -05:00
Matthias Clasen
49e24b05b5 flowbox: convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
3b264ea555 flowbox: Convert child to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
29accad89a listbox: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
9fb3716259 listbox: Convert rows to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
c2fc1cff32 paned: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
9c63170e70 stack: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
48e543fbc8 Adwaita: Update separator toolitem styling
Don't set a background for these, since we now draw background.
2015-12-15 08:41:16 -05:00
Matthias Clasen
e480fa3841 separator toolitem: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
f2dd4350b2 css node: Warn more
gtk_css_node_insert_before/after can easily create cycles
which later lead to stack overflows. Even if we're not
catching all cycles here, at least we can detect obviously
invalid arguments, such as inserting a node next to itself.
2015-12-15 08:41:16 -05:00
Matthias Clasen
e2bc77b9af Adwaita: Remove nonsensical expander theming
No red backgrounds, please.
2015-12-15 08:41:16 -05:00
Matthias Clasen
61fb3f828e expander: Convert to gadgets
As part of the conversion, add another CSS node for the title
area including the arrow and the label.
2015-12-15 08:41:16 -05:00
Matthias Clasen
f0a2f9ef96 revealer: Add CSS node docs 2015-12-15 08:41:16 -05:00
Matthias Clasen
f7466b236a stackswitcher: Stop hardcoding 100px width
We can now set a min-width in the theme, so we don't have to
hardcode the size request here anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=726371
2015-12-15 08:41:16 -05:00
Matthias Clasen
ad349caa00 gadget: Add some documentation 2015-12-15 08:41:16 -05:00
Matthias Clasen
9c88256441 box: Trivial doc change
All the CSS sections are named CSS nodes, so do the same here.
2015-12-15 08:41:16 -05:00
Matthias Clasen
f3561eaa9b grid: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
e237c947c7 headerbar: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
90109cfe4c actionbar: Convert to gadgets
This is a nice example of a trivial container conversion.
2015-12-15 08:41:16 -05:00
Matthias Clasen
0f7dbc3bbd Adwaita: No padding for image buttons in popovers 2015-12-15 08:41:16 -05:00
Matthias Clasen
736d864d18 modelbutton: Port to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
782c2762bf gadget: Be more forgiving to size inconsistencies
Instead of asserting if we hit negative content sizes,
warn and continue. This is easier to work with in this
transition period.
2015-12-15 08:41:16 -05:00
Matthias Clasen
a52c3a3db9 radiobutton: Port radio buttons to gadgets
This was already mostly done by inheritance from GtkCheckButton.
To complete it, stop using the draw_indicator vfunc for radio
buttons, and instead make the indicator gadget draw either a
check or radio.
2015-12-15 08:41:16 -05:00
Matthias Clasen
233179d374 check button: Convert to gadgets
Use a gadget for the button, and for the indicator.
A complication here is that GtkCheckButton (and
GtkRadioButton) have a totally different appearance
depending on the ::draw-indicator property. If an
indicator is not required, we just reuse the
GtkButton gadget.
This mostly works; some minor sizing issues left, e.g. cranking
up the indicator-size causes the checkbutton grid in testgtk
to overlap.
2015-12-15 08:41:16 -05:00
Matthias Clasen
37e9d92632 button: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
a81267c28e label: Convert to gadgets
This removes some hairy code handling with borders and padding,
which may or may not be correct. The examples in testheightforwidth
all continue to work, and min-width now works for labels.
2015-12-15 08:41:16 -05:00
Matthias Clasen
ff9f3c108f Adwaita: Update color swatch styling
The adjustments here are provisional and need an artistic eye.
2015-12-15 08:41:16 -05:00
Matthias Clasen
c376e82702 colorswatch: Convert to gadgets
Use gadgets for the widget and the overlay.
2015-12-15 08:41:16 -05:00
Matthias Clasen
fcca496734 widget: Deprecate some style properties
Deprecate the ::wide-separators and ::separator-width/height
style properties.
2015-12-15 08:41:16 -05:00
Matthias Clasen
20e1ff44e8 Adwaita: Update separator styling
Separators no longer draw a line with the foreground color,
but instead just draw background.
2015-12-15 08:41:16 -05:00
Matthias Clasen
17be791b0b separator: port to gadgets
As part of this, stop using custom rendering code for wide
and non-wide separators.
2015-12-15 08:41:16 -05:00
Matthias Clasen
9e278293ca spinner: Use a gadget
This gives us min-width/height support. Currently, the spinner
still has a hardcoded minimum size of 16 and doesn't grow beyond
32. We may want to revisit that at some point.
2015-12-15 08:41:16 -05:00
Matthias Clasen
fffa84b843 progressbar: Convert to gadgets
Use gadgets for the text, the trough and the progress.
2015-12-15 08:41:16 -05:00
Benjamin Otte
1f6efbf669 iconhelper: Queue resize on invalidation
When things change in the iconhelper, queue a resize on the owner widget
so that it automatically resizes.

Only do this for iconhelpers that are used as gadgets though, not for
temporary helpers - and to check this, check if the node is transient.
2015-12-15 08:41:16 -05:00
Benjamin Otte
3a77da9df2 entry: Turn icons into gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
4dee06e04f spinbutton: Port the buttons to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
4586503e93 iconhelper: Finish gadget conversion
Implement missing vfuncs
2015-12-15 08:41:16 -05:00
Benjamin Otte
e723fccaa9 rendericon: Restore cairo matrix after rendering 2015-12-15 08:41:16 -05:00
Benjamin Otte
b79a187d47 iconhelper: Handle invalidation
When CSS, direction or scale factor change, handle the invalidation
inside the iconhelper.
This way the widgets using them don't have to.
2015-12-15 08:41:16 -05:00
Benjamin Otte
de6dca4f81 iconhelper: Use the gadget's node
... instead of looking at the widget's style context.

This removes all calls to the style context.
2015-12-15 08:41:16 -05:00
Benjamin Otte
ad22612ab2 iconhelper: Require passing a cssnode to the constructor
Note that we don't use it yet.
2015-12-15 08:41:16 -05:00
Benjamin Otte
7075d00958 iconhelper: Use the gadget's owner property
Don't keep the owner widget ourselves.
2015-12-15 08:41:16 -05:00
Benjamin Otte
25ecd8cd37 iconhelper: Turn into gadget
This is just the basic conversion to inheriting from
GTK_TYPE_CSS_GADGET.
2015-12-15 08:41:16 -05:00
Matthias Clasen
c0fd106019 image: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
49fea0b0f5 box: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
7a05016d93 container: Split out a function
Computing the clip for all children is something I want to do in other
places.
2015-12-15 08:41:16 -05:00
Benjamin Otte
0f8233bd7b switch: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
e09eb4fc9f gadget: Add GtkCssCustomGadget
The thing you use when you want to custom-do everything.
2015-12-15 08:41:16 -05:00
Benjamin Otte
6eafe00d8f gadget: Add the concept of a "gadget"
A gadget is halfway between a widget and a CSS node. It's supposed to
provide the minimum convenicence around CSS nodes until we've figured
out how to integrate them with widgets.
2015-12-15 08:41:16 -05:00
Benjamin Otte
0fb01decba css: Add min-width/height CSS properties 2015-12-15 08:41:16 -05:00
Benjamin Otte
a920f7260c treeview: Reposition dnd button css node properly
After the drag ends, the button node went to the wrong place and then
looked like a regular button. Fix that.
2015-12-15 08:41:16 -05:00
Chun-wei Fan
c049581f79 MSVC builds: Build more tools in gtk/
Build the gtk-update-icon-cache, gtk-builder-tool and gtk-query-settings
tools and run gtk-update-icon-cache as part of the post-build
"installation" process.

Pointed out (and reminded) by Paolo Borelli in bug 759436 that we should
build, "install" and run gtk-update-icon-cache in the MSVC builds as well.
2015-12-15 15:37:33 +08:00
Benjamin Otte
26d536a69b inspector: Fix quick-fix
Constructing GtkCssStyleChange objects without styles is forbidden, so
don't do it. Instead untangle the callback from the actual update
function and call that untangled function directly.
2015-12-15 01:15:51 +01:00
Benjamin Otte
f6606c4f6f cssnode: Clear cache if reusing style
When we reuse styles that didn't change across changes to the source
CSS, make sure we clear the caches. Otherwise child nodes will pick up
styles from the old source CSS.
2015-12-15 01:15:51 +01:00
Piotr Drąg
220d2620e4 Updated POTFILES.in 2015-12-15 00:51:33 +01:00
Carlos Garnacho
5d6a2ae54f win32: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:22 +01:00
Carlos Garnacho
af54b82c0a quartz: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:21 +01:00
Carlos Garnacho
321154eb4b broadway: Use GdkSeatDefault to Implement GdkSeat 2015-12-15 00:40:21 +01:00
Carlos Garnacho
a33aefc281 wayland: Improve creation of windowing surface roles
We no longer need a grabbed seat, instead we'll just use the default
seat if this happens, not without first warning and recommending
gdk_seat_grab() for the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
c7280e4a31 wayland: Replace deprecated functions
We can just gdk_seat_ungrab() here.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
4065bd1e96 gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab()
GdkSeat is now the preferred way to deal with input devices and grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
3009eac85e wayland: Emit cancelled on touchpoint used on window dragging/moving
This allows GDK to unset the grab itself. Also, make sure we unset
the "pointer emulating" touch on the device if this is the
pointer emulating sequence.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
77cf80f3a9 wayland: Unset "pointer emulating" touch on wl_touch.cancel
And emit the corresnponding leave event on its master pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
fc19a999ec gdk: Manage GDK_TOUCH_CANCEL events on gdk_windowing_got_event()
These events must get active/implicit grabs undone, and can be done
on client-side code.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
09947a63ed wayland: Make gdk_wayland_device_get_focus() work on touch
So we can figure out the focus for the master device.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
8ec3fb39a2 GdkDisplay: Add ::seat-added/removed signals
These will be emitted as seats come and go.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
17525ef7a6 wayland: Add GdkSeat implementation
GdkWaylandDeviceData conceptually gathers the data that belongs to
a seat, so it's been renamed (although the old typedef stays, plenty
of refactoring is due here...).

The methods in GdkSeatClass have also been implemented, the most
remarkable is ::grab, which ensures the grab is performed on all
the relevant "master" devices.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
f663d17c14 GtkTreeView: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:56 +01:00
Carlos Garnacho
91b5497d69 GtkNotebook: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:56 +01:00
Carlos Garnacho
fad174b967 GtkEntryCompletion: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
534b0af512 GtkComboBox: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
d54f208d29 GtkMenu: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
5cbbb90e31 GtkCellRendererAccel: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
e4eeec2163 GtkButton: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
d236fd7aab x11: Use GdkSeatDefault to implement GdkSeat
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
6e8d5f70db x11: Use gdk_event_set_device() consistently
Move the variable definitions above the function, and use those
throughout all branches of the event handling switch.
2015-12-15 00:16:15 +01:00
Carlos Garnacho
da6d52711a GdkEvent: Add GdkSeat getter and internal setter
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
6f4edc091b GdkDisplay: Add GdkSeat getters
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
d24f63e9ce GdkDevice: Add GdkSeat property and getter
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
0472c088a1 gdk: Add GdkSeatDefault
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
8d68f59bef gdk: Add GdkSeat
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
3733e53c1a x11: Use client pointer as default core pointer for gtk+2 API
There is no need to fiddle with the master devices list.

https://bugzilla.gnome.org/show_bug.cgi?id=759323
2015-12-15 00:04:20 +01:00
Lucas Baudin
306ee6d9a5 wayland: recursively search for the settings schema.
On some systems, the gtk settings are not used properly for wayland.
Indeed, g_settings_schema_source_get_default is used, and as the docs says it,
"all lookups performed against the default source should probably be done
recursively.".

https://bugzilla.gnome.org/show_bug.cgi?id=759409
2015-12-14 08:20:04 -05:00
Dušan Kazik
0bfd012f04 Updated Slovak translation 2015-12-14 10:53:55 +00:00
Piotr Drąg
3d537b0518 Updated POTFILES.in 2015-12-14 01:45:11 +01:00
Matthias Clasen
a22c1ec980 dnd: Cleanups
Remove some now unused includes and dead code, and rename
gtk_drag_set_icon_window to gtk_drag_set_icon_widget_internal,
since it is no longer restricted to toplevel windows.
2015-12-13 18:24:41 -05:00
Matthias Clasen
934941d95d testdnd2: Add some verbosity
This makes it easier to see that we're missing some signals
under Wayland.
2015-12-13 16:02:02 -05:00
Matthias Clasen
95f648147d dnd: Stop doing cancel animation in GTK+
Under Wayland, the compositor does it, so there is no need
for us to move the window ourselves. For X11, we are now
doing the animation from the X11 backend. Trigger that by
calling gdk_drag_drop_done().

What changes here is that we have to keep the icon_window
alive for as long as the drag context exists. Use a weak
reference to do so.
2015-12-13 16:02:02 -05:00
Matthias Clasen
23b2b49321 x11: Implement drag cancel animation
Showing the drag cancel animation can be done in the X11
drag context implementation now that we hold the drag
window there, and have the start coordinates.

Since we can't control if and when the application destroys
the drag widget, we take a snapshot of the window contents
and display that during the animation. This should be good
enough for all practical purposes.
2015-12-13 15:49:25 -05:00
Matthias Clasen
c590b83397 gdk: Add gdk_drag_drop_done
This will allow us to move the drag cancel animation to GDK.
For now, it does nothing.
2015-12-13 10:39:43 -05:00
Matthias Clasen
ed89e5f62a x11: Store drag start coordinates
These will be used in later commits.
2015-12-13 10:39:43 -05:00
Matthias Clasen
a24bbcbb8d dnd: Pass start coordinates when creating the drag context
This will be used in subsequent commits.
2015-12-13 10:39:43 -05:00
Matthias Clasen
268c7a3e44 gdk: Allow passing the start coordinates in drag_begin
Add a variant of gdk_drag_begin that takes the start position
in addition to the device. All backend implementation have been
updated to accept (and ignore) the new arguments.

Subsequent commits will make use of the data in some backends.
2015-12-13 10:39:43 -05:00
Benjamin Otte
eb97ef0514 cssnode: Set new style if it's animated
In commit 2c61316677 we avoided emitting
the style-changed signal if no CSS property changed.

Unfortunately, this also caused CSS styles to not be updated when
animations started if those animations did not change any CSS value
immediately. In those cases the animation would just never start.
The obvious example was the spinner.
2015-12-13 16:12:39 +01:00
Daniel Mustieles
b22a07ec66 Updated Spanish translation 2015-12-13 13:31:25 +01:00
Daniel Mustieles
ee8d484835 Updated Spanish translation 2015-12-13 13:31:15 +01:00
Pedro Albuquerque
49145981b8 Updated Portuguese translation 2015-12-13 08:16:32 +00:00
Benjamin Otte
5cbbc62026 widget: Pass a GtkCssStyleChange instead of a bitmask 2015-12-13 04:11:58 +01:00
Timm Bäder
c219bdbecc Gestures: Add some nullable annotations 2015-12-12 09:29:08 +01:00
Timm Bäder
c3fd1b3b73 GtkFlowBox: Add missing nullable annotation 2015-12-12 09:29:08 +01:00
Timm Bäder
c02f68f0ba GtkFlowBox: Fix copy/paste mistake in docs 2015-12-12 09:29:08 +01:00
Benjamin Otte
776f034e2d cellrendererpixbuf: Don't set icon size for pixbufs
The code before the refactorings didn't set it, so we now don't set it
either.

Fixes images being way too smal inside iconviews.
2015-12-12 03:24:32 +01:00
Benjamin Otte
2c61316677 cssnode: Catch case where a style didn't change
Catch the case where a CSS style did not change and don't emit the
style-changed signal in that case.

This saves not only the emission of the signal, but also doesn't cause
invalidation in child nodes, which would previously get a PARENT_STYLE
2015-12-12 02:16:04 +01:00
Benjamin Otte
971a277419 cssnode: Change style-changed signal
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.

This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
2015-12-12 02:16:04 +01:00
Matthias Clasen
0ad259a178 inspector: Hide request mode for non-widgets
Only widgets have a request mode.
2015-12-11 17:12:44 -05:00
Lapo Calamandrei
bb16ba7e31 Adwaita: menu color change on the dark variant only 2015-12-11 21:08:53 +01:00
Matthias Clasen
fb937984af file chooser: Also apply the settings
I forgot that the settings object we're dealing with here
is in delay mode, so settings won't apply immediately.
2015-12-11 12:25:31 -05:00
Matthias Clasen
d4654dd10b file chooser: Store size more frequently
We were only storing the dialog size on unmap, but resetting to the
stored default value more often, e.g. on focus-out. This was causing
the dialog to 'jump back' to its remembered size after the user
manually resized it, leading to frustration and bug reports.

Instead, save the dialog size on every ::size-allocate of the toplevel.
To avoid needlessly spamming dconf, only write the new value if it
changed.
2015-12-11 12:15:03 -05:00
Matthias Clasen
a8a33b71e4 Add a drag-end callback
This will be helpful in figuring out life-cycle issues
with icon widgets.
2015-12-11 10:50:25 -05:00
Matthias Clasen
c418ca451b Add a dnd testcase
This has tests for drag images, widgets, hotspots.
2015-12-11 10:44:46 -05:00
Jonas Ådahl
561833334b wayland: Implement DND icon hotspot API
In Wayland, the hotspot of a DND icon is set using the buffer offset in
wl_buffer.attach. To implement this, add a private API to cause the
next wl_surface.attach to offset the new buffer with a given offset.
Setting a DND icon hotspot sets this offset while also queuing a redraw
of the window to trigger the wl_surface.attach.

https://bugzilla.gnome.org/show_bug.cgi?id=759168
2015-12-11 09:16:46 -05:00
Georges Basile Stavracas Neto
8884e82af8 placesviewrow: remove unneeded functions
These function declarations are not used nor implemented
anywhere, so remove them.
2015-12-11 02:28:39 -02:00
Matt Watson
ae487840f0 gtkstack: remove needless queue_resize
In gtk_stack_set_transition_position we should only need to
queue_resize if we are non-homogeneous, which is already done
earlier in the function.
2015-12-10 16:51:29 -08:00
Georges Basile Stavracas Neto
67125ae4e0 placesview: implement available space
GtkPlacesView is a widget to display locations
in the computer, such as root ("/") and volumes,
separating the persistent devices from removable
ones.

From the latest mockups[1], GtkPlacesView would
display the available space of local drives like
partitions. This, however, is not implemented in
the current codebase.

Fix that by implementing the measurement of disk
space, and adding a new property GtkPlacesView::show-disk-usage
which controls the visibility of measured disks.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/nautilus/nautilus-next/other-locations.png

https://bugzilla.gnome.org/show_bug.cgi?id=759225
2015-12-09 20:30:10 -02:00
Cosimo Cecchi
5f45878133 statusicon: plug memory leak 2015-12-09 10:45:26 -08:00
Lapo Calamandrei
191b9d84fa Adwaita: make menu bg color the same as popovers
fixes https://bugzilla.gnome.org/show_bug.cgi?id=759260
2015-12-09 18:56:38 +01:00
Lapo Calamandrei
d266151fee Adwaita: another try at color tweakings... 2015-12-09 17:43:40 +01:00
Lapo Calamandrei
f51dfb7af8 Adwaita: some more color tweaks and sass simplification 2015-12-09 17:38:38 +01:00
Lapo Calamandrei
07506a9088 Adwaita: fix popover styling
...in the process simplified the touch-selection styling, check
and radios not fixed there since I'm going to add proper osd assets
for those (istead of forcing the dark variant assets there as before).
2015-12-09 14:54:15 +01:00
Benjamin Otte
861ac8e373 iconhelper_ Don't use deprecated functions
Use gtk_widget_get_direction() instead of
gtk_style_context_get_direction().
2015-12-09 13:30:40 +01:00
Benjamin Otte
ccfc4d3f12 iconhelper: Remove the context argument
Instead, use the widget's context.
2015-12-09 13:30:40 +01:00
Benjamin Otte
e95e2d5048 iconhelper: Get rid of _gtk_icon_helper_set_window()
Instead use the window of the owner widget.
2015-12-09 13:30:40 +01:00
Benjamin Otte
c9d1a45d30 iconhelper: Require a widget as construction argument
Note that the caller needs to ensure the widget lives as long as the
iconhelper as the iconhelper will not ref the widget.
2015-12-09 13:30:40 +01:00
Benjamin Otte
ee5758a4e1 statusicon: Port from iconhelper to imagedefinition 2015-12-09 13:30:40 +01:00
Benjamin Otte
866e7dc733 cellrendererpixbuf: Create iconhelper on-demand
Instead of storing one in the priv structure, only store an image
definition there.

This will allow future refactorings of the icon helper.
2015-12-09 13:30:40 +01:00
Benjamin Otte
01387428a3 iconhelper: Pass only the CssStyle when loading pixbufs 2015-12-09 13:30:40 +01:00
Benjamin Otte
6afeab4313 iconhelper: Remove unused GtkStyleContext parameters 2015-12-09 13:30:40 +01:00
Benjamin Otte
cf77c1695d iconhelper: Pass only the CssStyle when loading iconsets 2015-12-09 13:30:40 +01:00
Benjamin Otte
88a490fe58 iconfactory: Move private functions into private header 2015-12-09 13:30:40 +01:00
Benjamin Otte
ee6e685478 iconhelper: Pass only the CssStyle when loading icons
This is the first step in replacing StyleContext usage with CssNode
usage.
2015-12-09 13:30:39 +01:00
Matthias Clasen
8edbbde127 toolitem: Set a css name 2015-12-08 20:53:56 -05:00
Sébastien Wilmet
e2d1042b6b Don't use gtk_text_iter_begins_tag() (deprecated)
Use gtk_text_iter_starts_tag() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=759092
2015-12-08 19:56:57 +01:00
Sébastien Wilmet
1dcb3a0f88 textiter: add starts_tag() and deprecate begins_tag()
The name gtk_text_*_begins_* was used only for begins_tag(). All other
similar functions use "starts": starts_line(), starts_word(), etc.

So for consistency, add gtk_text_iter_starts_tag() and deprecate
gtk_text_iter_begins_tag().

Also change (allow-none) to (nullable), to use the new annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=759092
2015-12-08 19:55:53 +01:00
Matthias Clasen
28ae8a3608 Revert "wayland: Implement DND icon hotspot API"
This reverts commit 3ab9d96623.

Pushed prematurely.
2015-12-08 13:04:17 -05:00
Kalev Lember
d4f841049d Remove GtkShortcutsGesture from docs
Commit c83ab24 that dropped GtkShortcutsGesture left in one last reference in
docs; this drops it as well.
2015-12-08 18:51:05 +01:00
Matthias Clasen
8dfad8e2f0 gtk-demo: Add an example for direction-dependent shortcuts 2015-12-08 12:32:00 -05:00
Jonas Ådahl
3ab9d96623 wayland: Implement DND icon hotspot API
In Wayland, the hotspot of a DND icon is set using the buffer offset in
wl_buffer.attach. To implement this, add a private API to cause the
next wl_surface.attach to offset the new buffer with a given offset.
Setting a DND icon hotspot sets this offset while also queuing a redraw
of the window to trigger the wl_surface.attach.

https://bugzilla.gnome.org/show_bug.cgi?id=759168
2015-12-08 11:47:07 -05:00
Khaled Hosny
0164256aec Update Arabic translation 2015-12-08 10:59:07 +04:00
Kalev Lember
9103707922 headerbar: Don't leak internal widgets
Make sure to clean up internal widgets in destroy, as these aren't
cleaned up when GtkContainer walks the childrens list in
gtk_container_destroy().

This also fixes a gedit crash as reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1288669

https://bugzilla.gnome.org/show_bug.cgi?id=759132
2015-12-07 22:15:25 -05:00
Matthias Clasen
7d1a0b075d Trivial code restructuring 2015-12-07 21:57:45 -05:00
Matthias Clasen
bf7a7a5f3d dnd: pass hotspot to GDK
This uses the new api introduced in the previous commits.
2015-12-07 21:54:55 -05:00
Matthias Clasen
3b4bfba37d wayland: Add a dummy implementation of gdk_drag_context_set_hotspot
This just records the hotspot coordinates. Still to do:
apply the hotspot when updating the drag window.
2015-12-07 21:53:38 -05:00
Matthias Clasen
475f6e09b1 x11: Implement gdk_drag_context_set_hotspot
This makes the drag behavior under X11 match what we had previously.
2015-12-07 21:52:51 -05:00
Matthias Clasen
f4ebdb64ee gdk: Add api to set drag window hotspot
With GdkDragContext now being in charge of placing the window,
it needs to know about the hotspot to place under the cursor.
2015-12-07 21:52:03 -05:00
Matthias Clasen
08ecf19907 dnd: Remove an unused struct field
We only have one screen nowadays, so the fallback_icon is
never used.
2015-12-07 21:15:23 -05:00
Carlos Garnacho
c0477c2c52 GtkNotebook: Use gdouble in coordinate calculations
Otherwise rounding errors fool the "tab under coordinates" checks on
crossing events, which will be triggered close enough to the window
rectangle if the pointer moves slowly enough.

With this, the tab_prelight() function correctly figures out we've
moved the pointer outside the tab area when called in
gtk_notebook_leave_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=759091
2015-12-07 17:40:01 +01:00
Adam Reichold
5088b4937e Fix method to update menu sensitivity of combo box
After removal of the selectable header and separator from the combo box,
the method to update the menu sensitivity must be changed as it assumes
at least two items within each sub menu and contains special handling
for the separator. Removing this fixes bug #759079.
2015-12-07 11:23:18 -05:00
Matthias Clasen
f7cc4abbad Avoid ugly seams on half-tiled terminals
Since we're no longer doing geometry widgets, don't send
base size and increments to the window manager anymore either.
This avoids an ugly 2 pixel gap to the right and bottom of half-tiled
terminals under gnome-shell.
2015-12-07 10:11:06 -05:00
Matthias Clasen
88c4d06973 accel cellrenderer: Fix rendering
We were getting the "New Accelerator" text mixed with the
content of the underlying cell, since plain labels don't
have a background. Go back to putting the label in selected
state, and fix the theme to render that white-on-blue. This
was lost when we switched to using a selection sub-node.
2015-12-07 07:04:43 -05:00
Erika
05dd21be88 Correct annotations for gtk_cell_layout_get_area
The function can return NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759081
2015-12-07 06:16:59 -05:00
Matthias Clasen
326f4739ca inspector: Redo the CSS node page
Showing two lists in a paned was a bit awkward, and space was
getting too limited. Go back to showing just the node list at
first, and make the CSS properties available via a stack. At
the same time, add a right-click context menu to the node list
to make the name and class editing more easily available.
2015-12-06 23:06:33 -05:00
Matthias Clasen
6f1c945010 inspector: Avoid a crash
gkt_cell_layout_get_area may return NULL, handle it.
2015-12-06 17:25:31 -05:00
Matthias Clasen
9c73603c16 css node: Some more docs 2015-12-06 15:42:13 -05:00
Matthias Clasen
2188fe0e54 places view: Use names for cursors
Use the standard name for the busy+interactive cursor.
2015-12-05 19:18:27 -05:00
Matthias Clasen
f76fa0411f entry: Always use cursor names
The names are the preferred API for cursors, so use it.
2015-12-05 19:17:52 -05:00
Matthias Clasen
64431a17e3 Add a test for required cursors
We use these cursors in GTK+, so check for their existence.
2015-12-05 19:09:17 -05:00
Matthias Clasen
93b3669273 Be forgiving if cursors are missing
No need to crash here. Missing cursors are ugly, but we
shouldn't crash.
2015-12-05 18:55:05 -05:00
Matthias Clasen
6915aba952 Add more examples to foreigndrawing
Show how to draw checks and radios.
2015-12-05 17:09:59 -05:00
Dušan Kazik
2c03ab48eb Updated Slovak translation 2015-12-05 19:38:36 +00:00
Matthias Clasen
c73325c6b0 entry completion: Reduce the timeout
Pop up the completion window after 100ms. The previous timeout
of 300ms was making completions feel slow.

https://bugzilla.gnome.org/show_bug.cgi?id=758929
2015-12-05 14:12:27 -05:00
Matthias Clasen
63c4b9226c widget-factory: Add an entry completion
This was missing so far.
2015-12-05 14:11:06 -05:00
Matthias Clasen
12dbfe026f shortcuts: Another attempt to fix up forall
gtk_window_set_titlebar does not take ownership of the headerbar,
so we need to explicitly destroy it.
2015-12-05 13:53:23 -05:00
Matthias Clasen
6fdc6cb313 gtk-demo: Plug a memory leak 2015-12-05 13:53:23 -05:00
Piotr Drąg
0c1d46dca5 Updated POTFILES.in 2015-12-05 19:27:32 +01:00
Matthias Clasen
c83ab24237 Remove GtkShortcutsGesture
The gesture functionality was taken over by GtkShortcutsShortcut,
so this widget is no longer needed, and it never was in a stable
release, so lets get rid of it.
2015-12-05 12:10:21 -05:00
Lapo Calamandrei
830b6f10a1 Adwaita: simpler active switch background
...removing the progressbar_fill mixin in the process.
2015-12-05 17:56:32 +01:00
Lapo Calamandrei
8f2cd874f1 Adwaita: first stab at some visual updates 2015-12-05 17:56:32 +01:00
Piotr Drąg
124932c8d7 Updated Polish translation 2015-12-05 15:28:37 +01:00
Wolfgang Stöggl
17ac9c27b1 Updated German translation 2015-12-05 12:18:51 +00:00
Pedro Albuquerque
11241ae783 Updated Portuguese translation 2015-12-05 07:48:40 +00:00
Pedro Albuquerque
b07830ebaf Updated Portuguese translation 2015-12-05 07:46:31 +00:00
Matthias Clasen
6f061b139d 3.19.4 2015-12-04 17:01:03 -05:00
Matthias Clasen
f210dc9281 Fix make check
GtkFontChooserWidget is using a GThemedIcon in its template,
so we need to ensure that the type is registered before
loading it. This was causing the defaultvalue test to fail.
2015-12-04 17:01:03 -05:00
Lionel Landwerlin
55e06e5d52 adwaita: fix property spelling mistake
https://bugzilla.gnome.org/show_bug.cgi?id=759048
2015-12-04 21:04:06 +00:00
Timm Bäder
ecc5342b0d GtkEntry: Recompute in text-inserted/text-deleted
The text-inserted/text-deleted handlers rely on the cursor positions
being unadjusted after the text change, so we can't do it in
buffer_notify_text.
2015-12-04 20:41:16 +01:00
Matthias Clasen
f19cadeaf3 testsuite: Fix notify tests
GtkStatusIcon tests don't work well under xwayland either, so just
skip them unconditionally.
GtkEntry now fails because the update of the im-module is no longer
deferred to an idle, and (gtk-im-simple) is not a valid module
name, so skip this property.
2015-12-04 13:22:26 -05:00
Matthias Clasen
03769e3830 shortcut label: Tweak modifier key rendering
The subscript was affecting the vertical alignment too much,
so tweak the rendering of the L/R markers to avoid that. Also,
mark these as translatable.
2015-12-04 13:22:26 -05:00
Matthias Clasen
27b24bb68f Add a css name to GtkShortcutsShortcut
This will be useful for tweaking the gesture image details,
among other things.
2015-12-04 13:22:26 -05:00
Lapo Calamandrei
5cb06a30a0 Adwaita: added back progressbar.osd style 2015-12-04 19:04:17 +01:00
Lapo Calamandrei
c64452c29d Adwaita: fix scales with marks on the dark variant 2015-12-04 18:47:28 +01:00
Lapo Calamandrei
cfc17a0152 Adwaita: slight color tweaks 2015-12-04 18:43:24 +01:00
Benjamin Otte
05bdecb2f8 reftests: Add test for missing-image handling
Add a test that ensures that missing images get the icon-effect properly
applied.
2015-12-04 17:44:51 +01:00
Benjamin Otte
d14e2a489a iconhelper: Fold function into callers
The function takes so many arguments and is so short that it's not worth
keeping.
2015-12-04 17:44:51 +01:00
Benjamin Otte
72d4b65b1d iconhelper: Apply icon-effect directly
Instead of creating an icon source, making sure no state is set and
therefore the icon-effect will be applied and then rendering that icon
source, just call the icon-effect apply function.

Also, the new way isn't deprecated.
2015-12-04 17:44:51 +01:00
Benjamin Otte
1b835fc7ce css: Leftover renaming gtk-image-effect => icon-effect
The previous renaming commit was incomplete, so here we go again.
2015-12-04 17:44:51 +01:00
Benjamin Otte
a37220109f render: Split out icon-effect apply function 2015-12-04 17:44:51 +01:00
Benjamin Otte
cefba86fb3 iconhelper: Return surface from icon-effect function
All the callers where converting to a surface anyway.
2015-12-04 17:44:51 +01:00
Benjamin Otte
295f208e1c iconhelper: Refactor missing icon handling
In particular, stop using deprecated code for loading the missing image
icon.
2015-12-04 17:44:51 +01:00
Benjamin Otte
3c54a49633 iconhelper: Fold function into only caller 2015-12-04 17:44:51 +01:00
Benjamin Otte
b8dd24b4fb iconfactory: Drop caching infrastructure
- icon sets are essentially unused
- the icon theme does caching
- this code complicates the restructuring I'm about to do

=> Delete it!
2015-12-04 17:44:51 +01:00
William Hua
d2ef875e09 mir: remove deprecated function call 2015-12-04 11:17:43 -05:00
Matthias Clasen
8768c0b8ac shortcuts: Extend the accelerator syntax more
Cover cases like left+right control, and render them nicely.
The gtk3-demo builder shortcuts example shows the new
possibilities.
2015-12-04 10:56:48 -05:00
Olivier Fourdan
7fc493a8a8 wayland: fix testtooltips
On Wayland, for tooltips to work as expected, the type hint must be set
to tooltips, otherwise the popup window won't be translated as a
subsurface.

Fix the test do work as expected under Wayland.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759018
2015-12-04 13:17:29 +01:00
Lionel Landwerlin
bd332f10ab gdkoffscreenwindow: use embedder to derive surfaces & scale factor
In Gdk, a GdkOffscreenWindow parent has to be the root window. This is
problematic on Wayland because the root window doesn't necessary have the
right information with regard to scale factor.

This patch proposes to rely on the embedder, if available, to derive
surfaces as well as getting the scale factor.

https://bugzilla.gnome.org/show_bug.cgi?id=758936
2015-12-03 21:47:29 +00:00
Timm Bäder
3ba11782db GtkEntry: nullable annotations 2015-12-03 20:20:58 +01:00
Timm Bäder
da477575cd GtkEntry: Return proper constants from signal handlers 2015-12-03 20:01:30 +01:00
Timm Bäder
d86ec52547 GtkTreeModel: Remove erroneous transfer annotation 2015-12-03 20:01:30 +01:00
Timm Bäder
f11f989f1f GtkEntry: Remove recompute idle
Just do it directly
2015-12-03 20:01:30 +01:00
Timm Bäder
cfc23cbf32 GtkEntry: Remove unused fields 2015-12-03 20:01:30 +01:00
Lapo Calamandrei
07ee962ed3 Adwaita: some OSD rationalization
taking care of https://bugzilla.gnome.org/show_bug.cgi?id=732528 in
the process, any toolbar.osd with a positional style class attached
gets squared corners now.
2015-12-03 19:28:57 +01:00
Lapo Calamandrei
d46ab0f62a Adwaita: scale with marks styling
I'm really sorry for the unlucky ones who would have to read that
code...
2015-12-03 18:41:35 +01:00
Lapo Calamandrei
37c943c8cd Adwaita: added back scale marks style 2015-12-03 18:41:35 +01:00
Benjamin Otte
52ba39ba73 tests: Rework some foreigndrawing code
Instead of specifying the full path everytime, just specify the parent
style context and then use its path.
2015-12-03 14:43:56 +01:00
Matthias Clasen
ec5baa144d Update gtk_drag_highlight() docs
What they said was no longer true.
2015-12-03 08:37:58 -05:00
Matthias Clasen
36d5d29af6 Simplify foreign drawing example a bit 2015-12-03 07:55:57 -05:00
Lapo Calamandrei
234c497474 Adwaita: scale fill style 2015-12-03 12:57:02 +01:00
Sebastien Bacher
635da34908 GtkAppChooserWidget: wrap the label, use a standard icon
Let the label wrap if needed, that's required in some locales, use an
icon which is available in the theme

https://bugzilla.gnome.org/show_bug.cgi?id=758908
2015-12-03 12:45:56 +01:00
Lapo Calamandrei
081bdb07c3 Adwaita: rename scale sass templates to be more specific 2015-12-03 11:43:53 +01:00
Lapo Calamandrei
b7a980d5d8 Adwaita: added back style for scales on selected list rows 2015-12-03 11:38:50 +01:00
Lapo Calamandrei
a291003ad4 Adwaita: first stab at GtkScale and GtkProgressBar rewrite
...scale has marks stuff missing, coming soon.
2015-12-03 10:54:33 +01:00
Benjamin Otte
3ed71cf4a7 window: Deprecate gtk_window_resize_to_geometry()
And make it not do anything anymore.

Fixes erratic resizes of gnome-terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=757282
2015-12-03 10:43:57 +01:00
Olivier Fourdan
de41389352 gtkwindow: Document further resize with csd
Applying the client-side decorations in the configure routine greatly
increases the chances of having the right size for the GtkHEaderBar and
border shadows.

Yet, it may be possible that these sizes change at a later point in
time, if for example the GtkHeaderBar grows in height while adding new
controls.

Mention this possible pitfall in the documentation for
gtk_window_resize().

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-03 09:16:29 +01:00
Matthias Clasen
058dfb0723 entry: Use regular drag highlight
The entry code passes GTK_DEST_DEFAULT_HIGHLIGHT when setting
up the drop target, but that is ineffective because of the
custom drag_motion implementation. Instead, call
gtk_drag_[un]hightlight ourselves.
2015-12-02 23:52:55 -05:00
Matthias Clasen
0b9136842d Use :dnd pseudoclass for drag highlighting
Instead of a ::draw handler with a hardcoded outline,
use CSS for drawing the highlight.
2015-12-02 23:49:07 -05:00
Matthias Clasen
cbde3ee01f css: Add a :dnd pseudoclass
This will be used for drag highlighting.
2015-12-02 23:23:36 -05:00
Matthias Clasen
574246a3d8 Add a selected text example 2015-12-02 23:10:56 -05:00
Matthias Clasen
16eed47e87 Make foreign drawing example work
Set up multiple style contexts to get inheritance right.
2015-12-02 21:32:45 -05:00
Matthias Clasen
09c74f958d Add another hand-drawn scrollbar
This one is supposed to show up in active state, but doesn't.
2015-12-02 18:59:59 -05:00
Matthias Clasen
b5bcc299ad Add an example of foreign drawing
This uses the gtk_render apis with a style context constructed
from a style path.
2015-12-02 18:49:07 -05:00
Benjamin Otte
7fa37e4bf8 css: Introduct -gtk-icon-palette
This borrows heavily from the CSS4 fonts draft's font-palette, currently
found at https://drafts.csswg.org/css-fonts-4/#font-palette-control

The palette is mainly meant to trigger invalidations when colors used for
symbolic icons change, to potentially allow extending supported colors
in symbolic icons and to recolor all colors of a symbolic icon, not just
the main one.

The syntax for the property goes like this:
Name:        -gtk-icon-palette
Value:       default | name <color> [ , name <color> ]*
Initial:     default
Applies to:  all elements with icons
Inherited:   yes
Animatable:  yes, each color animated separately

The property defines a list of named colors to be used when looking up
icons. If a name is not defined, the value of the current "color"
property is used. Which names are relevant depends on the icons in use.
Currently symbolic icons make use of the names "success", "warning" and
"error".

"default" is the current behavior of the GTK when coloring symbolic
icons and is equal to the string
  success @success_color, warning @warning_color, error @error_color

Animation is crudely implemented by animating colors that are in both
palettes that are animated and otherwise keeping the color from the
palette that defined it. Note that this can cause a sharp cut at the
beginning or end of the animation when the color goes away and will
therefore be replaced with the color property.

You can see an example of animations at
http://gfycat.com/CautiousPeacefulIaerismetalmark
2015-12-03 00:47:00 +01:00
Daniel Mustieles
109c3aa65a Updated Spanish translation 2015-12-02 21:08:41 +01:00
Timm Bäder
2b9d57f726 GtkRange: Return proper constants in signal handlers 2015-12-02 21:06:11 +01:00
Timm Bäder
5a6bac7831 GtkRange: Remove recalc_marks field
And instead recalculate the marks on demand, i.e. whenever we were
previously setting recalc_marks to TRUE.
2015-12-02 21:06:11 +01:00
Timm Bäder
414ffbb708 GtkRange: Use G_MININT as default mouse position, not -1
Otherwise we're getting MOUSE_WIDGET as mouse position for unmapped
GtkRanges.
2015-12-02 21:06:11 +01:00
Timm Bäder
591e7f5ef8 GtkScale: Add missing nullable annotations 2015-12-02 21:06:11 +01:00
Lapo Calamandrei
8efdd94a31 Adwaita: button.color fix
border-radius: 0 for colorswatch overlay as well.
2015-12-02 17:42:42 +01:00
Lapo Calamandrei
a25fa9922d Adwaita: vertically linked insensitive entries
Brighter border in that case as well.
2015-12-02 17:02:58 +01:00
Benjamin Otte
c10b6b7297 dnd: Add gtk_image_set_from_definition()
... and use it in the DND code, thereby getting rid of the icon helper.
2015-12-02 15:45:14 +01:00
Benjamin Otte
4d31bf91db dnd: No need to reset the icon
When we start a drag cancel animation, we can just keep the existing
window. The reset was only necessary to convert from cursor icon to
window and we removed the cursor handling.
2015-12-02 15:22:23 +01:00
Benjamin Otte
8a7dbe5f36 image: Remove unused code
I wonder how long that stuff has existed and not been used...
2015-12-02 14:56:15 +01:00
Benjamin Otte
c66a2057af image: Split out a function 2015-12-02 14:54:15 +01:00
Krzesimir Nowak
cbbaad4135 imagedefinition: Assert when trying to free empty definition
Empty definitions are not allocated on a heap, so doing a g_free() on
it would crash anyway.
2015-12-02 12:46:21 +01:00
Krzesimir Nowak
f6ce2cd975 cssprovider: Pass NULL unconditionally
We know that parent is NULL at this point.

Also, fix indentation.
2015-12-02 12:46:21 +01:00
Olivier Fourdan
e933233479 gtkwindow: apply CSD in configure size request
Just like we did for the default size, that reduces the chances of
having the headerbar missing or wrongly sized when computing the client
side decorations controls.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-02 08:41:31 +01:00
Matthias Clasen
0384f9eaf3 popover: Make position property not CONSTRUCT
There is no good reason for it, and it causes problems
with widget templates.
2015-12-02 01:07:02 -05:00
Matthias Clasen
564e11cc4e popover: Port to g_object_install_properties
And use the pspecs for notification.
2015-12-02 01:03:35 -05:00
Matthias Clasen
93d9c77ead dnd: Drop an unused argument 2015-12-02 00:51:47 -05:00
Matthias Clasen
676862a213 dnd: Some simplifications
We can now use a GtkImage instead of toplevel with
a custom draw callback and a specially prepared cairo
pattern.
2015-12-02 00:48:37 -05:00
Matthias Clasen
9fd6db87d2 Drop gdk_wayland_drag_context_get_dnd_window
This backend-specific and libgtk-only API is now unused,
so drop it.
2015-12-02 00:47:53 -05:00
Matthias Clasen
28b97ff0e9 dnd: Prevent black background in icons 2015-12-02 00:03:11 -05:00
Matthias Clasen
ae4f6da550 DND: Drop support for using rgba cursors as icons
This adds a lot of complication to the code, and is not really
a big win, since still need to support icon windows anyway.
2015-12-01 23:47:56 -05:00
Matthias Clasen
5bb12474d9 dnd: Fix issues with drag icons under Wayland
The Wayland dnd surface must remain in place until the drag
is over. Setting it directly as the hardcoded window of the
widget we construct carries the danger that it might get
destroyed prematurely, e.g. when the application calls
gtk_drag_set_icon_name more than once and we recreate the
widget.

Instead, create a dedicated toplevel, and reparent the widget
into it. To keep the code simple, we use the same approach
under X11 as well, and make it the responsibility of the
GDK dnd code to keep the window position updated. We already
pass the current pointer position to gdk_drag_motion, which
makes this very easy.

As a side-effect of these changes, it is now possible to use
non-toplevel widgets as drag icons.

https://bugzilla.gnome.org/show_bug.cgi?id=748763
2015-12-01 23:47:56 -05:00
Matthias Clasen
fff8297a50 Add gdk_drag_context_get_drag_window
This makes gdk_wayland_drag_context_get_dnd_window
backend-independent API and adds an implementation
for X11.
2015-12-01 23:47:56 -05:00
Benjamin Otte
d46b67dc79 widget: Don't update pango context in state_flags_changed
It only needs to be updated in style_updated, and we do it there.
2015-12-02 05:04:41 +01:00
Benjamin Otte
3513e5e87b Chain up in state_flags_changed
When introducing handlers for state_flags_changed in the node
transitions, chaining up was forgotten.
2015-12-02 04:36:31 +01:00
Benjamin Otte
da6beb994e css: Add ability to specify icontheme in CSS
-gtk-icontheme: "oxygen" works now.

This is a very crude implementation. It's meant for testing only.
2015-12-02 03:54:41 +01:00
Benjamin Otte
e1d74f7c71 window: Listen to icon theme changes on CSS
No need to connect a signal handler to the icon theme, we get notified
via CSS.
2015-12-02 03:28:36 +01:00
Benjamin Otte
bc1b53a34c css: Query icon theme from style, not from settings
No need to look at the settings when the CSS has a property for the icon
theme.
2015-12-02 03:18:26 +01:00
Benjamin Otte
d26a4b5555 spinner: Active spinners should be :checked, not :active
If that sounds confusing, it's because GTK and CSS can sometimes not
agree on naming.

:active for CSS means that a button is currently pressed on an element.
And that is clearly not the case for spinning spinners.
2015-12-02 00:39:25 +01:00
Benjamin Otte
8355ee3053 stylecontext: Don't emit state warning for transient nodes
It's fine to call set_state() on those.

https://bugzilla.gnome.org/show_bug.cgi?id=758930
2015-12-02 00:29:36 +01:00
Benjamin Otte
2396265523 css: Rename -gtk-image-effect to -gtk-icon-effect
This is a property for icons, so we should name it as such.
2015-12-02 00:29:31 +01:00
Benjamin Otte
7f93858ccc Stop using gtk_icon_size_lookup_for_settings()
Use the equivalent gtk_icon_size_lookup() instead.
2015-12-02 00:29:31 +01:00
Benjamin Otte
0c027937e8 iconhelper: Stop tracking state
The iconfactory code doesn't use it anymore, so we don't need to track
it either.
2015-12-02 00:29:31 +01:00
Benjamin Otte
6d65b7d772 iconfactory: Make state depend on image-effect
This removes the dependency on state, which should be used for selection
CSS styles, not for actually applying them.

And image-effect does exactly what we want already, so we can start
using it.
2015-12-02 00:29:30 +01:00
Benjamin Otte
6a4b91d0ed iconhelper: Remove _gtk_icon_helper_ensure_pixbuf()
The code isn't used anymore. Everything uses
gtk_icon_helper_load_surface() now.
2015-12-02 00:29:30 +01:00
Benjamin Otte
b411c31832 statusicon: Use gtk_icon_helper_load_surface()
This is in preparation for the next commit.
2015-12-02 00:29:30 +01:00
Benjamin Otte
7a154d9acd dnd: Add gtk_drag_set_icon_definition()
... and use it for entry icons.

As a side effect, icons dragged from entries will now resize to DND
size.
2015-12-02 00:29:30 +01:00
Benjamin Otte
4a42aa5229 imagedefinition: Remove icon-size
The size of icons is a property that is relevant to who is rendering the
icon, not to the icon itself.

Example: Starting a DND operation from an entry icon should cause the
icon to resize (from the entr icon's size to the DND icon size).
2015-12-02 00:29:30 +01:00
Benjamin Otte
e99eba4415 dnd: Rewrite iconhelper code
It now uses GtkImageDefinition instead.
2015-12-02 00:29:30 +01:00
Benjamin Otte
85423ea278 entry: Use gtk_icon_helper_load_surface()
This is the first step towards getting rid of pixbuf loading code in the
icon helper.
2015-12-02 00:29:30 +01:00
Benjamin Otte
482d71d680 iconhelper: Add a scale argument to gtk_icon_helper_load_surface()
It will be used in the next patch.
2015-12-02 00:29:30 +01:00
Benjamin Otte
afad393b15 iconhelper: Refactor ensure_surface()
Make gtk_icon_helper_ensure_surface() a private function that just
ensures the surface was loaded.

Add gtk_icon_helper_load_surface() that is called by the above function
and the dnd code to actually load the surface.
2015-12-02 00:29:30 +01:00
Benjamin Otte
2ce67f0098 iconhelper: Store surface in ensure_surface()
Do not assign it in the functions that actually load the surface. Make
those just return the surface.
2015-12-02 00:29:30 +01:00
Benjamin Otte
b2584eb8ed iconhelper: Don't store surface size
Instead, compute it on demand.

This avoids having to cache it in lots of places and simplifies code.
2015-12-02 00:29:29 +01:00
Benjamin Otte
751a1a9926 iconhelper: Move invalidation check
Just do the invalidation check once, there's no need to do it in every
branch of the switch.

Also remove useless checks: These functions will not be called if we
already have a rendered surface.
2015-12-02 00:29:29 +01:00
Benjamin Otte
3bacffd063 dnd: Use surface for dnd icon instead of pixbuf 2015-12-02 00:29:29 +01:00
Benjamin Otte
c601a9653a iconhelper: Move invalidation check
Just do the invalidation check once, there's no need to do it in every
branch of the switch.

Also remove useless checks: These functions will not be called if we
already have a rendered surface.
2015-12-02 00:29:29 +01:00
Benjamin Otte
afd0e28437 iconhelper: Improve size determination for surfaces
Instead of just working for image surface, this should now work for all
bounded surfaces.

Test included.
2015-12-02 00:29:29 +01:00
Benjamin Otte
071d2a1d69 iconhelper: Move size computation
We do a switch on the image type, so compute the size for a certain
image type right there.
2015-12-02 00:29:29 +01:00
Benjamin Otte
a81bdf1e60 image: queue_resize() after changing icon-size property 2015-12-02 00:29:29 +01:00
Benjamin Otte
1c96b703a6 dragsource: Store an itemdefinition, not an iconhelper
The icon is never rendered, so there's no need for the extra iconhelper
code.
2015-12-02 00:29:29 +01:00
Benjamin Otte
e666106a43 imagedefinition: Split out from icon helper
The image definition is supposed to hold the description about the image
to be displayed. The icon helper actually does caching and tracks
changes.
2015-12-02 00:29:29 +01:00
Benjamin Otte
67ab00e01e window: Remove suspicious branch
It seems this branch is not needed anymore. It was originally added in
1999 to support gtk_widget_realize(), but all those reasons seem
obsolete today.
Instead just call gtk_widget_realize().

If you end up at this commit when bisecting:
There is no bug that made me remove this code, it was purely meant to be
cleanup / dead code removal. I seem to have introduced a new bug or
bisecting wouldn't have let you here. So it seems we should just revert
this commit.
2015-12-02 00:29:29 +01:00
Benjamin Otte
d210ed7871 Revert "gdk_pixbuf_get_from_window: honor device scale"
This reverts commit 657a43e54e.

The commit breaks the assumptions about the arguments in both
gdk_pixbuf_get_from_window() and gdk_pixbuf_get_from_surface().

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-12-02 00:29:29 +01:00
Benjamin Otte
9a1913dfb0 wayland: Remove unused variable
Poor gcc was unhappy.
2015-12-02 00:29:29 +01:00
Matthias Clasen
e626038467 popover: Make it possible to constrain to toplevel
Under X11, popovers are always constrained to the toplevel
window. Under Wayland, they aren't. This commit adds a
property that allows to explicitly constrain popovers to
the toplevel, giving them the same behavior under Wayland
as under X11.

https://bugzilla.gnome.org/show_bug.cgi?id=757474
2015-12-01 17:26:25 -05:00
Christian Hergert
5dcf4e10b7 filechooserbutton: add some spacing between icon and text
These were a bit crammed, which doesn't match well with spacing used in
various other parts of gtk.
2015-12-01 11:23:12 -08:00
Olivier Fourdan
103d369ff6 gtkwindow: remove headerbar after disposing parent
Widgets such as gtkfilechooser may be saving their size and position on
the unmap callback, if the client-side decoration header bar is removed
first, the reported size will be wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-01 16:18:03 +01:00
Olivier Fourdan
f37aa415cd wayland: re-configure surface even if size matches
gdk-wayland backend would not re-configure a surface when its size and
scale match the known size and scale.

But there might be a pending xdg_surface_configure() that would revert
this change so we should re-configure even if the currently known
size/scale match, otherwise we may end up with a wrong size after the
xdg_surface_configure() is received.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=758901
2015-12-01 16:17:39 +01:00
Carlos Garnacho
1a394bd5ec wayland: Invert drop_finished/button release call order
If we "release" the button first, the drag will be eventually cancelled,
we must first signal GDK_DROP_FINISHED, and then release the button so
the success status prevails.
2015-12-01 15:49:13 +01:00
Carlos Garnacho
0ad927adca wayland: Store requested target on GdkWaylandSelection
It doesn't make a lot of sense to have this stored as data offer data,
rather together with the source_targets array, which is what we're
poking here in the end.

https://bugzilla.gnome.org/show_bug.cgi?id=758713
2015-12-01 15:49:13 +01:00
Timm Bäder
a28103cf51 Add some more missing nullable annotations 2015-12-01 13:41:35 +01:00
Timm Bäder
88b4955fd9 GtkBox: The center widget can be NULL
Propagates to GtkActionBar.
2015-12-01 13:41:35 +01:00
Timm Bäder
1551ad4908 GtkWidget: Add some missing nullable annotations 2015-12-01 13:41:35 +01:00
Matthias Clasen
150728d6b0 inspector: Show the size request mode
This is not a property, so show it in the misc page.
2015-11-30 22:27:27 -05:00
Matthias Clasen
d908c38ec3 window: Use g_set_object
No need to do the same thing manually.
2015-11-30 20:45:57 -05:00
Matthias Clasen
a3ce702a5a testentryicons: update dnd example
This code was #ifdefed out since 2008. Time to try it.
2015-11-30 18:41:33 -05:00
Matthias Clasen
4005f137a0 testentryicons: Use an existing icon name
dialog-info is not an existing icon.
2015-11-30 18:21:44 -05:00
Carlos Garnacho
4f9d0c06ef wayland: Refactor selection ownership
Dissociate ownership from our maintenance of wl_data_source objects.
The only place where ownership must be updated together is
data_source.cancelled, for the other places GDK should take care of
setting up the right ownership, even if at a different order than
we'd expect here.

This fixes GTK+ apps on wayland being locally confused about the
current selection ownership. Because gtk_selection_add_targets()
results in a wl_data_source being created, and ownership being
updated right away, early callers of this will change the ownership
even if the widget it's being called on didn't explicitly request
the selection ownership yet.

https://bugzilla.gnome.org/show_bug.cgi?id=758660
2015-11-30 20:37:25 +01:00
Sébastien Wilmet
1a8f3e2462 textiter: fix bug in case insensitive backward search
'win.lines' contains the same content as the GtkTextBuffer, so to find
@match_start, forward_chars_with_skipping() is called with
skip_decomp=FALSE (the last parameter). So far so good.

On the other hand, the content 'lines' (the needle split in lines) is
casefolded and normalized for a case insensitive search. So,
forward_chars_with_skipping(..., skip_decomp=TRUE) must be called only
for the portion of text containing the needle.

Since 'start_tmp' contains the location at the start of the match, we
can simply begin at that location to find the end of the match.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=758698
2015-11-30 19:46:16 +01:00
Florian Müllner
0a35886b0a listbox: Use :focus-on-click policy from row instead of list
Using the property from the container is inconsistent with the
:selectable and :activatable properties, which are per row.
2015-11-30 17:59:06 +01:00
Timm Bäder
d505a1af68 icon-browser: Stop using GtkMisc properties
Instead of xpad/ypad of 4 for every widget, just increase the
row-spacing and column-spacing by 8.

https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-11-30 17:31:49 +01:00
Timm Bäder
624cb5e016 icon-browser: Use proper "times" character
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-11-30 17:31:49 +01:00
Timm Bäder
91cafb8d08 icon-browser: baseline-align the icon size labels
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-11-30 17:31:49 +01:00
Matthias Clasen
373ce9f652 stack: Update windows before allocating children
Doing things the other way around seems to cause problems in
some cases where children want to do different things depending
on the window position.

https://bugzilla.gnome.org/show_bug.cgi?id=758563
2015-11-30 10:41:13 -05:00
Emmanuele Bassi
11eab60f43 scalebutton: Annotate the return type
Instead of just listing the return type of get_plus_button() and
get_minus_button() in the documentation, we can use the (type)
annotation to ensure that the introspection data reflects the actual
type of the returned widget.
2015-11-30 14:09:19 +00:00
Benjamin Otte
f30b4ba22e gtkwindow: fix regression with firefox dropdown menu
Fix a regression introduced by:

commit 6866d1c widget: Make gtk_widget_queue_allocate() not resize

Where the dropdown menu in Firefox would not be relocated after the
toplevel window is moved.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=758609
2015-11-30 14:32:39 +01:00
Timm Bäder
886686973c GtkScaleButton: _get_(plus|minus)_button returns a GtkButton
https://bugzilla.gnome.org/show_bug.cgi?id=539944
2015-11-28 21:09:53 +01:00
Pedro Albuquerque
af65114ea9 Updated Portuguese translation 2015-11-28 09:27:22 +00:00
Pedro Albuquerque
ebe1985ab0 Updated Portuguese translation 2015-11-28 09:21:52 +00:00
Piotr Drąg
c938263d17 Updated Polish translation 2015-11-27 23:30:20 +01:00
Matthias Clasen
8ea14162d3 Adwaita: No background for spinners
Blue background for spinners doesn't make sense.
2015-11-26 15:08:54 -05:00
Руслан Ижбулатов
3701a60401 GDK W32: Add a comment for clarity
This is a copy of a similar comment in another place, which explains
why WS_EX_TRANSPARENT windows get a special treatment.

https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-11-26 17:58:47 +00:00
Руслан Ижбулатов
8b7783ce21 GDK W32: Clarify the use of the second argument to SetWindowPos()
https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-11-26 17:58:46 +00:00
Руслан Ижбулатов
db1b24233e GDK W32: Don't use SetWindowLong() to set/unset WS_EX_TOPMOST
While searching for the cause of bug 746745 it was discovered that one could
not set WS_EX_TOPMOST extended window style with SetWindowLong(),
but must use SetWindowPos() for that purpose.

This was never a problem most likely because it is highly unlikely for windows
to acquire/lose WS_EX_TOPMOST after they are created, by means other
than SetWindowPos() (which GTK does use to raise/lower windows and
set/remove keep_above), and because trying to set/unset WS_EX_TOPMOST with
SetWindowLong() results in WS_EX_TOPMOST merely not being set/unset (that is,
other styles are still set/unset within the same call and no error is
signalled).

https://bugzilla.gnome.org/show_bug.cgi?id=758483
2015-11-26 16:26:32 +00:00
Jonas Ådahl
1e11b55606 wayland: Use xdg shell protocol from wayland-protocols
Drop our own copy of the xdg shell XML file, and use the one installed
by wayland-protocols.

https://bugzilla.gnome.org/show_bug.cgi?id=758634
2015-11-26 16:54:32 +08:00
Jonas Ådahl
912e79dbe2 wayland: Use pointer gestures protocol from wayland-protocols
Instead of having our own copy of the pointer gestures XML file, use
the one installed by wayland-protocols.

Since pointer gestures is an unstable protocol, it went through the
unstable protocol naming convention changes, which is reflected in this
commit.

https://bugzilla.gnome.org/show_bug.cgi?id=758634
2015-11-26 16:54:32 +08:00
Piotr Drąg
65b1ee5dd3 Updated POTFILES.in 2015-11-26 00:51:08 +01:00
Carlos Garnacho
4981ca9f13 GtkWindow: Reset gestures after triggering right click titlebar action
Just like it happens for window dragging, we're likely to not see the
matching button release for this event, so we must reset the controller
manually here.

https://bugzilla.gnome.org/show_bug.cgi?id=758661
2015-11-25 21:59:48 +01:00
Benjamin Otte
923ad2767a window: Don't lose position information
Before calling gdk_window_move_resize(), store the full configure
request, not just width and height.

Fixes firefox randomly losing position of its dropdown windows.

https://bugzilla.gnome.org/show_bug.cgi?id=758609
2015-11-25 20:31:27 +01:00
Benjamin Otte
415030d25f dnd: Split GtkDragSourceSite into its own file 2015-11-25 20:31:27 +01:00
Christoph Reiter
ee3397388f dnd-quartz: fix missing icon helper include 2015-11-25 20:27:21 +01:00
Benjamin Otte
2bee73c1f9 dnd: Just pass iconhelper instead of whole DragSourceSite
Simplifies the code.
2015-11-25 16:32:40 +01:00
Benjamin Otte
175d5d580e dnd: Remove unused struct members 2015-11-25 16:32:40 +01:00
Benjamin Otte
29cdb2001c iconhelper: Don't include gtk.h 2015-11-25 16:32:39 +01:00
Benjamin Otte
4843925660 iconhelper: Remove unused function 2015-11-25 16:32:39 +01:00
Benjamin Otte
2a8e6619a7 iconhelper: Remove unused context argument
Various functions don't use the style context.
2015-11-25 16:32:39 +01:00
Carlos Garnacho
de7e27bc97 wayland: remove embarrassing g_print()s 2015-11-24 20:57:03 +01:00
Carlos Garnacho
5f59d7de1e wayland: Do not store the grab cursor separately
After the grab is finished, we would expect an enter event, and
GDK updating internally the cursor for that window and device.
This means there is no need at all to store it separately in the
backend.

As a side effect, animated cursors are now also possible on grab
icons.

https://bugzilla.gnome.org/show_bug.cgi?id=735847
2015-11-24 20:52:12 +01:00
Carlos Garnacho
cc2e77295e device: Fix dispose
The way master devices detach from their other master counterpart is
vulnerable to infinite recursion due to the way we first recurse on
the other device before clearing the pointer, this may happen if
that last reference to the other master device is held by the
device->associated field.

https://bugzilla.gnome.org/show_bug.cgi?id=732742
2015-11-24 20:52:12 +01:00
Carlos Garnacho
d62febcf97 wayland: Plug surface leak
Other backends take care of the cairo surface destruction in
GdkWindow::destroy. We must do the same here, or the cairo_surface
and its corresponding wl_buffer are left dangling.

https://bugzilla.gnome.org/show_bug.cgi?id=747295
2015-11-24 20:52:12 +01:00
Daniel Mustieles
0ff879e975 Updated Spanish translation 2015-11-24 15:20:20 +00:00
Matthias Clasen
3e8eacc8b7 dialog: Use an element name
This will help differentiating dialogs from other windows, style-wise.
2015-11-24 07:41:26 -05:00
Timm Bäder
bd0f217ff4 GtkPopover: Restore tails
The call to gtk_style_context_get_border was accidentally removed in
2182fe7d9d.
2015-11-24 11:37:00 +01:00
Timm Bäder
df2cb5befc inspector: Leave unneeded widgets out of source files 2015-11-24 11:17:10 +01:00
Timm Bäder
5e2aec7cbb GtkWidget: Add some missing nullable annotations 2015-11-24 11:17:10 +01:00
Timm Bäder
f154875e08 GtkStack: Add some missing nullable annotations 2015-11-24 11:16:51 +01:00
Matthias Clasen
8640216be7 Add a test for deprecated css properties 2015-11-23 22:31:20 -05:00
Matthias Clasen
943b2e8da7 3.19.3 2015-11-23 20:56:29 -05:00
Matthias Clasen
3b0ceea08b shortcuts section: Fix destroy
The container destroy implementation does not quite work here,
so do our own.
2015-11-23 19:48:50 -05:00
Matthias Clasen
0ed61a0480 Fix some new symbols for the docs 2015-11-23 17:01:22 -05:00
Matthias Clasen
8e12943a09 Raleigh: Avoid deprecated icon-shadow 2015-11-23 17:01:22 -05:00
Matthias Clasen
3532cd5365 places view: Fix up docs 2015-11-23 17:01:22 -05:00
Rico Tzschichholz
5d8f45c708 gtk: Fix make dist 2015-11-23 22:24:41 +01:00
Daniel Mustieles
ebaf1324f1 Updated Spanish translation 2015-11-23 19:04:26 +01:00
Daniel Mustieles
4c690ae977 Updated Spanish translation 2015-11-23 19:04:16 +01:00
Carlos Garnacho
728d63bfc3 searchenginetracker: Remove astray ");" closing a function
Sad face for me.
2015-11-23 18:20:44 +01:00
Carlos Garnacho
f6dd0438d1 searchenginetracker: Optimize direct/recursive folder lookups
tracker:uri-is-descendant/parent has the unfortunate side effect of
rendering the collation mechanisms in the database useless, so those
require full table scans to be validated.

Performing these as pure string comparisons will perform much better,
as those allow the underlying sqlite to rely on its own collation
to perform the search, which can be significantly faster with many
elements in the database.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 17:58:34 +01:00
Carlos Garnacho
61d6c1a523 searchenginetracker: ensure nie:url is bound
This could produce strange warnings as it is currently passed to
tracker:uri-is-* sparql functions, as these expect no NULLs.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 17:58:34 +01:00
Jakub Steiner
bb183ae591 last last gesture stock image fixes
- swipe left was missing outline conversion to allow recolorization
2015-11-23 16:13:45 +01:00
Matthias Clasen
b6e03dbc26 Load gesture images as symbolic icons
This makes them recolor in the dark theme, which looks better.
2015-11-23 10:08:14 -05:00
Jakub Steiner
454a4b7576 gesture stock images size fix
fit all images to 64x64
2015-11-23 15:53:02 +01:00
Jakub Steiner
24cedfd87e gesture stock images fixes
- convert all objects to shapes to allow css recoloring
  ala symbolic icons
2015-11-23 15:45:24 +01:00
Jakub Steiner
25d5fd97e9 more gesture stock images tweaks
- rotation gestures more natural look
2015-11-23 14:40:30 +01:00
Matthias Clasen
6dfcea304f gtk-demo: Stop using GtkShortcutsGesture
Use the new predefined gestures, and GtkShortcutsShortcut.
2015-11-23 08:37:14 -05:00
Matthias Clasen
98fd5bda58 Tweak the gtk-font-name setting docs
Clarify that only parts of the font name are used.

https://bugzilla.gnome.org/show_bug.cgi?id=758367
2015-11-23 08:18:37 -05:00
Jakub Steiner
3e649c4812 gesture stock images sizing
- make swipe left and right less wide
2015-11-23 14:06:18 +01:00
Jakub Steiner
1cd5ef5285 minor touchups on stock gesture images
- add minimal margin for safe scaling
- fixed height of 64pixels
- pixel alignment issues (grid fit)
2015-11-23 13:53:12 +01:00
Matthias Clasen
50abc8b525 shortcuts: Add set properties for optional things
This makes it possible to switch between gesture and accelerator
types and override the builtin icons and subtitles for predefined
gestures.
2015-11-22 22:41:48 -05:00
Matthias Clasen
576e68faba gtk-demo: Show all built-in gesture images
Show all the predefined gestures which have enum values
in GtkShortcutType. This also demonstrates the gesture
functionality of GtkShortcutsShortcut.
2015-11-22 22:41:48 -05:00
Matthias Clasen
304c5ac226 shortcuts: Add support for standard gestures
Add an enum for gestures that GtkShortcutsShortcut knows how
to show an image and subtitle for.

https://bugzilla.gnome.org/show_bug.cgi?id=758187
2015-11-22 22:41:48 -05:00
Matthias Clasen
62620a5244 Add stock gesture images
These will be used in the shortcuts window.
2015-11-22 22:41:48 -05:00
Matthias Clasen
c6dc863e90 shortcuts shortcut: Take over gesture functionality
It turns out that it is nicer in glade to have just a single
widget that can show either a shortcut or a gesture, so make
GtkShortcutsShortcut do it both.

GtkShortcutsGesture is now redundant and will be removed before
the next stable release.
2015-11-22 22:41:48 -05:00
Matthias Clasen
b1aef18c84 shortcuts: Fix size group handling
We need to keep pointers to the size groups and apply
them to shortcuts that are added later.
2015-11-22 22:41:48 -05:00
Matthias Clasen
a661ce4d06 shortcuts: Complete the container implementations
Various problems with the container implementations in
GtkShortcutsWindow, Section and Group were showing up
in glade.
2015-11-22 22:41:48 -05:00
Matthias Clasen
520da80bd0 shortcuts: Update title and section-names properly
The current code in gtkshortcutswindow.c is good enough to
construct a widget once from a .ui file, but fails to handle
changes at runtime, as happen e.g. in glade. Fix this by
listening for changes to section-name and title.
2015-11-22 22:41:48 -05:00
Piotr Drąg
3ee99423d7 Updated POTFILES.in 2015-11-22 20:01:39 +01:00
Timm Bäder
2182fe7d9d Don't pass widget state flags to GtkStyleContext API 2015-11-22 17:11:35 +01:00
Руслан Ижбулатов
f407871b87 GDK W32: Only restack windows with matching always-on-top status
This prevents normal application windows (and other kinds of windows)
from being moved up in Z-order to be above windows that have the
always-on-top bit set. Doing so would make the previously-normal windows
in question also always-on-top implicitly.
Windows that are already always-on-top will be restacked on top of other
always-on-top windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=746745
2015-11-22 03:20:10 +00:00
Руслан Ижбулатов
6b7951b219 GDK W32: Refactor restacking functions a bit 2015-11-22 03:18:43 +00:00
Cosimo Cecchi
9ba94849e8 GtkRenderBorder: make one function static 2015-11-21 14:55:13 -08:00
Cosimo Cecchi
b821f132d1 GtkCssImage: formatting fixes 2015-11-21 14:52:18 -08:00
Timm Bäder
5fb10d25c1 gtk-demo: Fix selection in css basics demo 2015-11-21 21:04:02 +01:00
Pedro Albuquerque
cdd3e05fba Updated Portuguese translation 2015-11-21 09:01:10 +00:00
605 changed files with 63658 additions and 43114 deletions

146
NEWS
View File

@@ -1,4 +1,143 @@
Overview of Changes in GTK+ 3.19.2
Overview of Changes in GTK+ 3.19.5
==================================
* GtkShortcutsWindow:
- GtkShortcutsGesture has been removed, since GtkShortcutsShortcut
can now document gestures
* GtkFileChooser:
- The places view now shows the available space when that information
is available
- Problems with remembering the dialog size have been fixed
* CSS changes:
- CSS margins, border and padding are more consistently supported
- Many widgets now support min-width and min-height
- Many style properties have been superseded by CSS properties
* Adwaita:
- Some visual updates and fixes
* Wayland:
- DND with icon widgets is working properly
* GDK:
- More of the DND implementation is now handled in GDK: creating the
drag window, moving the window along with the cursor, the drag
cancel animation.
- GdkSeat is a new API that supersedes grabs on individual devices and
is a better fit for backends like Wayland or Mir
* Bugs fixed:
758929 GtkEntryCompletion should allow for changing the popdown delay
759079 GtkComboBox triggers segmentation fault in update_menu_sensitivity...
759081 Add 'nullable' to return type of gtk_cell_layout_get_area.
759091 notebook tab stays hovered if mouse leaves slowly
759092 GtkTextIter: add starts_tag() and deprecate begins_tag(), for cons...
759168 wayland: Implement DND icon hotspot API
759225 placesview: implement available space
759260 [Adwaita:dark] menus on GtkTreeView barely visible because menu sh...
759309 Add GdkSeat
759323 gdk_display_get_pointer(): segfault if application client (core) p...
729593 Add margin style property to GtkSwitch slider
756191 GtkModelButton css padding not working
708394 CSS - support min-width
755947 wayland: gnome-terminal does not fill entire area when tiled
* Translation updates:
Arabic
German
Polish
Portuguese
Slovak
Spanish
Overview of Changes in GTK+ 3.19.4
==================================
* GtkPopover can now be instructed to stay within the toplevel window
on platforms that don't already enforce this (such as Wayland)
* Wayland:
- Memory leak fixes
- Window positioning and sizing fixes
- Clipboard and DND fixes
- New build dependency: wayland-protocols
* CSS changes:
- The -gtk-image-effect property was renamed to -gtk-icon-effect
- Active spinners are now :checked, not :active
- A -gtk-icontheme property has been added
- A -gtk-icon-palette has been added to allow recoloring symbolic icons
- Drag highlighting uses the new :dnd pseudoclass
* DND:
- Make drag highlighting themable
- Stop using RGBA cursors for drag icons (this only ever worked on X11)
- Change the handling of drag windows to work on Wayland. The drag window
implementation has been moved to GDK, with the new function
gdk_drag_context_get_drag_window
- Non-toplevel widgets can be used as drag widgets
* Bugs fixed:
539944 Add GtkScaleButton API so struct fields can be marked as private
732742 Infinite recursion on GdkDevice disposal
735847 move animatable cursors' current frame info into GdkCursor
747295 shared memory leak when creating/destroying widgets
756618 GtkWindow CSD: gtk_window_resize() also includes client side deco...
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
757282 "window: Ignore geometry widget" commit breaks gnome-terminal win...
757474 Add option for automatic GtkPopover placement
758483 GDK W32: Incorrectly uses SetWindowLong() to set/unset WS_EX_TOPM...
758484 GDK W32: Some calls to W32 routines are rather unclear
758563 play bar gets weird position in fullscreen under Wayland
758609 Regression with firefox dropdown menu position
758634 wayland: Use wayland-protocols for shared protocols
758660 Copy and paste doesn't work in wayland session
758661 every second right-click to window header is ignored (CSD-related?)
758698 Bug backward search + case insensitive + preceding multi-byte cha...
758713 Evolution cannot start on wayland if the clipboard contains data ...
758790 A few stylistic icon-browser patches
758901 wayland: old window size applied sometimes
758908 The app chooser dialog uses a non standard icon and doesn't wrap ...
758930 GTK+ spamming system logs with "doesn't match state" warnings
758936 Widgets within an offscreen windows are blurry on wayland with hidpi
759018 wayland: tests/testtooltips custom tooltip misplaced at (0,0) on ...
* Translation updates:
Polish
Portuguese
Spanish
Overview of Changes in GTK+ 3.19.3
==================================
* Theming changes
- Non-standard CSS properties have been renamed to have a -gtk-
prefix (the old names still work, with a warning):
gtk-key-bindings is now -gtk-key-bindings
icon-shadow is now -gtk-icon-shadow
- CSS parsing errors and warnings are shown in the inspector
* GtkShortcutsWindow:
- Widgets are more complete, to allow supporting them in glade
- GtkShortcutsShortcut can now show gestures as well, GtkShortcutsGesture
is no longer needed and will be removed soon
- GtkShortcutsShortcut supports standard gestures, with predefined
icons and subtitles
* Bugs fixed:
746745 Window suddenly always on top
758025 cursor flickering
758094 GtkSpinButton missing redraw
758187 Stock images for gestures
758367 GTK+ 3 does not respect bold in org.gnome.desktop.interface font-name
758407 Could not send the search request \ GDBus.Error:org.freedesktop.Tr...
758442 gtk_style_context_save() destroys style information
* Translation updates:
==================================
* Most widgets have been ported to CSS nodes. The element names and
@@ -94,6 +233,11 @@ Overview of Changes in GTK+ 3.19.1
* Debugging: GtkInspector can now edit string-array-valued properties
* Wayland:
- Fix transparent terminals
- Fix treeview search popups
* Debugging: GtkInspector can now edit string-array-valued properties
* Wayland:
- Fix transparent terminals
- Fix treeview search popups

View File

@@ -43,8 +43,14 @@ EXTRA_DIST += \
gdk-3.vcxproj.filtersin \
gtk-3.vcxprojin \
gtk-3.vcxproj.filtersin \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxprojin \
gtk3-demo.vcxproj.filtersin \
gtk3-demo-application.vcxprojin \

View File

@@ -22,6 +22,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-encode-symbolic-svg", "
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vcxproj", "{A1FCED61-4E51-4015-A70C-5373404D1BA0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcxproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcxproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-query-settings", "gtk-query-settings.vcxproj", "{9F22107A-3EF7-4B52-B269-747B65307F36}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
EndProject
Global
@@ -220,6 +226,54 @@ Global
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|Win32.ActiveCfg = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|Win32.Build.0 = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|x64.ActiveCfg = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|x64.Build.0 = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|Win32.ActiveCfg = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|x64.Build.0 = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|x64.Build.0 = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-query-settings.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-query-settings.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\updateiconcache.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gtk3-prebuild.vcxproj">
<Project>{b98fbe68-b03c-48e3-8f32-c3c010720d30}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\updateiconcache.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
</Project>

View File

@@ -19,7 +19,7 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>

View File

@@ -32,6 +32,12 @@ copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
@@ -55,6 +61,12 @@ copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
@@ -73,6 +85,12 @@ copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
</GtkDoInstallBin>
@@ -108,8 +126,12 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
echo "Compiling gsettings XML Files..."
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk

View File

@@ -215,6 +215,18 @@
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-builder-tool.vcxproj">
<Project>{7d2397cf-4c25-45bc-a1bb-cb4b6e154bbd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-query-settings.vcxproj">
<Project>{9f22107a-3ef7-4b52-b269-747b65307f36}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -10,8 +10,14 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \

View File

@@ -10,8 +10,14 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \

View File

@@ -10,8 +10,14 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \

View File

@@ -27,7 +27,10 @@ EXTRA_DIST += \
gdk3-win32.vcprojin \
gdk-3.vcprojin \
gtk-3.vcprojin \
gtk-builder-tool.vcproj \
gtk-encode-symbolic-svg.vcproj \
gtk-query-settings.vcproj \
gtk-update-icon-cache.vcproj \
gtk3-demo.vcprojin \
gtk3-demo-application.vcprojin \
gtk3-icon-browser.vcprojin \

View File

@@ -57,6 +57,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vc
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
ProjectSection(ProjectDependencies) = postProject
{B98FBE68-B03C-48E3-8F32-C3C010720D30} = {B98FBE68-B03C-48E3-8F32-C3C010720D30}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-query-settings", "gtk-query-settings.vcproj", "{9F22107A-3EF7-4B52-B269-747B65307F36}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
@@ -67,6 +84,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
{343333C4-D46C-4C97-A986-959CCA6F1DE0} = {343333C4-D46C-4C97-A986-959CCA6F1DE0}
{E9687D21-E214-4A0C-9EB4-8B38EBB783E5} = {E9687D21-E214-4A0C-9EB4-8B38EBB783E5}
{F280BF1A-777A-4FB5-8005-DFBE04621EDB} = {F280BF1A-777A-4FB5-8005-DFBE04621EDB}
{FC98AF16-4C68-42DF-906B-93A6804C198A} = {FC98AF16-4C68-42DF-906B-93A6804C198A}
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD} = {7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}
{9F22107A-3EF7-4B52-B269-747B65307F36} = {9F22107A-3EF7-4B52-B269-747B65307F36}
EndProjectSection
EndProject
Global
@@ -257,6 +277,54 @@ Global
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|Win32.ActiveCfg = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|Win32.Build.0 = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|x64.ActiveCfg = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug|x64.Build.0 = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|Win32.ActiveCfg = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release|x64.Build.0 = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Debug_Broadway|x64.Build.0 = Debug|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-builder-tool"
ProjectGUID="{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
RootNamespace="gtkbuildertool"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\gtk-builder-tool.c" />
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-query-settings"
ProjectGUID="{9F22107A-3EF7-4B52-B269-747B65307F36}"
RootNamespace="gtkquerysettings"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\gtk-query-settings.c" />
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-update-icon-cache"
ProjectGUID="{FC98AF16-4C68-42DF-906B-93A6804C198A}"
RootNamespace="gtkupdateiconcache"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\updateiconcache.c" />
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -10,7 +10,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES"
ForcedIncludeFiles="msvc_recommended_pragmas.h"
AdditionalOptions="/MP"
/>

View File

@@ -31,6 +31,12 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\b
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
@@ -54,6 +60,12 @@ copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
@@ -71,6 +83,12 @@ copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x0A
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
"
/>
@@ -113,6 +131,9 @@ copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\
echo &quot;Compiling gsettings XML Files...&quot;&#x0D;&#x0A;
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Generating icon cache...&quot;&#x0D;&#x0A;
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force &quot;$(CopyDir)\share\icons\hicolor&quot;
"
/>
<UserMacro

View File

@@ -50,6 +50,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if you have the <ftw.h> header file. */
/* #undef HAVE_FTW_H */
@@ -230,6 +233,9 @@
/* Have the SYNC extension library */
/* #undef HAVE_XSYNC */
/* Define to 1 if you have the `_lock_file' function. */
#define HAVE__LOCK_FILE
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
/* #undef HAVE__NL_MEASUREMENT_MEASUREMENT */
@@ -304,7 +310,7 @@
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* defines how to decorate public symbols while building */
/* defines how to decorate public symbols while building */
#ifdef _MSC_VER
#define _GDK_EXTERN __declspec (dllexport) extern
#else

View File

@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [19])
m4_define([gtk_micro_version], [2])
m4_define([gtk_micro_version], [5])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -60,6 +60,7 @@ m4_define([cairo_required_version], [1.14.0])
m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.5.91])
m4_define([wayland_protocols_required_version], [1.0])
m4_define([mirclient_required_version], [0.11.0])
m4_define([mircookie_required_version], [0.17.0])
m4_define([epoxy_required_version], [1.0])
@@ -412,7 +413,7 @@ AC_SUBST(DISABLE_ON_QUARTZ)
AC_CHECK_LIB([rt], [shm_open], [SHM_LIBS="-lrt"], [SHM_LIBS=""])
AC_SUBST(SHM_LIBS)
AC_CHECK_FUNCS(posix_fallocate)
AC_CHECK_FUNCS(posix_fallocate flockfile _lock_file)
if test "x$enable_broadway_backend" = xyes; then
GDK_BACKENDS="$GDK_BACKENDS broadway"
@@ -428,7 +429,7 @@ fi
PKG_PROG_PKG_CONFIG
WAYLAND_DEPENDENCIES="wayland-client >= wayland_required_version xkbcommon >= 0.2.0 wayland-cursor >= wayland_required_version wayland-egl"
WAYLAND_DEPENDENCIES="wayland-client >= wayland_required_version wayland-protocols >= wayland_protocols_required_version xkbcommon >= 0.2.0 wayland-cursor >= wayland_required_version wayland-egl"
if test "$enable_wayland_backend" = "maybe" ; then
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
PKG_CHECK_EXISTS($WAYLAND_DEPENDENCIES, [have_wayland_deps=yes], [have_wayland_deps=no])
@@ -444,6 +445,7 @@ fi
if test "$enable_wayland_backend" = "yes"; then
# For the cairo image backend
cairo_backends="$cairo_backends cairo"
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
GDK_BACKENDS="$GDK_BACKENDS wayland"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
@@ -1892,6 +1894,8 @@ testsuite/a11y/Makefile
testsuite/a11y/state/Makefile
testsuite/css/Makefile
testsuite/css/parser/Makefile
testsuite/css/nodes/Makefile
testsuite/css/style/Makefile
testsuite/gdk/Makefile
testsuite/gtk/Makefile
testsuite/reftests/Makefile

View File

@@ -16,7 +16,7 @@
}
/* Make sure selections are visible */
:selected {
selection {
background-color: darkGreen;
color: black;
}

View File

@@ -96,6 +96,7 @@
<file>shortcuts-builder.ui</file>
<file>shortcuts-gedit.ui</file>
<file>shortcuts-clocks.ui</file>
<file>shortcuts-boxes.ui</file>
</gresource>
<gresource prefix="/revealer">
<file>revealer.ui</file>
@@ -220,8 +221,4 @@
<gresource prefix="/modelbutton">
<file>modelbutton.ui</file>
</gresource>
<gresource prefix="/icons">
<file>gesture-two-finger-swipe-right.svg</file>
<file>gesture-two-finger-swipe-left.svg</file>
</gresource>
</gresources>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">shortcuts</property>
<property name="max-height">12</property>
<!-- Overview shortcuts -->
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Overview</property>
<property name="view">overview</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">F1</property>
<property name="title" translatable="yes">Help</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Ctrl&gt;n</property>
<property name="title" translatable="yes">Create a new box</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Ctrl&gt;f</property>
<property name="title" translatable="yes">Search</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Ctrl&gt;k</property>
<property name="title" translatable="yes">Keyboard shortcuts</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Ctrl&gt;q</property>
<property name="title" translatable="yes">Close Window/Quit Boxes</property>
</object>
</child>
</object>
</child>
<!-- Wizard and Properties shortcuts -->
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Box Creation and Properties</property>
<property name="view">wizard</property>
<!-- LTR -->
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">ltr</property>
<property name="accelerator">&lt;Alt&gt;Right</property>
<property name="title" translatable="yes">Switch to the next page</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">ltr</property>
<property name="accelerator">&lt;Alt&gt;Left</property>
<property name="title" translatable="yes">Switch to the previous page</property>
</object>
</child>
<!-- RTL -->
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">rtl</property>
<property name="accelerator">&lt;Alt&gt;Left</property>
<property name="title" translatable="yes">Switch to the next page</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">rtl</property>
<property name="accelerator">&lt;Alt&gt;Right</property>
<property name="title" translatable="yes">Switch to the previous page</property>
</object>
</child>
</object>
</child>
<!-- Display shortcuts -->
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Box Display</property>
<property name="view">display</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Control_L+Alt_L</property>
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
</object>
</child>
<!-- LTR -->
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">ltr</property>
<property name="accelerator">&lt;Alt&gt;Left</property>
<property name="title" translatable="yes">Back to overview</property>
</object>
</child>
<!-- RTL -->
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="direction">rtl</property>
<property name="accelerator">&lt;Alt&gt;Right</property>
<property name="title" translatable="yes">Back to overview</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Ctrl&gt;q</property>
<property name="title" translatable="yes">Close window/Quit Boxes</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">F11</property>
<property name="title" translatable="yes">Fullscreen/Restore from fullscreen</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -2,13 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GFileIcon" id="left-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-left.svg</property>
</object>
<object class="GFileIcon" id="right-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-right.svg</property>
</object>
<object class="GtkShortcutsWindow" id="shortcuts-builder">
<property name="modal">1</property>
<child>
@@ -89,19 +82,17 @@
<property name="visible">1</property>
<property name="title" translatable="yes">Touchpad gestures</property>
<child>
<object class="GtkShortcutsGesture">
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
<property name="title" translatable="yes">Switch to the next document</property>
<property name="subtitle" translatable="yes">Two finger swipe right</property>
<property name="icon">right-swipe-icon</property>
</object>
</child>
<child>
<object class="GtkShortcutsGesture">
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
<property name="title" translatable="yes">Switch to the previous document</property>
<property name="subtitle" translatable="yes">Two finger swipe left</property>
<property name="icon">left-swipe-icon</property>
</object>
</child>
</object>
@@ -460,6 +451,95 @@
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">All gestures</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-pinch</property>
<property name="title" translatable="yes">A stock pinch gesture</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-stretch</property>
<property name="title" translatable="yes">A stock stretch gesture</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-rotate-clockwise</property>
<property name="title" translatable="yes">A stock rotation gesture</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-rotate-counterclockwise</property>
<property name="title" translatable="yes">A stock rotation gesture</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
<property name="title" translatable="yes">A stock swipe gesture</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
<property name="title" translatable="yes">A stock swipe gesture</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">'Special' combinations</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">t+t</property>
<property name="title" translatable="yes">You want tea ?</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;shift&gt;&lt;ctrl&gt;</property>
<property name="title" translatable="yes">Shift Control</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&amp;&lt;ctrl&gt;</property>
<property name="title" translatable="yes">Control Control</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Control_L&amp;Control_R</property>
<property name="title" translatable="yes">Left and right control</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>

View File

@@ -34,10 +34,27 @@
<property name="title" translatable="yes">Quit</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;Right</property>
<property name="direction">ltr</property>
<property name="title" translatable="yes">Forward</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;Left</property>
<property name="direction">ltr</property>
<property name="title" translatable="yes">Back</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;Left</property>
<property name="direction">rtl</property>
<property name="title" translatable="yes">Forward</property>
</object>
</child>
@@ -45,6 +62,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;Right</property>
<property name="direction">rtl</property>
<property name="title" translatable="yes">Back</property>
</object>
</child>

View File

@@ -2,13 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GFileIcon" id="left-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-left.svg</property>
</object>
<object class="GFileIcon" id="right-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-right.svg</property>
</object>
<object class="GtkShortcutsWindow" id="shortcuts-gedit">
<property name="modal">1</property>
<child>
@@ -21,19 +14,17 @@
<property name="visible">1</property>
<property name="title" translatable="yes">Touchpad gestures</property>
<child>
<object class="GtkShortcutsGesture">
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
<property name="title" translatable="yes">Switch to the next document</property>
<property name="subtitle" translatable="yes">Two finger swipe right</property>
<property name="icon">right-swipe-icon</property>
</object>
</child>
<child>
<object class="GtkShortcutsGesture">
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
<property name="title" translatable="yes">Switch to the previous document</property>
<property name="subtitle" translatable="yes">Two finger swipe left</property>
<property name="icon">left-swipe-icon</property>
</object>
</child>
</object>

View File

@@ -22,6 +22,7 @@ show_shortcuts (GtkWidget *window,
gtk_window_set_transient_for (GTK_WINDOW (overlay), GTK_WINDOW (window));
g_object_set (overlay, "view-name", view, NULL);
gtk_widget_show (overlay);
g_object_unref (builder);
}
static void
@@ -48,6 +49,24 @@ clocks_shortcuts_stopwatch (GtkWidget *window)
show_shortcuts (window, "shortcuts-clocks", "stopwatch");
}
static void
boxes_shortcuts (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", NULL);
}
static void
boxes_shortcuts_wizard (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", "wizard");
}
static void
boxes_shortcuts_display (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", "display");
}
GtkWidget *
do_shortcuts (GtkWidget *do_widget)
{
@@ -72,6 +91,9 @@ do_shortcuts (GtkWidget *do_widget)
"gedit_shortcuts", G_CALLBACK (gedit_shortcuts),
"clocks_shortcuts", G_CALLBACK (clocks_shortcuts),
"clocks_shortcuts_stopwatch", G_CALLBACK (clocks_shortcuts_stopwatch),
"boxes_shortcuts", G_CALLBACK (boxes_shortcuts),
"boxes_shortcuts_wizard", G_CALLBACK (boxes_shortcuts_wizard),
"boxes_shortcuts_display", G_CALLBACK (boxes_shortcuts_display),
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));

View File

@@ -38,6 +38,27 @@
<signal name="clicked" handler="clocks_shortcuts_stopwatch" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Boxes</property>
<signal name="clicked" handler="boxes_shortcuts" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Boxes - Wizard</property>
<signal name="clicked" handler="boxes_shortcuts_wizard" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Boxes - Display</property>
<signal name="clicked" handler="boxes_shortcuts_display" swapped="1" object="window1"/>
</object>
</child>
</object>
</child>
</object>

View File

@@ -148,16 +148,14 @@
<object class="GtkGrid">
<property name="visible">True</property>
<property name="margin">10</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -174,8 +172,6 @@
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -192,8 +188,6 @@
<child>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -210,8 +204,6 @@
<child>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -228,8 +220,6 @@
<child>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -244,11 +234,9 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">16x16</property>
<property name="valign">baseline</property>
<property name="label">16×16</property>
<style>
<class name="dim-label"/>
</style>
@@ -261,11 +249,9 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">24x24</property>
<property name="valign">baseline</property>
<property name="label">24×24</property>
<style>
<class name="dim-label"/>
</style>
@@ -278,11 +264,9 @@
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">32x32</property>
<property name="valign">baseline</property>
<property name="label">32×32</property>
<style>
<class name="dim-label"/>
</style>
@@ -295,11 +279,9 @@
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">48x48</property>
<property name="valign">baseline</property>
<property name="label">48×48</property>
<style>
<class name="dim-label"/>
</style>
@@ -312,11 +294,9 @@
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">64x64</property>
<property name="valign">baseline</property>
<property name="label">64×64</property>
<style>
<class name="dim-label"/>
</style>

View File

@@ -1670,8 +1670,8 @@ activate (GApplication *app)
G_CALLBACK (textbuffer_notify_selection), widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "pastebutton");
g_signal_connect (widget, "clicked", G_CALLBACK (handle_cutcopypaste), widget2);
g_signal_connect (gtk_widget_get_clipboard (widget2, GDK_SELECTION_CLIPBOARD), "owner-change",
G_CALLBACK (clipboard_owner_change), widget);
g_signal_connect_object (gtk_widget_get_clipboard (widget2, GDK_SELECTION_CLIPBOARD), "owner-change",
G_CALLBACK (clipboard_owner_change), widget, 0);
widget = (GtkWidget *)gtk_builder_get_object (builder, "osd_frame");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "totem_like_osd");

View File

@@ -1,6 +1,6 @@
.circular-button {
border-radius: 20px;
outline-radius: 20px;
-gtk-outline-radius: 20px;
}
.small-button {

View File

@@ -150,6 +150,19 @@
</row>
</data>
</object>
<object class="GtkEntryCompletion" id="name_completion">
<property name="model">liststore1</property>
<property name="text-column">2</property>
<property name="inline-completion">1</property>
<property name="popup-single-match">0</property>
<property name="inline-selection">1</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
<object class="GtkListStore" id="lrmodel">
<columns>
<column type="gchararray"/>
@@ -3630,6 +3643,7 @@ microphone-sensitivity-medium-symbolic</property>
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="placeholder_text" translatable="yes">Name…</property>
<property name="completion">name_completion</property>
</object>
</child>
<child>
@@ -3671,7 +3685,8 @@ microphone-sensitivity-medium-symbolic</property>
</child>
<style>
<class name="image-button"/>
<class name="sidebar-button"/>
<class name="circular"/>
<class name="flat"/>
</style>
</object>
</child>

View File

@@ -22,6 +22,7 @@
<xi:include href="xml/gdkdisplaymanager.xml" />
<xi:include href="xml/gdkdisplay.xml" />
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/gdkseat.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
<xi:include href="xml/gdkdevice.xml" />
<xi:include href="xml/regions.xml" />

View File

@@ -156,6 +156,8 @@ gdk_display_supports_input_shapes
gdk_display_supports_composite
gdk_display_get_app_launch_context
gdk_display_notify_startup_complete
gdk_display_get_default_seat
gdk_display_list_seats
<SUBSECTION Standard>
GDK_DISPLAY
@@ -362,6 +364,7 @@ gdk_window_unstick
gdk_window_maximize
gdk_window_unmaximize
gdk_window_fullscreen
gdk_window_fullscreen_on_monitor
gdk_window_unfullscreen
GdkFullscreenMode
gdk_window_get_fullscreen_mode
@@ -371,6 +374,8 @@ gdk_window_set_keep_below
gdk_window_set_opacity
gdk_window_set_composited
gdk_window_get_composited
gdk_window_set_pass_through
gdk_window_get_pass_through
gdk_window_move
gdk_window_resize
gdk_window_move_resize
@@ -633,6 +638,9 @@ gdk_rectangle_intersect
gdk_rectangle_union
gdk_rectangle_equal
<SUBSECTION>
GdkBorder
<SUBSECTION Private>
gdk_rectangle_get_type
</SECTION>
@@ -732,6 +740,7 @@ gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_n_keys
gdk_device_warp
gdk_device_get_seat
<SUBSECTION>
gdk_device_grab
@@ -772,6 +781,31 @@ gdk_device_type_get_type
GDK_MAX_TIMECOORD_AXES
</SECTION>
<SECTION>
<TITLE>GdkSeat</TITLE>
<FILE>gdkseat</FILE>
GdkSeat
GdkSeatCapabilities
GdkSeatGrabPrepareFunc
gdk_seat_get_display
gdk_seat_grab
gdk_seat_ungrab
gdk_seat_get_capabilities
gdk_seat_get_pointer
gdk_seat_get_keyboard
gdk_seat_get_slaves
<SUBSECTION Standard>
GDK_SEAT
GDK_IS_SEAT
GDK_TYPE_SEAT
GDK_TYPE_SEAT_CAPABILITIES
<SUBSECTION Private>
gdk_seat_get_type
gdk_seat_capabilities_get_type
</SECTION>
<SECTION>
<TITLE>GdkDeviceManager</TITLE>
<FILE>gdkdevicemanager</FILE>
@@ -836,6 +870,7 @@ gdk_events_get_angle
gdk_events_get_center
gdk_events_get_distance
gdk_event_triggers_context_menu
gdk_event_get_seat
<SUBSECTION>
gdk_event_handler_set
@@ -947,9 +982,11 @@ gdk_drag_get_selection
gdk_drag_abort
gdk_drop_reply
gdk_drag_drop
gdk_drag_drop_done
gdk_drag_find_window_for_screen
gdk_drag_begin
gdk_drag_begin_for_device
gdk_drag_begin_from_point
gdk_drag_motion
gdk_drop_finish
GdkDragProtocol
@@ -967,6 +1004,8 @@ gdk_drag_context_set_device
gdk_drag_context_get_source_window
gdk_drag_context_get_dest_window
gdk_drag_context_get_protocol
gdk_drag_context_get_drag_window
gdk_drag_context_set_hotspot
<SUBSECTION Standard>
GDK_DRAG_CONTEXT
@@ -1180,6 +1219,7 @@ gdk_window_impl_x11_get_type
<INCLUDE>gdk/gdkwayland.h</INCLUDE>
<TITLE>Wayland Interaction</TITLE>
<FILE>wayland_interaction</FILE>
gdk_wayland_seat_get_wl_seat
gdk_wayland_device_get_wl_keyboard
gdk_wayland_device_get_wl_pointer
gdk_wayland_device_get_wl_seat

View File

@@ -11,5 +11,6 @@ gdk_frame_clock_get_type
gdk_gl_context_get_type
gdk_keymap_get_type
gdk_screen_get_type
gdk_seat_get_type
gdk_visual_get_type
gdk_window_get_type

View File

@@ -281,43 +281,44 @@ MKHTML_OPTIONS="--path=\"$(abs_srcdir):$(top_srcdir)/examples\""
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
version.xml \
running.sgml \
broadway.xml \
broadwayd.xml \
building.sgml \
compiling.sgml \
css.xml \
drawing-model.xml \
getting_started.xml \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-unique-GtkApplication.xml \
migrating-smclient-GtkApplication.xml \
migrating-GtkGrid.xml \
migrating-GtkStyleContext.xml \
osx.sgml \
broadway.xml \
wayland.xml \
mir.xml \
question_index.sgml \
resources.sgml \
text_widget.sgml \
tree_widget.sgml \
windows.sgml \
x11.sgml \
gtk3-demo.xml \
gtk3-demo-application.xml \
gtk3-widget-factory.xml \
gtk3-demo.xml \
gtk3-icon-browser.xml \
gtk-query-immodules-3.0.xml \
gtk-update-icon-cache.xml \
gtk3-widget-factory.xml \
gtk-builder-tool.xml \
gtk-encode-symbolic-svg.xml \
gtk-launch.xml \
broadwayd.xml \
gtk-builder-tool.xml \
gtk-query-immodules-3.0.xml \
gtk-query-settings.xml \
gtk-update-icon-cache.xml \
input-handling.xml \
visual_index.xml \
getting_started.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkGrid.xml \
migrating-GtkStyleContext.xml \
migrating-smclient-GtkApplication.xml \
migrating-unique-GtkApplication.xml \
mir.xml \
osx.sgml \
overview.xml \
gtk-query-settings.xml
question_index.sgml \
resources.sgml \
running.sgml \
text_widget.sgml \
tree_widget.sgml \
version.xml \
visual_index.xml \
wayland.xml \
windows.sgml \
x11.sgml
expand_content_files = \
compiling.sgml \
@@ -327,10 +328,10 @@ expand_content_files = \
input-handling.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-unique-GtkApplication.xml \
migrating-smclient-GtkApplication.xml \
migrating-GtkGrid.xml \
migrating-GtkStyleContext.xml \
migrating-smclient-GtkApplication.xml \
migrating-unique-GtkApplication.xml \
question_index.sgml \
text_widget.sgml \
tree_widget.sgml

2264
docs/reference/gtk/css.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -211,7 +211,7 @@
<para>When creating an application, you'll want to put more than one widget
inside a window.
When you want to put more than one widget into a window, it
When you want to put more than one widget into a window,
it becomes important to control how each widget is positioned and sized.
This is where packing comes in.</para>

View File

@@ -28,7 +28,6 @@
<xi:include href="xml/input-handling.xml" />
</part>
<part id="gtkobjects">
<title>GTK+ Widgets and Objects</title>
@@ -246,7 +245,6 @@
<xi:include href="xml/gtkshortcutssection.xml" />
<xi:include href="xml/gtkshortcutsgroup.xml" />
<xi:include href="xml/gtkshortcutsshortcut.xml" />
<xi:include href="xml/gtkshortcutsgesture.xml" />
</chapter>
<chapter id="MiscObjects">
@@ -377,6 +375,7 @@
<part id="theming">
<title>Theming in GTK+</title>
<xi:include href="css.xml" />
<xi:include href="xml/gtkstylecontext.xml" />
<xi:include href="xml/gtkcssprovider.xml" />
<xi:include href="xml/gtkstyleprovider.xml" />

View File

@@ -3742,6 +3742,7 @@ gtk_text_iter_get_pixbuf
gtk_text_iter_get_marks
gtk_text_iter_get_toggled_tags
gtk_text_iter_get_child_anchor
gtk_text_iter_starts_tag
gtk_text_iter_begins_tag
gtk_text_iter_ends_tag
gtk_text_iter_toggles_tag
@@ -5449,6 +5450,7 @@ gtk_widget_draw
gtk_widget_queue_draw
gtk_widget_queue_resize
gtk_widget_queue_resize_no_redraw
gtk_widget_queue_allocate
gtk_widget_get_frame_clock
gtk_widget_get_scale_factor
GtkTickCallback
@@ -5603,6 +5605,8 @@ gtk_widget_get_can_default
gtk_widget_set_can_default
gtk_widget_get_can_focus
gtk_widget_set_can_focus
gtk_widget_get_focus_on_click
gtk_widget_set_focus_on_click
gtk_widget_get_double_buffered
gtk_widget_get_has_window
gtk_widget_set_has_window
@@ -6240,6 +6244,8 @@ gtk_style_context_set_frame_clock
gtk_style_context_set_state
gtk_style_context_set_scale
gtk_style_context_get_scale
GtkStyleContextPrintFlags
gtk_style_context_to_string
<SUBSECTION>
GtkBorder
@@ -8138,6 +8144,9 @@ gtk_popover_set_pointing_to
gtk_popover_get_pointing_to
gtk_popover_set_position
gtk_popover_get_position
GtkPopoverConstraint
gtk_popover_set_constrain_to
gtk_popover_get_constrain_to
gtk_popover_set_modal
gtk_popover_get_modal
gtk_popover_set_transitions_enabled
@@ -8483,6 +8492,7 @@ GTK_SHORTCUTS_WINDOW_CLASS
GTK_IS_SHORTCUTS_WINDOW_CLASS
GTK_GET_SHORTCUTS_WINDOW_CLASS
<SUBSECTION Private>
GtkShortcutsWindowClass
gtk_shortcuts_window_get_type
</SECTION>
@@ -8497,6 +8507,7 @@ GTK_SHORTCUTS_SECTION_CLASS
GTK_IS_SHORTCUTS_SECTION_CLASS
GTK_GET_SHORTCUTS_SECTION_CLASS
<SUBSECTION Private>
GtkShortcutsSectionClass
gtk_shortcuts_section_get_type
</SECTION>
@@ -8511,12 +8522,14 @@ GTK_SHORTCUTS_GROUP_CLASS
GTK_IS_SHORTCUTS_GROUP_CLASS
GTK_GET_SHORTCUTS_GROUP_CLASS
<SUBSECTION Private>
GtkShortcutsGroupClass
gtk_shortcuts_group_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutsshortcut</FILE>
GtkShortcutsShortcut
GtkShortcutType
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_SHORTCUT
GTK_SHORTCUTS_SHORTCUT
@@ -8525,20 +8538,6 @@ GTK_SHORTCUTS_SHORTCUT_CLASS
GTK_IS_SHORTCUTS_SHORTCUT_CLASS
GTK_GET_SHORTCUTS_SHORTCUT_CLASS
<SUBSECTION Private>
<SUBSECTION Private>
GtkShortcutsShortcutClass
gtk_shortcuts_shortcut_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutsgesture</FILE>
GtkShortcutsGesture
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_GESTURE
GTK_SHORTCUTS_GESTURE
GTK_IS_SHORTCUTS_GESTURE
GTK_SHORTCUTS_GESTURE_CLASS
GTK_IS_SHORTCUTS_GESTURE_CLASS
GTK_GET_SHORTCUTS_GESTURE_CLASS
<SUBSECTION Private>
gtk_shortcuts_gesture_get_type
</SECTION>

View File

@@ -177,7 +177,6 @@ gtk_shortcuts_window_get_type
gtk_shortcuts_section_get_type
gtk_shortcuts_group_get_type
gtk_shortcuts_shortcut_get_type
gtk_shortcuts_gesture_get_type
gtk_size_group_get_type
@ENABLE_ON_X11@gtk_socket_get_type
gtk_spin_button_get_type

View File

@@ -214,6 +214,10 @@ additional environment variables.
<term>updates</term>
<listitem><para>Visual feedback about window updates</para></listitem>
</varlistentry>
<varlistentry>
<term>resize</term>
<listitem><para>Highlight resizing widgets</para></listitem>
</varlistentry>
</variablelist>
The special value <literal>all</literal> can be used to turn on all

View File

@@ -85,6 +85,7 @@ gdk_public_h_sources = \
gdkrectangle.h \
gdkrgba.h \
gdkscreen.h \
gdkseat.h \
gdkselection.h \
gdktestutils.h \
gdkthreads.h \
@@ -112,6 +113,8 @@ gdk_private_headers = \
gdkframeclockprivate.h \
gdkglcontextprivate.h \
gdkscreenprivate.h \
gdkseatprivate.h \
gdkseatdefaultprivate.h \
gdkinternals.h \
gdkintl.h \
gdkkeysprivate.h \
@@ -150,6 +153,8 @@ gdk_c_sources = \
gdkrectangle.c \
gdkrgba.c \
gdkscreen.c \
gdkseat.c \
gdkseatdefault.c \
gdkselection.c \
gdkvisual.c \
gdkwindow.c \

View File

@@ -219,12 +219,14 @@ _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
GdkDeviceManager *device_manager;
GList *devices, *d;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
/* Get all devices */
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
G_GNUC_END_IGNORE_DEPRECATIONS;
/* End all grabs on the newly hidden window */
for (d = devices; d; d = d->next)
@@ -242,10 +244,12 @@ _gdk_broadway_window_grab_check_destroy (GdkWindow *window)
GdkDeviceGrabInfo *grab;
GList *devices, *d;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
/* Get all devices */
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
G_GNUC_END_IGNORE_DEPRECATIONS;
for (d = devices; d; d = d->next)
{

View File

@@ -24,6 +24,7 @@
#include "gdkdevice-broadway.h"
#include "gdkkeysyms.h"
#include "gdkprivate-broadway.h"
#include "gdkseatdefaultprivate.h"
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
@@ -118,6 +119,7 @@ gdk_broadway_device_manager_constructed (GObject *object)
{
GdkBroadwayDeviceManager *device_manager;
GdkDisplay *display;
GdkSeat *seat;
device_manager = GDK_BROADWAY_DEVICE_MANAGER (object);
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
@@ -129,6 +131,12 @@ gdk_broadway_device_manager_constructed (GObject *object)
_gdk_device_set_associated_device (device_manager->core_keyboard, device_manager->core_pointer);
_gdk_device_set_associated_device (device_manager->touchscreen, device_manager->core_pointer);
_gdk_device_add_slave (device_manager->core_pointer, device_manager->touchscreen);
seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer,
device_manager->core_keyboard);
gdk_display_add_seat (display, seat);
gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device_manager->touchscreen);
g_object_unref (seat);
}

View File

@@ -75,6 +75,7 @@ gdk_broadway_display_init_input (GdkDisplay *display)
GList *list, *l;
broadway_display = GDK_BROADWAY_DISPLAY (display);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
/* For backwards compatibility, just add
@@ -110,6 +111,7 @@ gdk_broadway_display_init_input (GdkDisplay *display)
display->core_pointer = device;
break;
}
G_GNUC_END_IGNORE_DEPRECATIONS;
/* Add the core pointer to the devices list */
broadway_display->input_devices = g_list_prepend (broadway_display->input_devices,

View File

@@ -87,7 +87,9 @@ gdk_broadway_drag_context_finalize (GObject *object)
GdkDragContext *
_gdk_broadway_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets)
GList *targets,
gint x_root,
gint y_root)
{
GdkDragContext *new_context;

View File

@@ -117,7 +117,9 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
g_assert (display != NULL);
display_broadway = GDK_BROADWAY_DISPLAY (display);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = GDK_BROADWAY_DEVICE_MANAGER (gdk_display_get_device_manager (display));
G_GNUC_END_IGNORE_DEPRECATIONS;
switch (message->base.type) {
case BROADWAY_EVENT_ENTER:
@@ -135,6 +137,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->crossing.mode = message->crossing.mode;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -155,6 +158,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->crossing.mode = message->crossing.mode;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -176,6 +180,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->motion.y_root = message->pointer.root_y;
event->motion.state = message->pointer.state;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -201,6 +206,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->button.button = message->button.button;
event->button.state = message->pointer.state;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -220,6 +226,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->scroll.y_root = message->pointer.root_y;
event->scroll.direction = message->scroll.dir == 0 ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -263,6 +270,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_source_device (event, device_manager->touchscreen);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
if (message->touch.is_emulated)
_gdk_event_set_pointer_emulated (event, TRUE);
@@ -289,6 +297,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->key.hardware_keycode = message->key.key;
event->key.length = 0;
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
@@ -357,6 +366,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->focus_change.window = g_object_ref (window);
event->focus_change.in = FALSE;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
}
@@ -367,6 +377,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->focus_change.window = g_object_ref (window);
event->focus_change.in = TRUE;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
}

View File

@@ -44,7 +44,9 @@ void _gdk_broadway_resync_windows (void);
void _gdk_broadway_window_register_dnd (GdkWindow *window);
GdkDragContext * _gdk_broadway_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets);
GList *targets,
gint x_root,
gint y_root);
void _gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,

View File

@@ -51,6 +51,7 @@
#include <gdk/gdkrectangle.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkscreen.h>
#include <gdk/gdkseat.h>
#include <gdk/gdkselection.h>
#include <gdk/gdktestutils.h>
#include <gdk/gdkthreads.h>

View File

@@ -253,6 +253,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
* - ![](default_cursor.png) "default"
* - ![](help_cursor.png) "help"
* - ![](pointer_cursor.png) "pointer"
* - ![](pointer_cursor.png) "context-menu"
* - ![](progress_cursor.png) "progress"
* - ![](wait_cursor.png) "wait"
* - ![](cell_cursor.png) "cell"

View File

@@ -90,6 +90,7 @@ enum {
PROP_N_AXES,
PROP_VENDOR_ID,
PROP_PRODUCT_ID,
PROP_SEAT,
LAST_PROP
};
@@ -271,6 +272,21 @@ gdk_device_class_init (GdkDeviceClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
/**
* GdkDevice:seat:
*
* #GdkSeat of this device.
*
* Since: 3.20
*/
device_props[PROP_SEAT] =
g_param_spec_object ("seat",
P_("Seat"),
P_("Seat"),
GDK_TYPE_SEAT,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, device_props);
/**
@@ -323,17 +339,20 @@ static void
gdk_device_dispose (GObject *object)
{
GdkDevice *device = GDK_DEVICE (object);
GdkDevice *associated = device->associated;
if (device->type == GDK_DEVICE_TYPE_SLAVE)
_gdk_device_remove_slave (device->associated, device);
if (associated && device->type == GDK_DEVICE_TYPE_SLAVE)
_gdk_device_remove_slave (associated, device);
if (device->associated)
if (associated)
{
if (device->type == GDK_DEVICE_TYPE_MASTER)
_gdk_device_set_associated_device (device->associated, NULL);
g_object_unref (device->associated);
device->associated = NULL;
if (device->type == GDK_DEVICE_TYPE_MASTER &&
associated->associated == device)
_gdk_device_set_associated_device (associated, NULL);
g_object_unref (associated);
}
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
@@ -378,6 +397,9 @@ gdk_device_set_property (GObject *object,
case PROP_PRODUCT_ID:
device->product_id = g_value_dup_string (value);
break;
case PROP_SEAT:
device->seat = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -427,6 +449,9 @@ gdk_device_get_property (GObject *object,
case PROP_PRODUCT_ID:
g_value_set_string (value, device->product_id);
break;
case PROP_SEAT:
g_value_set_object (value, device->seat);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1335,6 +1360,8 @@ get_native_grab_event_mask (GdkEventMask grab_mask)
* Returns: %GDK_GRAB_SUCCESS if the grab was successful.
*
* Since: 3.0
*
* Deprecated: 3.20. Use gdk_seat_grab() instead.
**/
GdkGrabStatus
gdk_device_grab (GdkDevice *device,
@@ -1408,6 +1435,8 @@ gdk_device_grab (GdkDevice *device,
* Release any grab on @device.
*
* Since: 3.0
*
* Deprecated: 3.20. Use gdk_seat_ungrab() instead.
*/
void
gdk_device_ungrab (GdkDevice *device,
@@ -1877,3 +1906,36 @@ gdk_device_get_product_id (GdkDevice *device)
return device->product_id;
}
void
gdk_device_set_seat (GdkDevice *device,
GdkSeat *seat)
{
g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (!seat || GDK_IS_SEAT (seat));
if (device->seat == seat)
return;
device->seat = seat;
g_object_notify (G_OBJECT (device), "seat");
}
/**
* gdk_device_get_seat:
* @device: A #GdkDevice
*
* Returns the #GdkSeat the device belongs to.
*
* Returns: (transfer none): A #GdkSeat. This memory is owned by GTK+ and
* must not be freed.
*
* Since: 3.20
**/
GdkSeat *
gdk_device_get_seat (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
return device->seat;
}

View File

@@ -246,7 +246,7 @@ GList * gdk_device_list_slave_devices (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_20_FOR(gdk_seat_grab)
GdkGrabStatus gdk_device_grab (GdkDevice *device,
GdkWindow *window,
GdkGrabOwnership grab_ownership,
@@ -255,7 +255,7 @@ GdkGrabStatus gdk_device_grab (GdkDevice *device,
GdkCursor *cursor,
guint32 time_);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_20_FOR(gdk_seat_ungrab)
void gdk_device_ungrab (GdkDevice *device,
guint32 time_);
@@ -279,6 +279,9 @@ const gchar *gdk_device_get_vendor_id (GdkDevice *device);
GDK_AVAILABLE_IN_3_16
const gchar *gdk_device_get_product_id (GdkDevice *device);
GDK_AVAILABLE_IN_3_20
GdkSeat *gdk_device_get_seat (GdkDevice *device);
G_END_DECLS
#endif /* __GDK_DEVICE_H__ */

View File

@@ -323,6 +323,9 @@ gdk_device_manager_get_display (GdkDeviceManager *device_manager)
* GTK+ and must not be freed or unreffed.
*
* Since: 3.0
*
* Deprecated: 3.20, use gdk_seat_get_pointer(), gdk_seat_get_keyboard()
* and gdk_seat_list_slaves() instead.
**/
GList *
gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
@@ -348,6 +351,8 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
* owned by GDK and must not be freed or unreferenced.
*
* Since: 3.0
*
* Deprecated: 3.20.
**/
GdkDevice *
gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager)

View File

@@ -37,10 +37,10 @@ GType gdk_device_manager_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_device_manager_get_display (GdkDeviceManager *device_manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_20
GList * gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_20
GdkDevice * gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
G_END_DECLS

View File

@@ -21,6 +21,7 @@
#include "gdkdevice.h"
#include "gdkdevicemanager.h"
#include "gdkevents.h"
#include "gdkseat.h"
G_BEGIN_DECLS
@@ -59,6 +60,8 @@ struct _GdkDevice
gchar *vendor_id;
gchar *product_id;
GdkSeat *seat;
};
struct _GdkDeviceClass
@@ -176,6 +179,9 @@ GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
GdkModifierType *mask,
gboolean get_toplevel);
void gdk_device_set_seat (GdkDevice *device,
GdkSeat *seat);
G_END_DECLS
#endif /* __GDK_DEVICE_PRIVATE_H__ */

View File

@@ -69,6 +69,8 @@
enum {
OPENED,
CLOSED,
SEAT_ADDED,
SEAT_REMOVED,
LAST_SIGNAL
};
@@ -104,7 +106,9 @@ gdk_display_real_opened (GdkDisplay *display)
{
GdkDeviceManager *device_manager;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_connect (device_manager, "device-removed",
G_CALLBACK (device_removed_cb), display);
@@ -125,6 +129,15 @@ gdk_display_real_event_data_free (GdkDisplay *display,
{
}
static GdkSeat *
gdk_display_real_get_default_seat (GdkDisplay *display)
{
if (!display->seats)
return NULL;
return display->seats->data;
}
static void
gdk_display_class_init (GdkDisplayClass *class)
{
@@ -140,6 +153,7 @@ gdk_display_class_init (GdkDisplayClass *class)
class->make_default = gdk_display_real_make_default;
class->event_data_copy = gdk_display_real_event_data_copy;
class->event_data_free = gdk_display_real_event_data_free;
class->get_default_seat = gdk_display_real_get_default_seat;
/**
* GdkDisplay::opened:
@@ -177,6 +191,42 @@ gdk_display_class_init (GdkDisplayClass *class)
G_TYPE_NONE,
1,
G_TYPE_BOOLEAN);
/**
* GdkDisplay::seat-added:
* @display: the object on which the signal is emitted
* @seat: the seat that was just added
*
* The ::seat-added signal is emitted whenever a new seat is made
* known to the windowing system.
*
* Since: 3.20
*/
signals[SEAT_ADDED] =
g_signal_new (g_intern_static_string ("seat-added"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GDK_TYPE_SEAT);
/**
* GdkDisplay::seat-removed:
* @display: the object on which the signal is emitted
* @seat: the seat that was just added
*
* The ::seat-removed signal is emitted whenever a seat is removed
* by the windowing system.
*
* Since: 3.20
*/
signals[SEAT_REMOVED] =
g_signal_new (g_intern_static_string ("seat-removed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GDK_TYPE_SEAT);
}
static void
@@ -233,7 +283,9 @@ gdk_display_dispose (GObject *object)
GdkDisplay *display = GDK_DISPLAY (object);
GdkDeviceManager *device_manager;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (GDK_DISPLAY (object));
G_GNUC_END_IGNORE_DEPRECATIONS;
_gdk_display_manager_remove_display (gdk_display_manager_get (), display);
@@ -410,28 +462,22 @@ void
gdk_display_pointer_ungrab (GdkDisplay *display,
guint32 time_)
{
GdkDeviceManager *device_manager;
GList *devices, *dev;
GList *seats, *s;
GdkDevice *device;
g_return_if_fail (GDK_IS_DISPLAY (display));
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
/* FIXME: Should this be generic to all backends? */
/* FIXME: What happens with extended devices? */
for (dev = devices; dev; dev = dev->next)
for (s = seats; s; s = s->next)
{
device = dev->data;
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
continue;
device = gdk_seat_get_pointer (s->data);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gdk_device_ungrab (device, time_);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
g_list_free (devices);
g_list_free (seats);
}
/**
@@ -450,28 +496,22 @@ void
gdk_display_keyboard_ungrab (GdkDisplay *display,
guint32 time)
{
GdkDeviceManager *device_manager;
GList *devices, *dev;
GList *seats, *s;
GdkDevice *device;
g_return_if_fail (GDK_IS_DISPLAY (display));
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
/* FIXME: Should this be generic to all backends? */
/* FIXME: What happens with extended devices? */
for (dev = devices; dev; dev = dev->next)
for (s = seats; s; s = s->next)
{
device = dev->data;
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
continue;
device = gdk_seat_get_keyboard (s->data);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gdk_device_ungrab (device, time);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
g_list_free (devices);
g_list_free (seats);
}
/**
@@ -1380,28 +1420,25 @@ gdk_device_grab_info_libgtk_only (GdkDisplay *display,
gboolean
gdk_display_pointer_is_grabbed (GdkDisplay *display)
{
GdkDeviceManager *device_manager;
GList *devices, *dev;
GList *seats, *s;
GdkDevice *device;
g_return_val_if_fail (GDK_IS_DISPLAY (display), TRUE);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
for (dev = devices; dev; dev = dev->next)
for (s = seats; s; s = s->next)
{
device = dev->data;
device = gdk_seat_get_pointer (s->data);
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE &&
gdk_display_device_is_grabbed (display, device))
if (gdk_display_device_is_grabbed (display, device))
{
g_list_free (devices);
g_list_free (seats);
return TRUE;
}
}
g_list_free (devices);
g_list_free (seats);
return FALSE;
}
@@ -1443,6 +1480,8 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
* or unreferenced.
*
* Since: 3.0
*
* Deprecated: 3.20. Use gdk_display_get_default_seat() and #GdkSeat operations.
**/
GdkDeviceManager *
gdk_display_get_device_manager (GdkDisplay *display)
@@ -2318,3 +2357,75 @@ gdk_display_get_debug_updates (GdkDisplay *display)
else
return _gdk_debug_updates;
}
void
gdk_display_add_seat (GdkDisplay *display,
GdkSeat *seat)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
g_return_if_fail (GDK_IS_SEAT (seat));
display->seats = g_list_prepend (display->seats, g_object_ref (seat));
g_signal_emit (display, signals[SEAT_ADDED], 0, seat);
}
void
gdk_display_remove_seat (GdkDisplay *display,
GdkSeat *seat)
{
GList *link;
g_return_if_fail (GDK_IS_DISPLAY (display));
g_return_if_fail (GDK_IS_SEAT (seat));
link = g_list_find (display->seats, seat);
if (link)
{
display->seats = g_list_remove_link (display->seats, link);
g_signal_emit (display, signals[SEAT_REMOVED], 0, seat);
g_object_unref (link->data);
g_list_free (link);
}
}
/**
* gdk_display_get_default_seat:
* @display: a #GdkDisplay
*
* Returns the default #GdkSeat for this display.
*
* Returns: (transfer none): the default seat.
*
* Since: 3.20
**/
GdkSeat *
gdk_display_get_default_seat (GdkDisplay *display)
{
GdkDisplayClass *display_class;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
display_class = GDK_DISPLAY_GET_CLASS (display);
return display_class->get_default_seat (display);
}
/**
* gdk_display_list_seats:
* @display: a #GdkDisplay
*
* Returns the list of seats known to @display.
*
* Returns: (transfer container) (element-type GdkSeat): the
* list of seats known to the #GdkDisplay
*
* Since: 3.20
**/
GList *
gdk_display_list_seats (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return g_list_copy (display->seats);
}

View File

@@ -30,6 +30,7 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkdevicemanager.h>
#include <gdk/gdkseat.h>
G_BEGIN_DECLS
@@ -165,12 +166,18 @@ GDK_AVAILABLE_IN_ALL
void gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_20_FOR(gdk_display_get_default_seat)
GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display);
GDK_AVAILABLE_IN_3_20
GdkSeat * gdk_display_get_default_seat (GdkDisplay *display);
GDK_AVAILABLE_IN_3_20
GList * gdk_display_list_seats (GdkDisplay *display);
G_END_DECLS
#endif /* __GDK_DISPLAY_H__ */

View File

@@ -125,6 +125,8 @@ struct _GdkDisplay
guint debug_updates_set : 1;
GdkRenderingMode rendering_mode;
GList *seats;
};
struct _GdkDisplayClass
@@ -237,6 +239,8 @@ struct _GdkDisplayClass
gboolean (*make_gl_context_current) (GdkDisplay *display,
GdkGLContext *context);
GdkSeat * (*get_default_seat) (GdkDisplay *display);
/* Signals */
void (*opened) (GdkDisplay *display);
void (*closed) (GdkDisplay *display,
@@ -318,6 +322,11 @@ GdkWindow * _gdk_display_create_window (GdkDisplay *display
gboolean gdk_display_make_gl_context_current (GdkDisplay *display,
GdkGLContext *context);
void gdk_display_add_seat (GdkDisplay *display,
GdkSeat *seat);
void gdk_display_remove_seat (GdkDisplay *display,
GdkSeat *seat);
G_END_DECLS
#endif /* __GDK_DISPLAY_PRIVATE_H__ */

View File

@@ -454,3 +454,76 @@ gdk_drag_get_selection (GdkDragContext *context)
return GDK_DRAG_CONTEXT_GET_CLASS (context)->get_selection (context);
}
/**
* gdk_drag_context_get_drag_window:
* @context: a #GdkDragContext
*
* Returns the window on which the drag icon should be rendered
* during the drag operation. Note that the window may not be
* available until the drag operation has begun. GDK will move
* the window in accordance with the ongoing drag operation.
* The window is owned by @context and will be destroyed when
* the drag operation is over.
*
* Returns: (transfer none): the drag window, or %NULL
*
* Since: 3.20
*/
GdkWindow *
gdk_drag_context_get_drag_window (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
if (GDK_DRAG_CONTEXT_GET_CLASS (context)->get_drag_window)
return GDK_DRAG_CONTEXT_GET_CLASS (context)->get_drag_window (context);
return NULL;
}
/**
* gdk_drag_context_set_hotspot:
* @context: a #GdkDragContext
* @hot_x: x coordinate of the drag window hotspot
* @hot_y: y coordinate of the drag window hotspot
*
* Sets the position of the drag window that will be kept
* under the cursor hotspot. Initially, the hotspot is at the
* top left corner of the drag window.
*
* Since: 3.20
*/
void
gdk_drag_context_set_hotspot (GdkDragContext *context,
gint hot_x,
gint hot_y)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
if (GDK_DRAG_CONTEXT_GET_CLASS (context)->set_hotspot)
GDK_DRAG_CONTEXT_GET_CLASS (context)->set_hotspot (context, hot_x, hot_y);
}
/**
* gdk_drag_drop_done:
* @context: a #GdkDragContext
* @success: whether the drag was ultimatively successful
*
* Inform GDK if the drop ended successfully. Passing %FALSE
* for @success may trigger a drag cancellation animation.
*
* This function is called by the drag source, and should
* be the last call before dropping the reference to the
* @context.
*
* Since: 3.20
*/
void
gdk_drag_drop_done (GdkDragContext *context,
gboolean success)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
if (GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_done)
GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_done (context, success);
}

View File

@@ -31,6 +31,7 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkdevice.h>
#include <gdk/gdkevents.h>
G_BEGIN_DECLS
@@ -143,6 +144,12 @@ GDK_AVAILABLE_IN_ALL
GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets);
GDK_AVAILABLE_IN_3_20
GdkDragContext * gdk_drag_begin_from_point (GdkWindow *window,
GdkDevice *device,
GList *targets,
gint x_root,
gint y_root);
GDK_AVAILABLE_IN_ALL
void gdk_drag_find_window_for_screen (GdkDragContext *context,
@@ -171,6 +178,18 @@ void gdk_drag_abort (GdkDragContext *context,
GDK_AVAILABLE_IN_ALL
gboolean gdk_drag_drop_succeeded (GdkDragContext *context);
GDK_AVAILABLE_IN_3_20
void gdk_drag_drop_done (GdkDragContext *context,
gboolean success);
GDK_AVAILABLE_IN_3_20
GdkWindow *gdk_drag_context_get_drag_window (GdkDragContext *context);
GDK_AVAILABLE_IN_3_20
void gdk_drag_context_set_hotspot (GdkDragContext *context,
gint hot_x,
gint hot_y);
G_END_DECLS
#endif /* __GDK_DND_H__ */

View File

@@ -62,6 +62,12 @@ struct _GdkDragContextClass {
gboolean success,
guint32 time_);
gboolean (*drop_status) (GdkDragContext *context);
GdkWindow* (*get_drag_window) (GdkDragContext *context);
void (*set_hotspot) (GdkDragContext *context,
gint hot_x,
gint hot_y);
void (*drop_done) (GdkDragContext *context,
gboolean success);
};
struct _GdkDragContext {
@@ -73,6 +79,7 @@ struct _GdkDragContext {
gboolean is_source;
GdkWindow *source_window;
GdkWindow *dest_window;
GdkWindow *drag_window;
GList *targets;
GdkDragAction actions;

View File

@@ -660,6 +660,7 @@ gdk_event_copy (const GdkEvent *event)
new_private->screen = private->screen;
new_private->device = private->device ? g_object_ref (private->device) : NULL;
new_private->source_device = private->source_device ? g_object_ref (private->source_device) : NULL;
new_private->seat = private->seat;
}
switch (event->any.type)
@@ -1634,22 +1635,20 @@ gdk_event_get_device (const GdkEvent *event)
case GDK_KEY_RELEASE:
{
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *client_pointer;
GdkSeat *seat;
g_warning ("Event with type %d not holding a GdkDevice. "
"It is most likely synthesized outside Gdk/GTK+\n",
event->type);
display = gdk_window_get_display (event->any.window);
device_manager = gdk_display_get_device_manager (display);
client_pointer = gdk_device_manager_get_client_pointer (device_manager);
seat = gdk_display_get_default_seat (display);
if (event->type == GDK_KEY_PRESS ||
event->type == GDK_KEY_RELEASE)
return gdk_device_get_associated_device (client_pointer);
return gdk_seat_get_keyboard (seat);
else
return client_pointer;
return gdk_seat_get_pointer (seat);
}
break;
default:
@@ -2314,3 +2313,52 @@ gdk_event_get_event_type (const GdkEvent *event)
return event->type;
}
/**
* gdk_event_get_seat:
* @event: a #GdkEvent
*
* Returns the #GdkSeat this event was generated for.
*
* Returns: (transfer none): The #GdkSeat of this event
*
* Since: 3.20
**/
GdkSeat *
gdk_event_get_seat (const GdkEvent *event)
{
const GdkEventPrivate *priv;
if (!gdk_event_is_allocated (event))
return NULL;
priv = (const GdkEventPrivate *) event;
if (!priv->seat)
{
GdkDevice *device;
g_warning ("Event with type %d not holding a GdkSeat. "
"It is most likely synthesized outside Gdk/GTK+\n",
event->type);
device = gdk_event_get_device (event);
return device ? gdk_device_get_seat (device) : NULL;
}
return priv->seat;
}
void
gdk_event_set_seat (GdkEvent *event,
GdkSeat *seat)
{
GdkEventPrivate *priv;
if (gdk_event_is_allocated (event))
{
priv = (GdkEventPrivate *) event;
priv->seat = seat;
}
}

View File

@@ -1427,6 +1427,9 @@ GdkEventSequence *gdk_event_get_event_sequence (const GdkEvent *event);
GDK_AVAILABLE_IN_3_10
GdkEventType gdk_event_get_event_type (const GdkEvent *event);
GDK_AVAILABLE_IN_3_20
GdkSeat *gdk_event_get_seat (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
void gdk_set_show_events (gboolean show_events);
GDK_AVAILABLE_IN_ALL

View File

@@ -185,6 +185,7 @@ struct _GdkEventPrivate
gpointer windowing_data;
GdkDevice *device;
GdkDevice *source_device;
GdkSeat *seat;
};
typedef struct _GdkWindowPaint GdkWindowPaint;
@@ -390,6 +391,9 @@ void _gdk_event_set_pointer_emulated (GdkEvent *event,
gboolean emulated);
gboolean _gdk_event_get_pointer_emulated (GdkEvent *event);
void gdk_event_set_seat (GdkEvent *event,
GdkSeat *seat);
void _gdk_event_emit (GdkEvent *event);
GList* _gdk_event_queue_find_first (GdkDisplay *display);
void _gdk_event_queue_remove_link (GdkDisplay *display,

View File

@@ -143,10 +143,16 @@ _gdk_offscreen_window_create_surface (GdkWindow *offscreen,
gint width,
gint height)
{
GdkOffscreenWindow *impl;
GdkWindow *derived;
g_return_val_if_fail (GDK_IS_OFFSCREEN_WINDOW (offscreen->impl), NULL);
return gdk_window_create_similar_surface (offscreen->parent,
CAIRO_CONTENT_COLOR_ALPHA,
impl = GDK_OFFSCREEN_WINDOW (offscreen->impl);
derived = impl->embedder ? impl->embedder : offscreen->parent;
return gdk_window_create_similar_surface (derived,
CAIRO_CONTENT_COLOR_ALPHA,
width, height);
}
@@ -657,10 +663,15 @@ gdk_offscreen_window_get_frame_extents (GdkWindow *window,
static gint
gdk_offscreen_window_get_scale_factor (GdkWindow *window)
{
GdkOffscreenWindow *offscreen;
if (GDK_WINDOW_DESTROYED (window))
return 1;
offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
if (offscreen->embedder)
return gdk_window_get_scale_factor (offscreen->embedder);
return gdk_window_get_scale_factor (window->parent);
}

View File

@@ -47,8 +47,8 @@
* @window: Source window
* @src_x: Source X coordinate within @window
* @src_y: Source Y coordinate within @window
* @width: Width in logical pixels of region to get
* @height: Height in logical pixels of region to get
* @width: Width in pixels of region to get
* @height: Height in pixels of region to get
*
* Transfers image data from a #GdkWindow and converts it to an RGB(A)
* representation inside a #GdkPixbuf. In other words, copies
@@ -56,8 +56,9 @@
* This allows you to efficiently read individual pixels on the client side.
*
* This function will create an RGB pixbuf with 8 bits per channel with
* the same size specified by the @width and @height arguments. The pixbuf
* will contain an alpha channel if the @window contains one.
* the size specified by the @width and @height arguments scaled by the
* scale factor of @window. The pixbuf will contain an alpha channel if
* the @window contains one.
*
* If the window is off the screen, then there is no image data in the
* obscured/offscreen regions to be placed in the pixbuf. The contents of
@@ -87,15 +88,16 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
gint height)
{
cairo_surface_t *surface;
cairo_surface_t *copy;
cairo_t *cr;
GdkPixbuf *dest;
gint scale;
int scale;
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
scale = gdk_window_get_scale_factor (src);
surface = _gdk_window_ref_cairo_surface (src);
scale = gdk_window_get_scale_factor (src);
/* We do not know what happened to this surface outside of GDK.
* Especially for foreign windows, they will have been modified
@@ -104,9 +106,22 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
*/
cairo_surface_mark_dirty (surface);
dest = gdk_pixbuf_get_from_surface (surface,
scale * src_x, scale * src_y,
scale * width, scale * height);
if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA)
copy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width * scale, height * scale);
else
copy = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width * scale, height * scale);
cairo_surface_set_device_scale (copy, scale, scale);
cr = cairo_create (copy);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, surface, -src_x, -src_y);
cairo_paint (cr);
cairo_destroy (cr);
dest = gdk_pixbuf_get_from_surface (copy, 0, 0, width * scale, height * scale);
cairo_surface_destroy (copy);
cairo_surface_destroy (surface);
return dest;
@@ -137,16 +152,11 @@ gdk_cairo_surface_coerce_to_image (cairo_surface_t *surface,
{
cairo_surface_t *copy;
cairo_t *cr;
double sx, sy;
cairo_surface_get_device_scale (surface, &sx, &sy);
copy = cairo_image_surface_create (gdk_cairo_format_for_content (content),
width,
height);
cairo_surface_set_device_scale (copy, sx, sy);
cr = cairo_create (copy);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, surface, -src_x, -src_y);

391
gdk/gdkseat.c Normal file
View File

@@ -0,0 +1,391 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#include "config.h"
#include <glib-object.h>
#include "gdkdisplay.h"
#include "gdkdevice.h"
#include "gdkseatprivate.h"
#include "gdkdeviceprivate.h"
#include "gdkintl.h"
/**
* SECTION:gdkseat
* @Short_description: Object representing an user seat
* @Title: GdkSeat
* @See_also: #GdkDisplay, #GdkDevice
*
* The #GdkSeat object represents a collection of input devices
* that belong to an user.
*/
typedef struct _GdkSeatPrivate GdkSeatPrivate;
struct _GdkSeatPrivate
{
GdkDisplay *display;
};
enum {
DEVICE_ADDED,
DEVICE_REMOVED,
N_SIGNALS
};
enum {
PROP_0,
PROP_DISPLAY,
N_PROPS
};
static guint signals[N_SIGNALS] = { 0 };
static GParamSpec *props[N_PROPS] = { NULL };
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdkSeat, gdk_seat, G_TYPE_OBJECT)
static void
gdk_seat_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdkSeatPrivate *priv = gdk_seat_get_instance_private (GDK_SEAT (object));
switch (prop_id)
{
case PROP_DISPLAY:
priv->display = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdk_seat_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdkSeatPrivate *priv = gdk_seat_get_instance_private (GDK_SEAT (object));
switch (prop_id)
{
case PROP_DISPLAY:
g_value_set_object (value, priv->display);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdk_seat_class_init (GdkSeatClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = gdk_seat_set_property;
object_class->get_property = gdk_seat_get_property;
/**
* GdkSeat::device-added:
* @seat: the object on which the signal is emitted
* @device: the newly added #GdkDevice.
*
* The ::device-added signal is emitted either when a new input
* device is related to this seat.
*
* Since: 3.20
*/
signals [DEVICE_ADDED] =
g_signal_new (g_intern_static_string ("device-added"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkSeatClass, device_added),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GDK_TYPE_DEVICE);
/**
* GdkSeat::device-removed:
* @seat: the object on which the signal is emitted
* @device: the just removed #GdkDevice.
*
* The ::device-removed signal is emitted either when an
* input device is removed (e.g. unplugged).
*
* Since: 3.20
*/
signals [DEVICE_REMOVED] =
g_signal_new (g_intern_static_string ("device-removed"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkSeatClass, device_removed),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GDK_TYPE_DEVICE);
/**
* GdkSeat:display:
*
* #GdkDisplay of this seat.
*
* Since: 3.20
*/
props[PROP_DISPLAY] =
g_param_spec_object ("display",
P_("Display"),
P_("Display"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, props);
}
static void
gdk_seat_init (GdkSeat *seat)
{
}
/**
* gdk_seat_get_capabilities:
* @seat: a #GdkSeat
*
* Returns the capabilities this #GdkSeat currently has.
*
* Returns: the seat capabilities
*
* Since: 3.20
**/
GdkSeatCapabilities
gdk_seat_get_capabilities (GdkSeat *seat)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), GDK_SEAT_CAPABILITY_NONE);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_capabilities (seat);
}
/**
* gdk_seat_grab:
* @seat: a #GdkSeat
* @window: the #GdkWindow which will own the grab
* @capabilities: capabilities that will be grabbed
* @owner_events: if %FALSE then all device events are reported with respect to
* @window and are only reported if selected by @event_mask. If
* %TRUE then pointer events for this application are reported
* as normal, but pointer events outside this application are
* reported with respect to @window and only if selected by
* @event_mask. In either mode, unreported events are discarded.
* @cursor: (nullable): the cursor to display while the grab is active. If
* this is %NULL then the normal cursors are used for
* @window and its descendants, and the cursor for @window is used
* elsewhere.
* @event: (nullable): the event that is triggering the grab, or %NULL if none
* is available.
* @prepare_func: (nullable) (scope call): function to prepare the window to be
* grabbed, it can be %NULL if @window is visible before this call.
* @prepare_func_data: (closure prepare_func): user data to pass to @prepare_func
*
* Grabs the seat so that all events corresponding to the given @capabilities
* are passed to this application until the seat is ungrabbed with gdk_seat_ungrab(),
* or the window becomes hidden. This overrides any previous grab on the
* seat by this client.
*
* As a rule of thumb, if a grab is desired over %GDK_SEAT_CAPABILITY_POINTER,
* all other "pointing" capabilities (eg. %GDK_SEAT_CAPABILITY_TOUCH) should
* be grabbed too, so the user is able to interact with all of those while
* the grab holds, you should thus use %GDK_SEAT_CAPABILITY_ALL_POINTING most
* commonly.
*
* Grabs are used for operations which need complete control over the
* events corresponding to the given capabilities. For example in GTK+ this
* is used for Drag and Drop operations, popup menus and such.
*
* Note that if the event mask of a #GdkWindow has selected both button press
* and button release events, or touch begin and touch end, then a press event
* will cause an automatic grab until the button is released, equivalent to a
* grab on the window with @owner_events set to %TRUE. This performed as most
* applications expect to receive presses and releases in pairs.
*
* If you set up anything at the time you take the grab that needs to be
* cleaned up when the grab ends, you should handle the #GdkEventGrabBroken
* events that are emitted when the grab ends unvoluntarily.
*
* Returns: %GDK_GRAB_SUCCESS if the grab was successful.
*
* Since: 3.20
**/
GdkGrabStatus
gdk_seat_grab (GdkSeat *seat,
GdkWindow *window,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), GDK_GRAB_FAILED);
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_FAILED);
capabilities &= GDK_SEAT_CAPABILITY_ALL;
g_return_val_if_fail (capabilities != GDK_SEAT_CAPABILITY_NONE, GDK_GRAB_FAILED);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->grab (seat, window, capabilities, owner_events, cursor,
event, prepare_func, prepare_func_data);
}
/**
* gdk_seat_ungrab:
* @seat: a #GdkSeat
*
* Releases a grab added through gdk_seat_grab().
*
* Since: 3.20
**/
void
gdk_seat_ungrab (GdkSeat *seat)
{
GdkSeatClass *seat_class;
g_return_if_fail (GDK_IS_SEAT (seat));
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->ungrab (seat);
}
/**
* gdk_seat_get_slaves:
* @seat: a #GdkSeat
* @capabilities: capabilities to get devices for
*
* Returns the slave devices that match the given capabilities.
*
* Returns: (transfer container) (element-type GdkSeat): A list of #GdkDevices. The list
* must be freed with g_list_free(), the elements are owned
* by GDK and must not be freed.
*
* Since: 3.20
**/
GList *
gdk_seat_get_slaves (GdkSeat *seat,
GdkSeatCapabilities capabilities)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_slaves (seat, capabilities);
}
/**
* gdk_seat_get_pointer:
* @seat: a #GdkSeat
*
* Returns the master device that routes pointer events.
*
* Returns: (transfer none) (nullable): a master #GdkDevice with pointer
* capabilities. This object is owned by GTK+ and must not be
* freed.
*
* Since: 3.20
**/
GdkDevice *
gdk_seat_get_pointer (GdkSeat *seat)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_master (seat, GDK_SEAT_CAPABILITY_POINTER);
}
/**
* gdk_seat_get_keyboard:
* @seat: a #GdkSeat
*
* Returns the master device that routes keyboard events.
*
* Returns: (transfer none) (nullable): a master #GdkDevice with keyboard
* capabilities. This object is owned by GTK+ and must not be
* freed.
*
* Since: 3.20
**/
GdkDevice *
gdk_seat_get_keyboard (GdkSeat *seat)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_master (seat, GDK_SEAT_CAPABILITY_KEYBOARD);
}
void
gdk_seat_device_added (GdkSeat *seat,
GdkDevice *device)
{
gdk_device_set_seat (device, seat);
g_signal_emit (seat, signals[DEVICE_ADDED], 0, device);
}
void
gdk_seat_device_removed (GdkSeat *seat,
GdkDevice *device)
{
gdk_device_set_seat (device, NULL);
g_signal_emit (seat, signals[DEVICE_REMOVED], 0, device);
}
/**
* gdk_seat_get_display:
* @seat: a #GdkSeat
*
* Returns the #GdkDisplay this seat belongs to.
*
* Returns: (transfer none): a #GdkDisplay. This memory is owned by GTK+ and
* must not be freed.
**/
GdkDisplay *
gdk_seat_get_display (GdkSeat *seat)
{
GdkSeatPrivate *priv = gdk_seat_get_instance_private (seat);
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
return priv->display;
}

117
gdk/gdkseat.h Normal file
View File

@@ -0,0 +1,117 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef __GDK_SEAT_H__
#define __GDK_SEAT_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <glib-object.h>
#include <gdk/gdkwindow.h>
#include <gdk/gdkevents.h>
#include <gdk/gdktypes.h>
G_BEGIN_DECLS
#define GDK_TYPE_SEAT (gdk_seat_get_type ())
#define GDK_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_SEAT, GdkSeat))
#define GDK_IS_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_SEAT))
/**
* GdkSeatCapabilities:
* @GDK_SEAT_CAPABILITY_NONE: No input capabilities
* @GDK_SEAT_CAPABILITY_POINTER: The seat has a pointer (e.g. mouse)
* @GDK_SEAT_CAPABILITY_TOUCH: The seat has touchscreen(s) attached
* @GDK_SEAT_CAPABILITY_TABLET_STYLUS: The seat has drawing tablet(s) attached
* @GDK_SEAT_CAPABILITY_KEYBOARD: The seat has keyboard(s) attached
* @GDK_SEAT_CAPABILITY_ALL_POINTING: The union of all pointing capabilities
* @GDK_SEAT_CAPABILITY_ALL: The union of all capabilities
*
* Flags describing the seat capabilities.
*
* Since: 3.20
*/
typedef enum {
GDK_SEAT_CAPABILITY_NONE = 0,
GDK_SEAT_CAPABILITY_POINTER = 1 << 0,
GDK_SEAT_CAPABILITY_TOUCH = 1 << 1,
GDK_SEAT_CAPABILITY_TABLET_STYLUS = 1 << 2,
GDK_SEAT_CAPABILITY_KEYBOARD = 1 << 3,
GDK_SEAT_CAPABILITY_ALL_POINTING = (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH | GDK_SEAT_CAPABILITY_TABLET_STYLUS),
GDK_SEAT_CAPABILITY_ALL = (GDK_SEAT_CAPABILITY_ALL_POINTING | GDK_SEAT_CAPABILITY_KEYBOARD)
} GdkSeatCapabilities;
/**
* GdkSeatGrabPrepareFunc:
* @seat: the #GdkSeat being grabbed
* @window: the #GdkWindow being grabbed
* @user_data: user data passed in gdk_seat_grab()
*
* Type of the callback used to set up @window so it can be
* grabbed. A typical action would be ensuring the window is
* visible, although there's room for other initialization
* actions.
*
* Since: 3.20
*/
typedef void (* GdkSeatGrabPrepareFunc) (GdkSeat *seat,
GdkWindow *window,
gpointer user_data);
struct _GdkSeat
{
GObject parent_instance;
};
GDK_AVAILABLE_IN_3_20
GType gdk_seat_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_20
GdkGrabStatus gdk_seat_grab (GdkSeat *seat,
GdkWindow *window,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data);
GDK_AVAILABLE_IN_3_20
void gdk_seat_ungrab (GdkSeat *seat);
GDK_AVAILABLE_IN_3_20
GdkDisplay * gdk_seat_get_display (GdkSeat *seat);
GDK_AVAILABLE_IN_3_20
GdkSeatCapabilities
gdk_seat_get_capabilities (GdkSeat *seat);
GDK_AVAILABLE_IN_3_20
GList * gdk_seat_get_slaves (GdkSeat *seat,
GdkSeatCapabilities capabilities);
GDK_AVAILABLE_IN_3_20
GdkDevice * gdk_seat_get_pointer (GdkSeat *seat);
GDK_AVAILABLE_IN_3_20
GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat);
G_END_DECLS
#endif /* __GDK_SEAT_H__ */

341
gdk/gdkseatdefault.c Normal file
View File

@@ -0,0 +1,341 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#include "gdkseatdefaultprivate.h"
#include "gdkdeviceprivate.h"
typedef struct _GdkSeatDefaultPrivate GdkSeatDefaultPrivate;
struct _GdkSeatDefaultPrivate
{
GdkDevice *master_pointer;
GdkDevice *master_keyboard;
GList *slave_pointers;
GList *slave_keyboards;
};
#define KEYBOARD_EVENTS (GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | \
GDK_FOCUS_CHANGE_MASK)
#define TOUCH_EVENTS (GDK_TOUCH_MASK)
#define POINTER_EVENTS (GDK_POINTER_MOTION_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_BUTTON_RELEASE_MASK | \
GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK | \
GDK_ENTER_NOTIFY_MASK | \
GDK_LEAVE_NOTIFY_MASK | \
GDK_PROXIMITY_IN_MASK | \
GDK_PROXIMITY_OUT_MASK)
G_DEFINE_TYPE_WITH_PRIVATE (GdkSeatDefault, gdk_seat_default, GDK_TYPE_SEAT)
static void
gdk_seat_dispose (GObject *object)
{
GdkSeatDefault *seat = GDK_SEAT_DEFAULT (object);
GdkSeatDefaultPrivate *priv = gdk_seat_default_get_instance_private (seat);
GList *l;
if (priv->master_pointer)
{
gdk_seat_device_removed (GDK_SEAT (seat), priv->master_pointer);
g_clear_object (&priv->master_pointer);
}
if (priv->master_keyboard)
{
gdk_seat_device_removed (GDK_SEAT (seat), priv->master_keyboard);
g_clear_object (&priv->master_pointer);
}
for (l = priv->slave_pointers; l; l = l->next)
{
gdk_seat_device_removed (GDK_SEAT (seat), l->data);
g_object_unref (l->data);
}
for (l = priv->slave_keyboards; l; l = l->next)
{
gdk_seat_device_removed (GDK_SEAT (seat), l->data);
g_object_unref (l->data);
}
g_list_free (priv->slave_pointers);
g_list_free (priv->slave_keyboards);
priv->slave_pointers = NULL;
priv->slave_keyboards = NULL;
G_OBJECT_CLASS (gdk_seat_default_parent_class)->dispose (object);
}
static GdkSeatCapabilities
gdk_seat_default_get_capabilities (GdkSeat *seat)
{
/* FIXME */
return GDK_SEAT_CAPABILITY_NONE;
}
static GdkGrabStatus
gdk_seat_default_grab (GdkSeat *seat,
GdkWindow *window,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{
GdkSeatDefaultPrivate *priv;
guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
GdkGrabStatus status = GDK_GRAB_SUCCESS;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
if (prepare_func)
(prepare_func) (seat, window, prepare_func_data);
if (!gdk_window_is_visible (window))
{
g_critical ("Window %p has not been made visible in GdkSeatGrabPrepareFunc",
window);
return GDK_GRAB_NOT_VIEWABLE;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (capabilities & GDK_SEAT_CAPABILITY_ALL_POINTING)
{
status = gdk_device_grab (priv->master_pointer, window,
GDK_OWNERSHIP_NONE, owner_events,
POINTER_EVENTS, cursor,
evtime);
}
if (status == GDK_GRAB_SUCCESS &&
capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
{
status = gdk_device_grab (priv->master_keyboard, window,
GDK_OWNERSHIP_NONE, owner_events,
KEYBOARD_EVENTS, cursor,
evtime);
if (status != GDK_GRAB_SUCCESS)
{
if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD)
gdk_device_ungrab (priv->master_pointer, evtime);
gdk_window_hide (window);
}
}
G_GNUC_END_IGNORE_DEPRECATIONS;
return status;
}
static void
gdk_seat_default_ungrab (GdkSeat *seat)
{
GdkSeatDefaultPrivate *priv;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gdk_device_ungrab (priv->master_pointer, GDK_CURRENT_TIME);
gdk_device_ungrab (priv->master_keyboard, GDK_CURRENT_TIME);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static GdkDevice *
gdk_seat_default_get_master (GdkSeat *seat,
GdkSeatCapabilities capability)
{
GdkSeatDefaultPrivate *priv;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
/* There must be only one flag set */
switch (capability)
{
case GDK_SEAT_CAPABILITY_POINTER:
case GDK_SEAT_CAPABILITY_TOUCH:
return priv->master_pointer;
case GDK_SEAT_CAPABILITY_KEYBOARD:
return priv->master_keyboard;
default:
g_warning ("Unhandled capability %x\n", capability);
break;
}
return NULL;
}
static GdkSeatCapabilities
device_get_capability (GdkDevice *device)
{
GdkInputSource source;
source = gdk_device_get_source (device);
switch (source)
{
case GDK_SOURCE_KEYBOARD:
return GDK_SEAT_CAPABILITY_KEYBOARD;
case GDK_SOURCE_TOUCHSCREEN:
return GDK_SEAT_CAPABILITY_TOUCH;
case GDK_SOURCE_MOUSE:
case GDK_SOURCE_TOUCHPAD:
default:
return GDK_SEAT_CAPABILITY_POINTER;
}
return GDK_SEAT_CAPABILITY_NONE;
}
static GList *
append_filtered (GList *list,
GList *devices,
GdkSeatCapabilities capabilities)
{
GList *l;
for (l = devices; l; l = l->next)
{
GdkSeatCapabilities device_cap;
device_cap = device_get_capability (l->data);
if ((device_cap & capabilities) != 0)
list = g_list_prepend (list, l->data);
}
return list;
}
static GList *
gdk_seat_default_get_slaves (GdkSeat *seat,
GdkSeatCapabilities capabilities)
{
GdkSeatDefaultPrivate *priv;
GList *devices = NULL;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
if (capabilities & (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH))
devices = append_filtered (devices, priv->slave_pointers, capabilities);
if (capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
devices = append_filtered (devices, priv->slave_keyboards, capabilities);
return devices;
}
static void
gdk_seat_default_class_init (GdkSeatDefaultClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkSeatClass *seat_class = GDK_SEAT_CLASS (klass);
object_class->dispose = gdk_seat_dispose;
seat_class->get_capabilities = gdk_seat_default_get_capabilities;
seat_class->grab = gdk_seat_default_grab;
seat_class->ungrab = gdk_seat_default_ungrab;
seat_class->get_master = gdk_seat_default_get_master;
seat_class->get_slaves = gdk_seat_default_get_slaves;
}
static void
gdk_seat_default_init (GdkSeatDefault *seat)
{
}
GdkSeat *
gdk_seat_default_new_for_master_pair (GdkDevice *pointer,
GdkDevice *keyboard)
{
GdkSeatDefaultPrivate *priv;
GdkDisplay *display;
GdkSeat *seat;
display = gdk_device_get_display (pointer);
seat = g_object_new (GDK_TYPE_SEAT_DEFAULT,
"display", display,
NULL);
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
priv->master_pointer = g_object_ref (pointer);
priv->master_keyboard = g_object_ref (keyboard);
gdk_seat_device_added (seat, priv->master_pointer);
gdk_seat_device_added (seat, priv->master_keyboard);
return seat;
}
void
gdk_seat_default_add_slave (GdkSeatDefault *seat,
GdkDevice *device)
{
GdkSeatDefaultPrivate *priv;
GdkSeatCapabilities capability;
g_return_if_fail (GDK_IS_SEAT_DEFAULT (seat));
g_return_if_fail (GDK_IS_DEVICE (device));
priv = gdk_seat_default_get_instance_private (seat);
capability = device_get_capability (device);
if (capability & (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH))
priv->slave_pointers = g_list_prepend (priv->slave_pointers, g_object_ref (device));
else if (capability & GDK_SEAT_CAPABILITY_KEYBOARD)
priv->slave_keyboards = g_list_prepend (priv->slave_keyboards, g_object_ref (device));
else
{
g_critical ("Unhandled capability %x for device '%s'",
capability, gdk_device_get_name (device));
return;
}
gdk_seat_device_added (GDK_SEAT (seat), device);
}
void
gdk_seat_default_remove_slave (GdkSeatDefault *seat,
GdkDevice *device)
{
GdkSeatDefaultPrivate *priv;
g_return_if_fail (GDK_IS_SEAT_DEFAULT (seat));
g_return_if_fail (GDK_IS_DEVICE (device));
priv = gdk_seat_default_get_instance_private (seat);
if (g_list_find (priv->slave_pointers, device))
{
priv->slave_pointers = g_list_remove (priv->slave_pointers, device);
gdk_seat_device_removed (GDK_SEAT (seat), device);
}
else if (g_list_find (priv->slave_keyboards, device))
{
priv->slave_keyboards = g_list_remove (priv->slave_keyboards, device);
gdk_seat_device_removed (GDK_SEAT (seat), device);
}
}

View File

@@ -0,0 +1,56 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef __GDK_SEAT_DEFAULT_PRIVATE_H__
#define __GDK_SEAT_DEFAULT_PRIVATE_H__
#include "gdkseat.h"
#include "gdkseatprivate.h"
#define GDK_TYPE_SEAT_DEFAULT (gdk_seat_default_get_type ())
#define GDK_SEAT_DEFAULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_SEAT_DEFAULT, GdkSeatDefault))
#define GDK_IS_SEAT_DEFAULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_SEAT_DEFAULT))
#define GDK_SEAT_DEFAULT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_SEAT_DEFAULT, GdkSeatDefaultClass))
#define GDK_IS_SEAT_DEFAULT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_SEAT_DEFAULT))
#define GDK_SEAT_DEFAULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_SEAT_DEFAULT, GdkSeatDefaultClass))
typedef struct _GdkSeatDefault GdkSeatDefault;
typedef struct _GdkSeatDefaultClass GdkSeatDefaultClass;
struct _GdkSeatDefault
{
GdkSeat parent_instance;
};
struct _GdkSeatDefaultClass
{
GdkSeatClass parent_class;
};
GType gdk_seat_default_get_type (void) G_GNUC_CONST;
GdkSeat * gdk_seat_default_new_for_master_pair (GdkDevice *pointer,
GdkDevice *keyboard);
void gdk_seat_default_add_slave (GdkSeatDefault *seat,
GdkDevice *device);
void gdk_seat_default_remove_slave (GdkSeatDefault *seat,
GdkDevice *device);
#endif /* __GDK_SEAT_DEFAULT_PRIVATE_H__ */

65
gdk/gdkseatprivate.h Normal file
View File

@@ -0,0 +1,65 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef __GDK_SEAT_PRIVATE_H__
#define __GDK_SEAT_PRIVATE_H__
typedef struct _GdkSeatClass GdkSeatClass;
#include "gdkseat.h"
#define GDK_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_SEAT, GdkSeatClass))
#define GDK_IS_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_SEAT))
#define GDK_SEAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_SEAT, GdkSeatClass))
struct _GdkSeatClass
{
GObjectClass parent_class;
void (* device_added) (GdkSeat *seat,
GdkDevice *device);
void (* device_removed) (GdkSeat *seat,
GdkDevice *device);
void (* device_changed) (GdkSeat *seat,
GdkDevice *device);
GdkSeatCapabilities (*get_capabilities) (GdkSeat *seat);
GdkGrabStatus (* grab) (GdkSeat *seat,
GdkWindow *window,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data);
void (* ungrab) (GdkSeat *seat);
GdkDevice * (* get_master) (GdkSeat *seat,
GdkSeatCapabilities capability);
GList * (* get_slaves) (GdkSeat *seat,
GdkSeatCapabilities capabilities);
};
void gdk_seat_device_added (GdkSeat *seat,
GdkDevice *device);
void gdk_seat_device_removed (GdkSeat *seat,
GdkDevice *device);
#endif /* __GDK_SEAT_PRIVATE_H__ */

View File

@@ -93,6 +93,26 @@ typedef struct _GdkRectangle GdkRectangle;
typedef cairo_rectangle_int_t GdkRectangle;
#endif
typedef struct _GdkBorder GdkBorder;
/**
* GdkBorder:
* @left: The width of the left border
* @right: The width of the right border
* @top: The width of the top border
* @bottom: The width of the bottom border
*
* A struct that specifies a border around a rectangular area
* that can be of different width on each side.
*/
struct _GdkBorder
{
gint left;
gint right;
gint top;
gint bottom;
};
/**
* GdkAtom:
*
@@ -143,6 +163,7 @@ typedef struct _GdkScreen GdkScreen;
typedef struct _GdkWindow GdkWindow;
typedef struct _GdkKeymap GdkKeymap;
typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
typedef struct _GdkSeat GdkSeat;
typedef struct _GdkGLContext GdkGLContext;
@@ -480,6 +501,54 @@ typedef enum {
GDK_GL_ERROR_UNSUPPORTED_PROFILE
} GdkGLError;
/**
* GdkWindowTypeHint:
* @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
* @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
* @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
* this hint only for torn-off menus, see #GtkTearoffMenuItem.
* @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
* @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
* screen during application startup.
* @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
* toolbars or dialogs.
* @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
* @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
* window.
* @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
* @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
* e.g. a context menu.
* @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
* @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
* that belongs to a status icon.
* @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
* @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
*
* These are hints for the window manager that indicate what type of function
* the window has. The window manager can use this when determining decoration
* and behaviour of the window. The hint must be set before mapping the window.
*
* See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
* specification for more details about window types.
*/
typedef enum
{
GDK_WINDOW_TYPE_HINT_NORMAL,
GDK_WINDOW_TYPE_HINT_DIALOG,
GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
GDK_WINDOW_TYPE_HINT_TOOLBAR,
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
GDK_WINDOW_TYPE_HINT_UTILITY,
GDK_WINDOW_TYPE_HINT_DOCK,
GDK_WINDOW_TYPE_HINT_DESKTOP,
GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
GDK_WINDOW_TYPE_HINT_TOOLTIP,
GDK_WINDOW_TYPE_HINT_NOTIFICATION,
GDK_WINDOW_TYPE_HINT_COMBO,
GDK_WINDOW_TYPE_HINT_DND
} GdkWindowTypeHint;
G_END_DECLS
#endif /* __GDK_TYPES_H__ */

View File

@@ -478,10 +478,12 @@ gdk_window_class_init (GdkWindowClass *klass)
}
static void
device_removed_cb (GdkDeviceManager *device_manager,
GdkDevice *device,
GdkWindow *window)
seat_removed_cb (GdkDisplay *display,
GdkSeat *seat,
GdkWindow *window)
{
GdkDevice *device = gdk_seat_get_pointer (seat);
window->devices_inside = g_list_remove (window->devices_inside, device);
g_hash_table_remove (window->device_cursor, device);
@@ -493,10 +495,9 @@ static void
gdk_window_finalize (GObject *object)
{
GdkWindow *window = GDK_WINDOW (object);
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
g_signal_handlers_disconnect_by_func (device_manager, device_removed_cb, window);
g_signal_handlers_disconnect_by_func (gdk_window_get_display (window),
seat_removed_cb, window);
if (!GDK_WINDOW_DESTROYED (window))
{
@@ -1287,7 +1288,6 @@ gdk_window_new (GdkWindow *parent,
gboolean native;
GdkEventMask event_mask;
GdkWindow *real_parent;
GdkDeviceManager *device_manager;
g_return_val_if_fail (attributes != NULL, NULL);
@@ -1451,10 +1451,8 @@ gdk_window_new (GdkWindow *parent,
(attributes->cursor) :
NULL));
device_manager = gdk_display_get_device_manager (gdk_window_get_display (parent));
g_signal_connect (device_manager, "device-removed",
G_CALLBACK (device_removed_cb), window);
g_signal_connect (gdk_window_get_display (parent), "seat-removed",
G_CALLBACK (seat_removed_cb), window);
if ((_gdk_gl_flags & (GDK_GL_ALWAYS | GDK_GL_DISABLE)) == GDK_GL_ALWAYS)
{
@@ -5373,6 +5371,8 @@ gdk_window_hide (GdkWindow *window)
GdkDeviceManager *device_manager;
GList *devices, *d;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
/* May need to break grabs on children */
display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display);
@@ -5396,6 +5396,7 @@ gdk_window_hide (GdkWindow *window)
window->state = GDK_WINDOW_STATE_WITHDRAWN;
g_list_free (devices);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
did_hide = _gdk_window_update_viewable (window);
@@ -6212,28 +6213,21 @@ gdk_window_set_cursor (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window))
{
GdkDeviceManager *device_manager;
GList *devices, *d;
GdkDevice *device;
GList *seats, *s;
if (cursor)
window->cursor = g_object_ref (cursor);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
for (d = devices; d; d = d->next)
for (s = seats; s; s = s->next)
{
GdkDevice *device;
device = d->data;
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
continue;
device = gdk_seat_get_pointer (s->data);
gdk_window_set_cursor_internal (window, device, window->cursor);
}
g_list_free (devices);
g_list_free (seats);
g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_CURSOR]);
}
}
@@ -7947,6 +7941,7 @@ send_crossing_event (GdkDisplay *display,
{
event = _gdk_make_event ((GdkWindow *)window, type, event_in_queue, TRUE);
gdk_event_set_device (event, device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
if (source_device)
gdk_event_set_source_device (event, source_device);
@@ -8250,11 +8245,10 @@ gdk_pointer_grab (GdkWindow * window,
{
GdkWindow *native;
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *device;
GdkGrabStatus res = 0;
gulong serial;
GList *devices, *dev;
GList *seats, *s;
g_return_val_if_fail (window != NULL, GDK_GRAB_FAILED);
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_FAILED);
@@ -8291,17 +8285,11 @@ gdk_pointer_grab (GdkWindow * window,
display = gdk_window_get_display (window);
serial = _gdk_display_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
/* FIXME: Should this be generic to all backends? */
/* FIXME: What happens with extended devices? */
for (dev = devices; dev; dev = dev->next)
for (s = seats; s; s = s->next)
{
device = dev->data;
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
continue;
device = gdk_seat_get_pointer (s->data);
res = GDK_DEVICE_GET_CLASS (device)->grab (device,
native,
@@ -8326,7 +8314,7 @@ gdk_pointer_grab (GdkWindow * window,
/* FIXME: handle errors when grabbing */
g_list_free (devices);
g_list_free (seats);
return res;
}
@@ -8362,11 +8350,10 @@ gdk_keyboard_grab (GdkWindow *window,
{
GdkWindow *native;
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *device;
GdkGrabStatus res = 0;
gulong serial;
GList *devices, *dev;
GList *seats, *s;
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_FAILED);
@@ -8391,17 +8378,11 @@ gdk_keyboard_grab (GdkWindow *window,
display = gdk_window_get_display (window);
serial = _gdk_display_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
seats = gdk_display_list_seats (display);
/* FIXME: Should this be generic to all backends? */
/* FIXME: What happens with extended devices? */
for (dev = devices; dev; dev = dev->next)
for (s = seats; s; s = s->next)
{
device = dev->data;
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
continue;
device = gdk_seat_get_keyboard (s->data);
res = GDK_DEVICE_GET_CLASS (device)->grab (device,
native,
@@ -8425,7 +8406,7 @@ gdk_keyboard_grab (GdkWindow *window,
/* FIXME: handle errors when grabbing */
g_list_free (devices);
g_list_free (seats);
return res;
}
@@ -8521,6 +8502,7 @@ gdk_window_set_source_events (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display);
@@ -8536,6 +8518,7 @@ gdk_window_set_source_events (GdkWindow *window,
}
g_list_free (devices);
G_GNUC_END_IGNORE_DEPRECATIONS;
/* Update accounting */
if (G_UNLIKELY (!window->source_event_masks))
@@ -9018,6 +9001,7 @@ proxy_pointer_event (GdkDisplay *display,
gdk_event_set_device (event, gdk_event_get_device (source_event));
gdk_event_set_source_device (event, source_device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
if (event_type == GDK_TOUCH_UPDATE)
{
@@ -9258,6 +9242,7 @@ proxy_button_event (GdkEvent *source_event,
&event->button.y_root);
gdk_event_set_device (event, gdk_event_get_device (source_event));
gdk_event_set_source_device (event, source_device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
if (is_touch_type (source_event->type))
{
@@ -9392,6 +9377,7 @@ proxy_gesture_event (GdkEvent *source_event,
event = _gdk_make_event (event_win, evtype, source_event, FALSE);
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, source_device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
switch (evtype)
{
@@ -9579,7 +9565,8 @@ _gdk_windowing_got_event (GdkDisplay *display,
goto out;
}
if (!(is_button_type (event->type) ||
if (!(event->type == GDK_TOUCH_CANCEL ||
is_button_type (event->type) ||
is_motion_type (event->type) ||
is_gesture_type (event->type)) ||
event_window->window_type == GDK_WINDOW_ROOT)
@@ -9684,13 +9671,14 @@ _gdk_windowing_got_event (GdkDisplay *display,
unlink_event = proxy_gesture_event (event, serial);
if ((event->type == GDK_BUTTON_RELEASE ||
event->type == GDK_TOUCH_CANCEL ||
event->type == GDK_TOUCH_END) &&
!event->any.send_event)
{
GdkEventSequence *sequence;
sequence = gdk_event_get_event_sequence (event);
if (event->type == GDK_TOUCH_END && sequence)
if (sequence)
{
_gdk_display_end_touch_grab (display, device, sequence);
}
@@ -10785,11 +10773,11 @@ gdk_window_begin_resize_drag (GdkWindow *window,
gint root_y,
guint32 timestamp)
{
GdkDeviceManager *device_manager;
GdkDisplay *display;
GdkDevice *device;
device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
device = gdk_device_manager_get_client_pointer (device_manager);
display = gdk_window_get_display (window);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
gdk_window_begin_resize_drag_for_device (window, edge,
device, button, root_x, root_y, timestamp);
}
@@ -10844,11 +10832,11 @@ gdk_window_begin_move_drag (GdkWindow *window,
gint root_y,
guint32 timestamp)
{
GdkDeviceManager *device_manager;
GdkDisplay *display;
GdkDevice *device;
device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
device = gdk_device_manager_get_client_pointer (device_manager);
display = gdk_window_get_display (window);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
gdk_window_begin_move_drag_for_device (window, device, button, root_x, root_y, timestamp);
}
@@ -10991,11 +10979,11 @@ GdkDragContext *
gdk_drag_begin (GdkWindow *window,
GList *targets)
{
GdkDeviceManager *device_manager;
GdkDisplay *display;
GdkDevice *device;
device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
device = gdk_device_manager_get_client_pointer (device_manager);
display = gdk_window_get_display (window);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
return gdk_drag_begin_for_device (window, device, targets);
}
@@ -11014,11 +11002,42 @@ gdk_drag_begin (GdkWindow *window,
* Returns: (transfer full): a newly created #GdkDragContext
*/
GdkDragContext *
gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets)
gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets)
{
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, targets);
gint x, y;
gdk_device_get_position (device, NULL, &x, &y);
return gdk_drag_begin_from_point (window, device, targets, x, y);
}
/**
* gdk_drag_begin_from_point:
* @window: the source window for this drag
* @device: the device that controls this drag
* @targets: (transfer none) (element-type GdkAtom): the offered targets,
* as list of #GdkAtoms
* @x_root: the x coordinate where the drag nominally started
* @y_root: the y coordinate where the drag nominally started
*
* Starts a drag and creates a new drag context for it.
*
* This function is called by the drag source.
*
* Returns: (transfer full): a newly created #GdkDragContext
*
* Since: 3.20
*/
GdkDragContext *
gdk_drag_begin_from_point (GdkWindow *window,
GdkDevice *device,
GList *targets,
gint x_root,
gint y_root)
{
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, targets, x_root, y_root);
}
/**

View File

@@ -153,55 +153,6 @@ typedef enum
GDK_HINT_USER_SIZE = 1 << 8
} GdkWindowHints;
/**
* GdkWindowTypeHint:
* @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
* @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
* @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
* this hint only for torn-off menus, see #GtkTearoffMenuItem.
* @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
* @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
* screen during application startup.
* @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
* toolbars or dialogs.
* @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
* @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
* window.
* @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
* @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
* e.g. a context menu.
* @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
* @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
* that belongs to a status icon.
* @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
* @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
*
* These are hints for the window manager that indicate what type of function
* the window has. The window manager can use this when determining decoration
* and behaviour of the window. The hint must be set before mapping the window.
*
* See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
* specification for more details about window types.
*/
typedef enum
{
GDK_WINDOW_TYPE_HINT_NORMAL,
GDK_WINDOW_TYPE_HINT_DIALOG,
GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
GDK_WINDOW_TYPE_HINT_TOOLBAR,
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
GDK_WINDOW_TYPE_HINT_UTILITY,
GDK_WINDOW_TYPE_HINT_DOCK,
GDK_WINDOW_TYPE_HINT_DESKTOP,
GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
GDK_WINDOW_TYPE_HINT_TOOLTIP,
GDK_WINDOW_TYPE_HINT_NOTIFICATION,
GDK_WINDOW_TYPE_HINT_COMBO,
GDK_WINDOW_TYPE_HINT_DND
} GdkWindowTypeHint;
/* The next two enumeration values current match the
* Motif constants. If this is changed, the implementation
* of gdk_window_set_decorations/gdk_window_set_functions

View File

@@ -239,7 +239,9 @@ struct _GdkWindowImplClass
void (* register_dnd) (GdkWindow *window);
GdkDragContext * (*drag_begin) (GdkWindow *window,
GdkDevice *device,
GList *targets);
GList *targets,
gint x_root,
gint y_root);
void (*process_updates_recurse) (GdkWindow *window,
cairo_region_t *region);

View File

@@ -103,7 +103,6 @@ _gdk_mir_print_touch_event (const MirInputEvent *event)
g_printerr ("TOUCH\n");
g_printerr (" Device %lld\n", (long long int) mir_input_event_get_device_id (event));
g_printerr (" Cookie %lu %lu\n", mir_touch_event_get_cookie (touch_event).timestamp, mir_touch_event_get_cookie (touch_event).mac);
g_printerr (" Event Time %lld\n", (long long int) mir_input_event_get_event_time (event));
_gdk_mir_print_modifiers (mir_touch_event_modifiers (touch_event));
n = mir_touch_event_point_count (touch_event);

View File

@@ -590,6 +590,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
event->dnd.time = GDK_CURRENT_TIME;
gdk_event_set_device (event, gdk_drag_context_get_device (current_context));
gdk_event_set_seat (event, gdk_device_get_seat (gdk_drag_context_get_device (current_context)));
_gdk_event_emit (event);
@@ -620,6 +621,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
event->dnd.time = GDK_CURRENT_TIME;
gdk_event_set_device (event, gdk_drag_context_get_device (current_context));
gdk_event_set_seat (event, gdk_device_get_seat (gdk_drag_context_get_device (current_context)));
_gdk_event_emit (event);
@@ -648,6 +650,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
event->dnd.y_root = gy;
gdk_event_set_device (event, gdk_drag_context_get_device (current_context));
gdk_event_set_seat (event, gdk_device_get_seat (gdk_drag_context_get_device (current_context)));
_gdk_event_emit (event);
@@ -675,6 +678,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
event->dnd.y_root = gy;
gdk_event_set_device (event, gdk_drag_context_get_device (current_context));
gdk_event_set_seat (event, gdk_device_get_seat (gdk_drag_context_get_device (current_context)));
_gdk_event_emit (event);
@@ -695,6 +699,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
{
GdkEvent *event;
GdkScreen *screen;
GdkDevice *device;
g_assert (_gdk_quartz_drag_source_context != NULL);
@@ -730,8 +735,9 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
}
}
gdk_event_set_device (event,
gdk_drag_context_get_device (_gdk_quartz_drag_source_context));
device = gdk_drag_context_get_device (_gdk_quartz_drag_source_context);
gdk_event_set_device (event, device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
_gdk_event_emit (event);

View File

@@ -20,10 +20,12 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkdevicemanager.h>
#include <gdk/gdkdeviceprivate.h>
#include <gdk/gdkseatdefaultprivate.h>
#include <gdk/gdkdevicemanagerprivate.h>
#include "gdkdevicemanager-core-quartz.h"
#include "gdkquartzdevice-core.h"
#include "gdkkeysyms.h"
#include "gdkprivate-quartz.h"
#define HAS_FOCUS(toplevel) \
@@ -104,6 +106,7 @@ gdk_quartz_device_manager_core_constructed (GObject *object)
{
GdkQuartzDeviceManagerCore *device_manager;
GdkDisplay *display;
GdkSeat *seat;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (object);
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
@@ -112,6 +115,11 @@ gdk_quartz_device_manager_core_constructed (GObject *object)
_gdk_device_set_associated_device (device_manager->core_pointer, device_manager->core_keyboard);
_gdk_device_set_associated_device (device_manager->core_keyboard, device_manager->core_pointer);
seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer,
device_manager->core_keyboard);
gdk_display_add_seat (display, seat);
g_object_unref (seat);
}
static GList *

View File

@@ -35,7 +35,9 @@ gdk_quartz_drag_source_context ()
GdkDragContext *
_gdk_quartz_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets)
GList *targets,
gint x_root,
gint y_root)
{
g_assert (_gdk_quartz_drag_source_context == NULL);

View File

@@ -507,6 +507,7 @@ create_focus_event (GdkWindow *window,
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
return event;
}
@@ -540,6 +541,7 @@ generate_motion_event (GdkWindow *window)
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = _gdk_display->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (_gdk_display->core_pointer));
append_event (event, TRUE);
}
@@ -876,6 +878,7 @@ fill_crossing_event (GdkWindow *toplevel,
_gdk_quartz_events_get_current_mouse_modifiers ();
gdk_event_set_device (event, _gdk_display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (_gdk_display->core_pointer));
/* FIXME: Focus and button state? */
}
@@ -926,6 +929,7 @@ fill_button_event (GdkWindow *window,
event->button.state = state;
event->button.button = get_mouse_button_from_ns_event (nsevent);
event->button.device = _gdk_display->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (_gdk_display->core_pointer));
}
static void
@@ -949,6 +953,7 @@ fill_motion_event (GdkWindow *window,
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = _gdk_display->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (_gdk_display->core_pointer));
}
static void
@@ -979,6 +984,7 @@ fill_scroll_event (GdkWindow *window,
event->scroll.device = _gdk_display->core_pointer;
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
gdk_event_set_seat (event, gdk_device_get_seat (_gdk_display->core_pointer));
}
static void
@@ -1005,6 +1011,7 @@ fill_key_event (GdkWindow *window,
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (_gdk_display),
event->key.hardware_keycode,
@@ -1171,6 +1178,7 @@ _gdk_quartz_synthesize_null_key_event (GdkWindow *window)
event->key.keyval = GDK_KEY_VoidSymbol;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
append_event(event, FALSE);
}

View File

@@ -80,7 +80,9 @@ void _gdk_quartz_synthesize_null_key_event (GdkWindow *window);
void _gdk_quartz_window_register_dnd (GdkWindow *window);
GdkDragContext * _gdk_quartz_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets);
GList *targets,
gint x_root,
gint y_root);
/* Display */

View File

@@ -20,10 +20,10 @@ noinst_LTLIBRARIES = \
libgdk-wayland.la
BUILT_SOURCES = \
pointer-gestures-client-protocol.h \
pointer-gestures-protocol.c \
xdg-shell-client-protocol.h \
xdg-shell-protocol.c \
pointer-gestures-unstable-v1-client-protocol.h \
pointer-gestures-unstable-v1-protocol.c \
xdg-shell-unstable-v5-client-protocol.h \
xdg-shell-unstable-v5-protocol.c \
gtk-shell-client-protocol.h \
gtk-shell-protocol.c
@@ -45,6 +45,7 @@ libgdk_wayland_la_SOURCES = \
gdkglcontext-wayland.c \
gdkglcontext-wayland.h \
gdkscreen-wayland.c \
gdkseat-wayland.h \
gdkselection-wayland.c \
gdkwindow-wayland.c \
gdkwayland.h \
@@ -62,6 +63,22 @@ libgdkwaylandinclude_HEADERS = \
gdkwaylandselection.h \
gdkwaylandwindow.h
.SECONDEXPANSION:
define protostability
$(shell echo $1 | sed 's/.*\(\<unstable\>\|\<stable\>\).*/\1/')
endef
define protoname
$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
endef
%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
$(AM_V_GEN)$(SED) -i -e 's/WL_EXPORT //' $@
%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
%-protocol.c : $(srcdir)/protocol/%.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
$(AM_V_GEN)$(SED) -i -e 's/WL_EXPORT //' $@
@@ -72,8 +89,6 @@ libgdkwaylandinclude_HEADERS = \
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
EXTRA_DIST += \
protocol/pointer-gestures.xml \
protocol/xdg-shell.xml \
protocol/gtk-shell.xml
-include $(top_srcdir)/git.mk

View File

@@ -87,17 +87,23 @@ static const struct {
const gchar *css_name, *traditional_name;
} name_map[] = {
{ "default", "left_ptr" },
{ "help", "left_ptr" },
{ "context-menu", "left_ptr" },
{ "pointer", "hand" },
{ "progress", "left_ptr_watch" },
{ "wait", "watch" },
{ "cell", "crosshair" },
{ "crosshair", "cross" },
{ "text", "xterm" },
{ "vertical-text","xterm" },
{ "alias", "dnd-link" },
{ "copy", "dnd-copy" },
{ "move", "dnd-move" },
{ "no-drop", "dnd-none" },
{ "not-allowed", "crossed_circle" },
{ "grab", "hand2" },
{ "grabbing", "hand2" },
{ "all-scroll", "left_ptr" },
{ "col-resize", "h_double_arrow" },
{ "row-resize", "v_double_arrow" },
{ "n-resize", "top_side" },
@@ -112,6 +118,8 @@ static const struct {
{ "ns-resize", "v_double_arrow" },
{ "nesw-resize", "fd_double_arrow" },
{ "nwse-resize", "bd_double_arrow" },
{ "zoom-in", "left_ptr" },
{ "zoom-out", "left_ptr" },
{ NULL, NULL }
};
@@ -126,7 +134,7 @@ name_fallback (const gchar *name)
return name_map[i].traditional_name;
}
return "left_ptr";
return NULL;
}
static gboolean
@@ -144,17 +152,22 @@ _gdk_wayland_cursor_update (GdkWaylandDisplay *wayland_display,
cursor->scale);
c = wl_cursor_theme_get_cursor (theme, cursor->name);
if (!c)
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
{
const char *fallback;
fallback = name_fallback (cursor->name);
if (fallback)
{
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
if (!c)
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
}
}
if (!c)
{
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", cursor->name);
/* return the left_ptr cursor as a fallback */
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
if (!c)
return FALSE;
return FALSE;
}
cursor->wl_cursor = c;

View File

@@ -25,11 +25,13 @@
#include <gdk/gdkwindow.h>
#include <gdk/gdktypes.h>
#include "gdkprivate-wayland.h"
#include "gdkseat-wayland.h"
#include "gdkwayland.h"
#include "gdkkeysyms.h"
#include "gdkdeviceprivate.h"
#include "gdkdevicemanagerprivate.h"
#include "pointer-gestures-client-protocol.h"
#include "gdkseatprivate.h"
#include "pointer-gestures-unstable-v1-client-protocol.h"
#include <xkbcommon/xkbcommon.h>
@@ -52,15 +54,17 @@ struct _GdkWaylandTouchData
guint initial_touch : 1;
};
struct _GdkWaylandDeviceData
struct _GdkWaylandSeat
{
GdkSeat parent_instance;
guint32 id;
struct wl_seat *wl_seat;
struct wl_pointer *wl_pointer;
struct wl_keyboard *wl_keyboard;
struct wl_touch *wl_touch;
struct _wl_pointer_gesture_swipe *wl_pointer_gesture_swipe;
struct _wl_pointer_gesture_pinch *wl_pointer_gesture_pinch;
struct zwp_pointer_gesture_swipe_v1 *wp_pointer_gesture_swipe;
struct zwp_pointer_gesture_pinch_v1 *wp_pointer_gesture_pinch;
GdkDisplay *display;
GdkDeviceManager *device_manager;
@@ -96,7 +100,6 @@ struct _GdkWaylandDeviceData
guint32 repeat_count;
GSettings *keyboard_settings;
GdkCursor *grab_cursor;
guint cursor_timeout_id;
guint cursor_image_index;
guint cursor_image_delay;
@@ -115,6 +118,8 @@ struct _GdkWaylandDeviceData
gdouble gesture_scale;
};
G_DEFINE_TYPE (GdkWaylandSeat, gdk_wayland_seat, GDK_TYPE_SEAT)
struct _GdkWaylandDevice
{
GdkDevice parent_instance;
@@ -206,12 +211,7 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
guint next_image_index, next_image_delay;
gboolean retval = G_SOURCE_REMOVE;
if (wd->grab_cursor)
{
buffer = _gdk_wayland_cursor_get_buffer (wd->grab_cursor, 0,
&x, &y, &w, &h, &scale);
}
else if (wd->cursor)
if (wd->cursor)
{
buffer = _gdk_wayland_cursor_get_buffer (wd->cursor, wd->cursor_image_index,
&x, &y, &w, &h, &scale);
@@ -248,13 +248,6 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
wl_surface_commit (wd->pointer_surface);
}
if (wd->grab_cursor)
{
/* We admit only static icons during drags so far */
gdk_wayland_device_stop_window_cursor_animation (wd);
return retval;
}
next_image_index =
_gdk_wayland_cursor_get_next_image_index (wd->cursor,
wd->cursor_image_index,
@@ -410,6 +403,7 @@ emulate_crossing (GdkWindow *window,
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
gdk_window_get_device_position_double (window, device,
&event->crossing.x, &event->crossing.y,
@@ -440,6 +434,7 @@ emulate_touch_crossing (GdkWindow *window,
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, source);
gdk_event_set_seat (event, gdk_device_get_seat (device));
event->crossing.x = touch->x;
event->crossing.y = touch->y;
@@ -462,6 +457,7 @@ emulate_focus (GdkWindow *window,
event->focus_change.in = focus_in;
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
_gdk_wayland_display_deliver_event (gdk_window_get_display (window), event);
}
@@ -492,12 +488,17 @@ device_emit_grab_crossing (GdkDevice *device,
static GdkWindow *
gdk_wayland_device_get_focus (GdkDevice *device)
{
GdkWaylandDeviceData *wayland_device = GDK_WAYLAND_DEVICE (device)->device;
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_DEVICE (device)->device;
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
return wayland_device->keyboard_focus;
if (device == wayland_seat->master_keyboard)
return wayland_seat->keyboard_focus;
else if (device == wayland_seat->master_pointer)
return wayland_seat->pointer_focus;
else if (device == wayland_seat->touch_master &&
GDK_WAYLAND_DEVICE(device)->emulating_touch)
return GDK_WAYLAND_DEVICE(device)->emulating_touch->window;
else
return wayland_device->pointer_focus;
return NULL;
}
static GdkGrabStatus
@@ -534,21 +535,12 @@ gdk_wayland_device_grab (GdkDevice *device,
wayland_device->pointer_grab_window = window;
wayland_device->pointer_grab_time = time_;
_gdk_wayland_window_set_grab_seat (window, GDK_SEAT (wayland_device));
/* FIXME: This probably breaks if you end up with multiple grabs
* on the same window - but we need to know the input device for
* when we are asked to map a popup window so that the grab can
* be managed by the compositor.
*/
_gdk_wayland_window_set_device_grabbed (window,
device,
wayland_device->wl_seat,
time_);
g_clear_object (&wayland_device->grab_cursor);
g_clear_object (&wayland_device->cursor);
if (cursor)
wayland_device->grab_cursor = g_object_ref (cursor);
wayland_device->cursor = g_object_ref (cursor);
gdk_wayland_device_update_window_cursor (wayland_device);
}
@@ -587,14 +579,11 @@ gdk_wayland_device_ungrab (GdkDevice *device,
else
{
/* Device is a pointer */
g_clear_object (&wayland_device->grab_cursor);
gdk_wayland_device_update_window_cursor (wayland_device);
if (wayland_device->pointer_grab_window)
_gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
NULL,
NULL,
0);
_gdk_wayland_window_set_grab_seat (wayland_device->pointer_grab_window,
NULL);
}
}
@@ -956,6 +945,7 @@ pointer_handle_enter (void *data,
event->crossing.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
@@ -1003,6 +993,7 @@ pointer_handle_leave (void *data,
event->crossing.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
@@ -1055,6 +1046,7 @@ pointer_handle_motion (void *data,
event->motion.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->motion.time = time;
event->motion.axes = NULL;
event->motion.state = device->button_modifiers | device->key_modifiers;
@@ -1119,6 +1111,7 @@ pointer_handle_button (void *data,
event->button.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->button.time = time;
event->button.axes = NULL;
event->button.state = device->button_modifiers | device->key_modifiers;
@@ -1182,6 +1175,7 @@ pointer_handle_axis (void *data,
event->scroll.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->scroll.time = time;
event->scroll.direction = GDK_SCROLL_SMOOTH;
event->scroll.delta_x = delta_x;
@@ -1246,6 +1240,7 @@ keyboard_handle_enter (void *data,
event->focus_change.in = TRUE;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
GDK_NOTE (EVENTS,
g_message ("focus in, device %p surface %p",
@@ -1291,6 +1286,7 @@ keyboard_handle_leave (void *data,
event->focus_change.in = FALSE;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_keyboard));
g_object_unref (device->keyboard_focus);
device->keyboard_focus = NULL;
@@ -1468,6 +1464,7 @@ deliver_key_event (GdkWaylandDeviceData *device,
event->key.window = device->keyboard_focus ? g_object_ref (device->keyboard_focus) : NULL;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_keyboard));
event->key.time = time_;
event->key.state = device->button_modifiers | device->key_modifiers;
event->key.group = 0;
@@ -1631,6 +1628,7 @@ _create_touch_event (GdkWaylandDeviceData *device,
event->touch.window = g_object_ref (touch->window);
gdk_event_set_device (event, device->touch_master);
gdk_event_set_source_device (event, device->touch);
gdk_event_set_seat (event, gdk_device_get_seat (device->touch_master));
event->touch.time = time;
event->touch.state = device->button_modifiers | device->key_modifiers;
gdk_event_set_screen (event, display->screen);
@@ -1759,19 +1757,28 @@ static void
touch_handle_cancel (void *data,
struct wl_touch *wl_touch)
{
GdkWaylandDeviceData *device = data;
GdkWaylandSeat *wayland_seat = data;
GdkWaylandTouchData *touch;
GHashTableIter iter;
GdkEvent *event;
g_hash_table_iter_init (&iter, device->touches);
if (GDK_WAYLAND_DEVICE (wayland_seat->touch_master)->emulating_touch)
{
touch = GDK_WAYLAND_DEVICE (wayland_seat->touch_master)->emulating_touch;
GDK_WAYLAND_DEVICE (wayland_seat->touch_master)->emulating_touch = NULL;
emulate_touch_crossing (touch->window, NULL,
wayland_seat->touch_master, wayland_seat->touch,
touch, GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL,
GDK_CURRENT_TIME);
}
g_hash_table_iter_init (&iter, wayland_seat->touches);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &touch))
{
event = _create_touch_event (device, touch, GDK_TOUCH_CANCEL,
event = _create_touch_event (wayland_seat, touch, GDK_TOUCH_CANCEL,
GDK_CURRENT_TIME);
_gdk_wayland_display_deliver_event (device->display, event);
_gdk_wayland_display_deliver_event (wayland_seat->display, event);
g_hash_table_iter_remove (&iter);
}
@@ -1799,6 +1806,7 @@ emit_gesture_swipe_event (GdkWaylandDeviceData *device,
event->touchpad_swipe.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->touchpad_swipe.time = _time;
event->touchpad_swipe.state = device->button_modifiers | device->key_modifiers;
gdk_event_set_screen (event, display->screen);
@@ -1822,12 +1830,12 @@ emit_gesture_swipe_event (GdkWaylandDeviceData *device,
}
static void
gesture_swipe_begin (void *data,
struct _wl_pointer_gesture_swipe *swipe,
uint32_t serial,
uint32_t time,
struct wl_surface *surface,
uint32_t fingers)
gesture_swipe_begin (void *data,
struct zwp_pointer_gesture_swipe_v1 *swipe,
uint32_t serial,
uint32_t time,
struct wl_surface *surface,
uint32_t fingers)
{
GdkWaylandDeviceData *device = data;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
@@ -1841,11 +1849,11 @@ gesture_swipe_begin (void *data,
}
static void
gesture_swipe_update (void *data,
struct _wl_pointer_gesture_swipe *swipe,
uint32_t time,
wl_fixed_t dx,
wl_fixed_t dy)
gesture_swipe_update (void *data,
struct zwp_pointer_gesture_swipe_v1 *swipe,
uint32_t time,
wl_fixed_t dx,
wl_fixed_t dy)
{
GdkWaylandDeviceData *device = data;
@@ -1858,11 +1866,11 @@ gesture_swipe_update (void *data,
}
static void
gesture_swipe_end (void *data,
struct _wl_pointer_gesture_swipe *swipe,
uint32_t serial,
uint32_t time,
int32_t cancelled)
gesture_swipe_end (void *data,
struct zwp_pointer_gesture_swipe_v1 *swipe,
uint32_t serial,
uint32_t time,
int32_t cancelled)
{
GdkWaylandDeviceData *device = data;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
@@ -1901,6 +1909,7 @@ emit_gesture_pinch_event (GdkWaylandDeviceData *device,
event->touchpad_pinch.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device->master_pointer));
event->touchpad_pinch.time = _time;
event->touchpad_pinch.state = device->button_modifiers | device->key_modifiers;
gdk_event_set_screen (event, display->screen);
@@ -1926,12 +1935,12 @@ emit_gesture_pinch_event (GdkWaylandDeviceData *device,
}
static void
gesture_pinch_begin (void *data,
struct _wl_pointer_gesture_pinch *pinch,
uint32_t serial,
uint32_t time,
struct wl_surface *surface,
uint32_t fingers)
gesture_pinch_begin (void *data,
struct zwp_pointer_gesture_pinch_v1 *pinch,
uint32_t serial,
uint32_t time,
struct wl_surface *surface,
uint32_t fingers)
{
GdkWaylandDeviceData *device = data;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
@@ -1944,13 +1953,13 @@ gesture_pinch_begin (void *data,
}
static void
gesture_pinch_update (void *data,
struct _wl_pointer_gesture_pinch *pinch,
uint32_t time,
wl_fixed_t dx,
wl_fixed_t dy,
wl_fixed_t scale,
wl_fixed_t rotation)
gesture_pinch_update (void *data,
struct zwp_pointer_gesture_pinch_v1 *pinch,
uint32_t time,
wl_fixed_t dx,
wl_fixed_t dy,
wl_fixed_t scale,
wl_fixed_t rotation)
{
GdkWaylandDeviceData *device = data;
@@ -1964,11 +1973,11 @@ gesture_pinch_update (void *data,
}
static void
gesture_pinch_end (void *data,
struct _wl_pointer_gesture_pinch *pinch,
uint32_t serial,
uint32_t time,
int32_t cancelled)
gesture_pinch_end (void *data,
struct zwp_pointer_gesture_pinch_v1 *pinch,
uint32_t serial,
uint32_t time,
int32_t cancelled)
{
GdkWaylandDeviceData *device = data;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
@@ -2010,13 +2019,13 @@ static const struct wl_touch_listener touch_listener = {
touch_handle_cancel
};
static const struct _wl_pointer_gesture_swipe_listener gesture_swipe_listener = {
static const struct zwp_pointer_gesture_swipe_v1_listener gesture_swipe_listener = {
gesture_swipe_begin,
gesture_swipe_update,
gesture_swipe_end
};
static const struct _wl_pointer_gesture_pinch_listener gesture_pinch_listener = {
static const struct zwp_pointer_gesture_pinch_v1_listener gesture_pinch_listener = {
gesture_pinch_begin,
gesture_pinch_update,
gesture_pinch_end
@@ -2051,6 +2060,7 @@ seat_handle_capabilities (void *data,
"has-cursor", TRUE,
"display", device->display,
"device-manager", device->device_manager,
"seat", device,
NULL);
_gdk_device_set_associated_device (device->pointer, device->master_pointer);
GDK_WAYLAND_DEVICE (device->pointer)->device = device;
@@ -2060,21 +2070,21 @@ seat_handle_capabilities (void *data,
if (wayland_display->pointer_gestures)
{
device->wl_pointer_gesture_swipe =
_wl_pointer_gestures_get_swipe_gesture (wayland_display->pointer_gestures,
device->wl_pointer);
_wl_pointer_gesture_swipe_set_user_data (device->wl_pointer_gesture_swipe,
device);
_wl_pointer_gesture_swipe_add_listener (device->wl_pointer_gesture_swipe,
&gesture_swipe_listener, device);
device->wp_pointer_gesture_swipe =
zwp_pointer_gestures_v1_get_swipe_gesture (wayland_display->pointer_gestures,
device->wl_pointer);
zwp_pointer_gesture_swipe_v1_set_user_data (device->wp_pointer_gesture_swipe,
device);
zwp_pointer_gesture_swipe_v1_add_listener (device->wp_pointer_gesture_swipe,
&gesture_swipe_listener, device);
device->wl_pointer_gesture_pinch =
_wl_pointer_gestures_get_pinch_gesture (wayland_display->pointer_gestures,
device->wl_pointer);
_wl_pointer_gesture_pinch_set_user_data (device->wl_pointer_gesture_pinch,
device);
_wl_pointer_gesture_pinch_add_listener (device->wl_pointer_gesture_pinch,
&gesture_pinch_listener, device);
device->wp_pointer_gesture_pinch =
zwp_pointer_gestures_v1_get_pinch_gesture (wayland_display->pointer_gestures,
device->wl_pointer);
zwp_pointer_gesture_pinch_v1_set_user_data (device->wp_pointer_gesture_pinch,
device);
zwp_pointer_gesture_pinch_v1_add_listener (device->wp_pointer_gesture_pinch,
&gesture_pinch_listener, device);
}
g_signal_emit_by_name (device_manager, "device-added", device->pointer);
@@ -2107,6 +2117,7 @@ seat_handle_capabilities (void *data,
"has-cursor", FALSE,
"display", device->display,
"device-manager", device->device_manager,
"seat", device,
NULL);
_gdk_device_set_associated_device (device->keyboard, device->master_keyboard);
GDK_WAYLAND_DEVICE (device->keyboard)->device = device;
@@ -2144,6 +2155,7 @@ seat_handle_capabilities (void *data,
"has-cursor", TRUE,
"display", device->display,
"device-manager", device->device_manager,
"seat", device,
NULL);
GDK_WAYLAND_DEVICE (device->touch_master)->device = device;
_gdk_device_set_associated_device (device->touch_master, device->master_keyboard);
@@ -2160,6 +2172,7 @@ seat_handle_capabilities (void *data,
"has-cursor", FALSE,
"display", device->display,
"device-manager", device->device_manager,
"seat", device,
NULL);
_gdk_device_set_associated_device (device->touch, device->touch_master);
GDK_WAYLAND_DEVICE (device->touch)->device = device;
@@ -2224,6 +2237,7 @@ init_devices (GdkWaylandDeviceData *device)
"has-cursor", TRUE,
"display", device->display,
"device-manager", device_manager,
"seat", device,
NULL);
GDK_WAYLAND_DEVICE (device->master_pointer)->device = device;
@@ -2240,6 +2254,7 @@ init_devices (GdkWaylandDeviceData *device)
"has-cursor", FALSE,
"display", device->display,
"device-manager", device_manager,
"seat", device,
NULL);
GDK_WAYLAND_DEVICE (device->master_keyboard)->device = device;
@@ -2276,8 +2291,6 @@ pointer_surface_update_scale (GdkWaylandDeviceData *device)
device->current_output_scale = scale;
if (device->grab_cursor)
_gdk_wayland_cursor_set_scale (device->grab_cursor, scale);
if (device->cursor)
_gdk_wayland_cursor_set_scale (device->cursor, scale);
@@ -2344,6 +2357,262 @@ create_foreign_dnd_window (GdkDisplay *display)
return gdk_window_new (gdk_screen_get_root_window (screen), &attrs, mask);
}
static void
gdk_wayland_seat_finalize (GObject *object)
{
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (object);
seat_handle_capabilities (seat, seat->wl_seat, 0);
g_object_unref (seat->keymap);
wl_surface_destroy (seat->pointer_surface);
/* FIXME: destroy data_device */
g_clear_object (&seat->keyboard_settings);
g_clear_object (&seat->drop_context);
g_hash_table_destroy (seat->touches);
gdk_window_destroy (seat->foreign_dnd_window);
stop_key_repeat (seat);
G_OBJECT_CLASS (gdk_wayland_seat_parent_class)->finalize (object);
}
static GdkSeatCapabilities
gdk_wayland_seat_get_capabilities (GdkSeat *seat)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
GdkSeatCapabilities caps = 0;
if (wayland_seat->master_pointer)
caps |= GDK_SEAT_CAPABILITY_POINTER;
if (wayland_seat->master_keyboard)
caps |= GDK_SEAT_CAPABILITY_KEYBOARD;
if (wayland_seat->touch_master)
caps |= GDK_SEAT_CAPABILITY_TOUCH;
return caps;
}
static GdkGrabStatus
gdk_wayland_seat_grab (GdkSeat *seat,
GdkWindow *window,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
GdkDisplay *display = gdk_seat_get_display (seat);
GdkWindow *native;
native = gdk_window_get_toplevel (window);
while (native->window_type == GDK_WINDOW_OFFSCREEN)
{
native = gdk_offscreen_window_get_embedder (native);
if (native == NULL ||
(!_gdk_window_has_impl (native) &&
!gdk_window_is_viewable (native)))
return GDK_GRAB_NOT_VIEWABLE;
native = gdk_window_get_toplevel (native);
}
if (native == NULL || GDK_WINDOW_DESTROYED (native))
return GDK_GRAB_NOT_VIEWABLE;
wayland_seat->pointer_grab_window = window;
wayland_seat->pointer_grab_time = evtime;
_gdk_wayland_window_set_grab_seat (window, seat);
if (prepare_func)
(prepare_func) (seat, window, prepare_func_data);
if (!gdk_window_is_visible (window))
{
_gdk_wayland_window_set_grab_seat (window, NULL);
g_critical ("Window %p has not been made visible in GdkSeatGrabPrepareFunc",
window);
return GDK_GRAB_NOT_VIEWABLE;
}
if (wayland_seat->master_pointer &&
capabilities & GDK_SEAT_CAPABILITY_POINTER)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
if (prev_focus != window)
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
window, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_pointer,
window,
native,
GDK_OWNERSHIP_NONE,
owner_events,
GDK_ALL_EVENTS_MASK,
_gdk_display_get_next_serial (display),
evtime,
FALSE);
g_set_object (&wayland_seat->cursor, cursor);
gdk_wayland_device_update_window_cursor (wayland_seat);
}
if (wayland_seat->touch_master &&
capabilities & GDK_SEAT_CAPABILITY_TOUCH)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
if (prev_focus != window)
device_emit_grab_crossing (wayland_seat->touch_master, prev_focus,
window, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->touch_master,
window,
native,
GDK_OWNERSHIP_NONE,
owner_events,
GDK_ALL_EVENTS_MASK,
_gdk_display_get_next_serial (display),
evtime,
FALSE);
}
if (wayland_seat->master_keyboard &&
capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
if (prev_focus != window)
device_emit_grab_crossing (wayland_seat->master_keyboard, prev_focus,
window, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_keyboard,
window,
native,
GDK_OWNERSHIP_NONE,
owner_events,
GDK_ALL_EVENTS_MASK,
_gdk_display_get_next_serial (display),
evtime,
FALSE);
}
return GDK_GRAB_SUCCESS;
}
static void
gdk_wayland_seat_ungrab (GdkSeat *seat)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
GdkDisplay *display = gdk_seat_get_display (seat);;
GdkDeviceGrabInfo *grab;
if (wayland_seat->master_pointer)
{
GdkWindow *focus, *prev_focus = NULL;
grab = _gdk_display_get_last_device_grab (display, wayland_seat->master_pointer);
if (grab)
{
grab->serial_end = grab->serial_start;
prev_focus = grab->window;
}
focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
if (focus != prev_focus)
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
focus, GDK_CROSSING_UNGRAB,
GDK_CURRENT_TIME);
gdk_wayland_device_update_window_cursor (wayland_seat);
}
if (wayland_seat->master_keyboard)
{
grab = _gdk_display_get_last_device_grab (display, wayland_seat->master_keyboard);
if (grab)
grab->serial_end = grab->serial_start;
}
if (wayland_seat->touch_master)
{
grab = _gdk_display_get_last_device_grab (display, wayland_seat->touch_master);
if (grab)
grab->serial_end = grab->serial_start;
}
if (wayland_seat->pointer_grab_window)
{
_gdk_wayland_window_set_grab_seat (wayland_seat->pointer_grab_window,
NULL);
wayland_seat->pointer_grab_window = NULL;
}
}
static GdkDevice *
gdk_wayland_seat_get_master (GdkSeat *seat,
GdkSeatCapabilities capabilities)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
if (capabilities == GDK_SEAT_CAPABILITY_POINTER)
return wayland_seat->master_pointer;
else if (capabilities == GDK_SEAT_CAPABILITY_KEYBOARD)
return wayland_seat->master_keyboard;
else if (capabilities == GDK_SEAT_CAPABILITY_TOUCH)
return wayland_seat->touch_master;
return NULL;
}
static GList *
gdk_wayland_seat_get_slaves (GdkSeat *seat,
GdkSeatCapabilities capabilities)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
GList *slaves = NULL;
if (capabilities & GDK_SEAT_CAPABILITY_POINTER)
slaves = g_list_prepend (slaves, wayland_seat->pointer);
if (capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
slaves = g_list_prepend (slaves, wayland_seat->keyboard);
if (capabilities & GDK_SEAT_CAPABILITY_TOUCH)
slaves = g_list_prepend (slaves, wayland_seat->touch);
return slaves;
}
static void
gdk_wayland_seat_class_init (GdkWaylandSeatClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkSeatClass *seat_class = GDK_SEAT_CLASS (klass);
object_class->finalize = gdk_wayland_seat_finalize;
seat_class->get_capabilities = gdk_wayland_seat_get_capabilities;
seat_class->grab = gdk_wayland_seat_grab;
seat_class->ungrab = gdk_wayland_seat_ungrab;
seat_class->get_master = gdk_wayland_seat_get_master;
seat_class->get_slaves = gdk_wayland_seat_get_slaves;
}
static void
gdk_wayland_seat_init (GdkWaylandSeat *seat)
{
}
void
_gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
guint32 id,
@@ -2351,70 +2620,65 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
{
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
GdkWaylandDeviceData *device;
GdkWaylandSeat *seat;
display = gdk_device_manager_get_display (device_manager);
display_wayland = GDK_WAYLAND_DISPLAY (display);
device = g_new0 (GdkWaylandDeviceData, 1);
device->id = id;
device->keymap = _gdk_wayland_keymap_new ();
device->display = display;
device->device_manager = device_manager;
device->touches = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_free);
device->foreign_dnd_window = create_foreign_dnd_window (display);
device->wl_seat = wl_seat;
seat = g_object_new (GDK_TYPE_WAYLAND_SEAT,
"display", display,
NULL);
seat->id = id;
seat->keymap = _gdk_wayland_keymap_new ();
seat->display = display;
seat->device_manager = device_manager;
seat->touches = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_free);
seat->foreign_dnd_window = create_foreign_dnd_window (display);
seat->wl_seat = wl_seat;
device->pending_selection = GDK_NONE;
seat->pending_selection = GDK_NONE;
wl_seat_add_listener (device->wl_seat, &seat_listener, device);
wl_seat_set_user_data (device->wl_seat, device);
wl_seat_add_listener (seat->wl_seat, &seat_listener, seat);
wl_seat_set_user_data (seat->wl_seat, seat);
device->data_device =
seat->data_device =
wl_data_device_manager_get_data_device (display_wayland->data_device_manager,
device->wl_seat);
device->drop_context = _gdk_wayland_drop_context_new (device->data_device);
wl_data_device_add_listener (device->data_device,
&data_device_listener, device);
seat->wl_seat);
seat->drop_context = _gdk_wayland_drop_context_new (seat->data_device);
wl_data_device_add_listener (seat->data_device,
&data_device_listener, seat);
device->current_output_scale = 1;
device->pointer_surface =
seat->current_output_scale = 1;
seat->pointer_surface =
wl_compositor_create_surface (display_wayland->compositor);
wl_surface_add_listener (device->pointer_surface,
wl_surface_add_listener (seat->pointer_surface,
&pointer_surface_listener,
device);
seat);
init_devices (device);
init_devices (seat);
gdk_display_add_seat (display, GDK_SEAT (seat));
}
void
_gdk_wayland_device_manager_remove_seat (GdkDeviceManager *manager,
guint32 id)
{
GdkWaylandDeviceManager *device_manager = GDK_WAYLAND_DEVICE_MANAGER (manager);
GdkDisplay *display = gdk_device_manager_get_display (manager);
GList *l;
for (l = device_manager->devices; l != NULL; l = l->next)
l = gdk_display_list_seats (display);
while (l)
{
GdkWaylandDevice *wayland_device = l->data;
GdkWaylandDeviceData *device = wayland_device->device;
GdkWaylandSeat *seat = l->data;
if (device->id == id)
{
seat_handle_capabilities (device, device->wl_seat, 0);
g_object_unref (device->keymap);
wl_surface_destroy (device->pointer_surface);
/* FIXME: destroy data_device */
g_clear_object (&device->keyboard_settings);
g_clear_object (&device->drop_context);
g_hash_table_destroy (device->touches);
gdk_window_destroy (device->foreign_dnd_window);
stop_key_repeat (device);
g_free (device);
if (seat->id != id)
continue;
break;
}
gdk_display_remove_seat (display, GDK_SEAT (seat));
break;
}
}
@@ -2547,14 +2811,27 @@ gdk_wayland_device_unset_touch_grab (GdkDevice *gdk_device,
GdkEventSequence *sequence)
{
GdkWaylandDeviceData *device;
GdkWaylandTouchData *touch;
GdkEvent *event;
g_return_if_fail (GDK_IS_WAYLAND_DEVICE (gdk_device));
device = GDK_WAYLAND_DEVICE (gdk_device)->device;
touch = gdk_wayland_device_get_touch (device,
GDK_EVENT_SEQUENCE_TO_SLOT (sequence));
gdk_wayland_device_remove_touch (device, GDK_EVENT_SEQUENCE_TO_SLOT (sequence));
_gdk_display_end_touch_grab (gdk_device_get_display (gdk_device),
gdk_device, sequence);
if (GDK_WAYLAND_DEVICE (device->touch_master)->emulating_touch == touch)
{
GDK_WAYLAND_DEVICE (device->touch_master)->emulating_touch = NULL;
emulate_touch_crossing (touch->window, NULL,
device->touch_master, device->touch,
touch, GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL,
GDK_CURRENT_TIME);
}
event = _create_touch_event (device, touch, GDK_TOUCH_CANCEL,
GDK_CURRENT_TIME);
_gdk_wayland_display_deliver_event (device->display, event);
}
struct wl_data_device *
@@ -2631,6 +2908,15 @@ gdk_wayland_device_unset_grab (GdkDevice *gdk_device)
device->button_modifiers = 0;
gdk_event_set_device (event, gdk_device);
gdk_event_set_source_device (event, gdk_device);
gdk_event_set_seat (event, gdk_device_get_seat (gdk_device));
_gdk_wayland_display_deliver_event (gdk_device_get_display (gdk_device), event);
}
struct wl_seat *
gdk_wayland_seat_get_wl_seat (GdkSeat *seat)
{
g_return_val_if_fail (GDK_IS_WAYLAND_SEAT (seat), NULL);
return GDK_WAYLAND_SEAT (seat)->wl_seat;
}

View File

@@ -35,7 +35,7 @@
#include "gdkkeysprivate.h"
#include "gdkprivate-wayland.h"
#include "gdkglcontext-wayland.h"
#include "pointer-gestures-client-protocol.h"
#include "pointer-gestures-unstable-v1-client-protocol.h"
/**
* SECTION:wayland_interaction
@@ -107,50 +107,12 @@ static void
gdk_input_init (GdkDisplay *display)
{
GdkWaylandDisplay *display_wayland;
GdkDeviceManager *device_manager;
GdkDevice *device;
GList *list, *l;
display_wayland = GDK_WAYLAND_DISPLAY (display);
device_manager = gdk_display_get_device_manager (display);
/* For backwards compatibility, just add
* floating devices that are not keyboards.
*/
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING);
for (l = list; l; l = l->next)
{
device = l->data;
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
continue;
display_wayland->input_devices = g_list_prepend (display_wayland->input_devices, l->data);
}
g_list_free (list);
/* Now set "core" pointer to the first
* master device that is a pointer.
*/
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
device = l->data;
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
continue;
display->core_pointer = device;
break;
}
display->core_pointer = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
/* Add the core pointer to the devices list */
display_wayland->input_devices = g_list_prepend (display_wayland->input_devices, display->core_pointer);
g_list_free (list);
}
static void
@@ -358,12 +320,12 @@ gdk_registry_handle_global (void *data,
display_wayland->subcompositor =
wl_registry_bind (display_wayland->wl_registry, id, &wl_subcompositor_interface, 1);
}
else if (strcmp (interface, "_wl_pointer_gestures") == 0 &&
version == GDK__WL_POINTER_GESTURES_VERSION)
else if (strcmp (interface, "zwp_pointer_gestures_v1") == 0 &&
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION)
{
display_wayland->pointer_gestures =
wl_registry_bind (display_wayland->wl_registry,
id, &_wl_pointer_gestures_interface, version);
id, &zwp_pointer_gestures_v1_interface, version);
}
else
handled = FALSE;
@@ -676,27 +638,10 @@ gdk_wayland_display_notify_startup_complete (GdkDisplay *display,
static GdkKeymap *
_gdk_wayland_display_get_keymap (GdkDisplay *display)
{
GdkDeviceManager *device_manager;
GList *list, *l;
GdkDevice *core_keyboard = NULL;
static GdkKeymap *tmp_keymap = NULL;
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDevice *device;
device = l->data;
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
continue;
core_keyboard = device;
break;
}
g_list_free (list);
core_keyboard = gdk_seat_get_keyboard (gdk_display_get_default_seat (display));
if (core_keyboard && tmp_keymap)
{

View File

@@ -28,7 +28,7 @@
#include <wayland-cursor.h>
#include <wayland-egl.h>
#include <gdk/wayland/gtk-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-unstable-v5-client-protocol.h>
#include <glib.h>
#include <gdk/gdkkeys.h>
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
#define GDK_WAYLAND_MAX_THEME_SCALE 2
#define GDK_WAYLAND_THEME_SCALES_COUNT GDK_WAYLAND_MAX_THEME_SCALE
#define GDK__WL_POINTER_GESTURES_VERSION 1
#define GDK_ZWP_POINTER_GESTURES_V1_VERSION 1
typedef struct _GdkWaylandSelection GdkWaylandSelection;
@@ -73,7 +73,7 @@ struct _GdkWaylandDisplay
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
struct wl_subcompositor *subcompositor;
struct _wl_pointer_gestures *pointer_gestures;
struct zwp_pointer_gestures_v1 *pointer_gestures;
GList *async_roundtrips;

View File

@@ -48,6 +48,8 @@ struct _GdkWaylandDragContext
uint32_t serial;
gdouble x;
gdouble y;
gint hot_x;
gint hot_y;
};
struct _GdkWaylandDragContextClass
@@ -293,6 +295,33 @@ gdk_wayland_drag_context_init (GdkWaylandDragContext *context_wayland)
context->actions = GDK_ACTION_COPY | GDK_ACTION_MOVE;
}
static GdkWindow *
gdk_wayland_drag_context_get_drag_window (GdkDragContext *context)
{
return GDK_WAYLAND_DRAG_CONTEXT (context)->dnd_window;
}
static void
gdk_wayland_drag_context_set_hotspot (GdkDragContext *context,
gint hot_x,
gint hot_y)
{
GdkWaylandDragContext *context_wayland = GDK_WAYLAND_DRAG_CONTEXT (context);
gint prev_hot_x = context_wayland->hot_x;
gint prev_hot_y = context_wayland->hot_y;
const GdkRectangle damage_rect = { .width = 1, .height = 1 };
context_wayland->hot_x = hot_x;
context_wayland->hot_y = hot_y;
if (prev_hot_x == hot_x && prev_hot_y == hot_y)
return;
_gdk_wayland_window_offset_next_wl_buffer (context_wayland->dnd_window,
-hot_x, -hot_y);
gdk_window_invalidate_rect (context_wayland->dnd_window, &damage_rect, FALSE);
}
static void
gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
{
@@ -310,6 +339,8 @@ gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
context_class->drop_finish = gdk_wayland_drag_context_drop_finish;
context_class->drop_status = gdk_wayland_drag_context_drop_status;
context_class->get_selection = gdk_wayland_drag_context_get_selection;
context_class->get_drag_window = gdk_wayland_drag_context_get_drag_window;
context_class->set_hotspot = gdk_wayland_drag_context_set_hotspot;
}
GdkDragProtocol
@@ -344,7 +375,9 @@ create_dnd_window (GdkScreen *screen)
GdkDragContext *
_gdk_wayland_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets)
GList *targets,
gint x_root,
gint y_root)
{
GdkWaylandDragContext *context_wayland;
GdkWaylandDisplay *display_wayland;
@@ -482,12 +515,3 @@ gdk_wayland_drag_context_get_data_source (GdkDragContext *context)
{
return GDK_WAYLAND_DRAG_CONTEXT (context)->data_source;
}
GdkWindow *
gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context)
{
GdkWaylandDragContext *wayland_context;
wayland_context = GDK_WAYLAND_DRAG_CONTEXT (context);
return wayland_context->dnd_window;
}

View File

@@ -103,7 +103,12 @@ GdkDragProtocol _gdk_wayland_window_get_drag_protocol (GdkWindow *window,
void _gdk_wayland_window_register_dnd (GdkWindow *window);
GdkDragContext *_gdk_wayland_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets);
GList *targets,
gint x_root,
gint y_root);
void _gdk_wayland_window_offset_next_wl_buffer (GdkWindow *window,
int x,
int y);
GdkDragContext * _gdk_wayland_drop_context_new (struct wl_data_device *data_device);
void _gdk_wayland_drag_context_set_source_window (GdkDragContext *context,
GdkWindow *window);
@@ -173,8 +178,6 @@ void _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device
void _gdk_wayland_device_manager_remove_seat (GdkDeviceManager *device_manager,
guint32 id);
typedef struct _GdkWaylandDeviceData GdkWaylandDeviceData;
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
uint32_t _gdk_wayland_device_get_implicit_grab_serial(GdkWaylandDevice *device,
const GdkEvent *event);
@@ -217,10 +220,8 @@ struct wl_output *_gdk_wayland_screen_get_wl_output (GdkScreen *screen,
void _gdk_wayland_screen_set_has_gtk_shell (GdkScreen *screen);
void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device,
struct wl_seat *seat,
guint32 time_);
void _gdk_wayland_window_set_grab_seat (GdkWindow *window,
GdkSeat *seat);
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display);
void _gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display, guint32 serial);

View File

@@ -631,7 +631,7 @@ init_settings (GdkScreen *screen)
if (g_hash_table_lookup (screen_wayland->settings, (gpointer)translations[i].schema) != NULL)
continue;
schema = g_settings_schema_source_lookup (source, translations[i].schema, FALSE);
schema = g_settings_schema_source_lookup (source, translations[i].schema, TRUE);
if (schema != NULL)
{
settings = g_settings_new_full (schema, NULL, NULL);

View File

@@ -0,0 +1,45 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef __GDK_WAYLAND_SEAT_H__
#define __GDK_WAYLAND_SEAT_H__
#include "config.h"
#include <gdk/gdkseatprivate.h>
#define GDK_TYPE_WAYLAND_SEAT (gdk_wayland_seat_get_type ())
#define GDK_WAYLAND_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_WAYLAND_SEAT, GdkWaylandSeat))
#define GDK_WAYLAND_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_WAYLAND_SEAT, GdkWaylandSeatClass))
#define GDK_IS_WAYLAND_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_WAYLAND_SEAT))
#define GDK_IS_WAYLAND_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_WAYLAND_SEAT))
#define GDK_WAYLAND_SEAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_WAYLAND_SEAT, GdkWaylandSeatClass))
typedef struct _GdkWaylandSeat GdkWaylandDeviceData;
typedef struct _GdkWaylandSeat GdkWaylandSeat;
typedef struct _GdkWaylandSeatClass GdkWaylandSeatClass;
struct _GdkWaylandSeatClass
{
GdkSeatClass parent_class;
};
GType gdk_wayland_seat_get_type (void) G_GNUC_CONST;
#endif /* __GDK_WAYLAND_SEAT_H__ */

View File

@@ -69,7 +69,6 @@ struct _DataOfferData
{
struct wl_data_offer *offer;
GList *targets; /* List of GdkAtom */
GdkAtom requested_target;
};
struct _AsyncWriteData
@@ -97,6 +96,7 @@ struct _GdkWaylandSelection
/* Source-side data */
StoredSelection stored_selection;
GArray *source_targets;
GdkAtom requested_target;
struct wl_data_source *clipboard_source;
GdkWindow *clipboard_owner;
@@ -657,7 +657,6 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
GdkAtom target,
gint fd)
{
DataOfferData *offer;
GdkAtom selection;
if (wayland_selection->clipboard_owner == window)
@@ -667,10 +666,8 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
else
return FALSE;
offer = selection_lookup_offer_by_atom (wayland_selection, selection);
if (wayland_selection->stored_selection.fd == fd &&
offer->requested_target == target)
wayland_selection->requested_target == target)
return FALSE;
/* If we didn't issue gdk_wayland_selection_check_write() yet
@@ -681,7 +678,7 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
close (wayland_selection->stored_selection.fd);
wayland_selection->stored_selection.fd = fd;
offer->requested_target = target;
wayland_selection->requested_target = target;
if (window &&
gdk_wayland_selection_source_handles_target (wayland_selection, target))
@@ -782,9 +779,9 @@ data_source_send (void *data,
if (context)
{
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
_gdk_wayland_drag_context_emit_event (context, GDK_DROP_FINISHED,
GDK_CURRENT_TIME);
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
}
}
@@ -795,6 +792,7 @@ data_source_cancelled (void *data,
GdkWaylandSelection *wayland_selection = data;
GdkDragContext *context;
GdkDisplay *display;
GdkAtom atom;
g_debug (G_STRLOC ": %s source = %p",
G_STRFUNC, source);
@@ -802,16 +800,22 @@ data_source_cancelled (void *data,
display = gdk_display_get_default ();
if (source == wayland_selection->dnd_source)
{
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_DND]);
atom = atoms[ATOM_DND];
else if (source == wayland_selection->clipboard_source)
atom = atoms[ATOM_CLIPBOARD];
else
return;
gdk_wayland_selection_unset_data_source (display, atom);
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
if (source == wayland_selection->dnd_source)
{
context = gdk_wayland_drag_context_lookup_by_data_source (source);
if (context)
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
}
else if (source == wayland_selection->clipboard_source)
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_CLIPBOARD]);
}
static const struct wl_data_source_listener data_source_listener = {
@@ -864,15 +868,9 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner,
wayland_selection);
if (is_clipboard)
{
wayland_selection->clipboard_source = source;
wayland_selection->clipboard_owner = owner;
}
wayland_selection->clipboard_source = source;
else
{
wayland_selection->dnd_source = source;
wayland_selection->dnd_owner = owner;
}
wayland_selection->dnd_source = source;
return source;
}
@@ -885,14 +883,11 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
if (selection == atoms[ATOM_CLIPBOARD])
{
GdkDeviceManager *device_manager;
GdkDevice *device;
device_manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (device_manager);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
gdk_wayland_device_set_selection (device, NULL);
wayland_selection->clipboard_owner = NULL;
if (wayland_selection->clipboard_source)
{
@@ -902,7 +897,6 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
}
else if (selection == atoms[ATOM_DND])
{
wayland_selection->dnd_owner = NULL;
wayland_selection->dnd_source = NULL;
}
}
@@ -1172,13 +1166,11 @@ gdk_wayland_selection_add_targets (GdkWindow *window,
if (selection == atoms[ATOM_CLIPBOARD])
{
GdkDeviceManager *device_manager;
GdkDisplay *display;
GdkDevice *device;
display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (device_manager);
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
gdk_wayland_device_set_selection (device, data_source);
}
}
@@ -1189,6 +1181,7 @@ gdk_wayland_selection_clear_targets (GdkDisplay *display,
{
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
wayland_selection->requested_target = GDK_NONE;
g_array_set_size (wayland_selection->source_targets, 0);
gdk_wayland_selection_unset_data_source (display, selection);
}

View File

@@ -52,6 +52,9 @@ struct wl_pointer *gdk_wayland_device_get_wl_pointer (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
struct wl_keyboard *gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
GDK_AVAILABLE_IN_3_20
struct wl_seat *gdk_wayland_seat_get_wl_seat (GdkSeat *seat);
G_END_DECLS

View File

@@ -47,11 +47,6 @@ GDK_AVAILABLE_IN_ALL
void
gdk_wayland_selection_clear_targets (GdkDisplay *display, GdkAtom selection);
#define gdk_wayland_drag_context_get_dnd_window gdk_wayland_drag_context_get_dnd_window_libgtk_only
GDK_AVAILABLE_IN_ALL
GdkWindow *
gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context);
#endif
G_END_DECLS

View File

@@ -121,6 +121,8 @@ struct _GdkWindowImplWayland
GdkWindow *transient_for;
cairo_surface_t *cairo_surface;
int pending_buffer_offset_x;
int pending_buffer_offset_y;
gchar *title;
@@ -138,9 +140,7 @@ struct _GdkWindowImplWayland
GdkGeometry geometry_hints;
GdkWindowHints geometry_mask;
guint32 grab_time;
GdkDevice *grab_device;
struct wl_seat *grab_input_seat;
GdkSeat *grab_input_seat;
gint64 pending_frame_counter;
guint32 scale;
@@ -564,7 +564,10 @@ gdk_wayland_window_attach_image (GdkWindow *window)
/* Attach this new buffer to the surface */
wl_surface_attach (impl->surface,
_gdk_wayland_shm_surface_get_wl_buffer (impl->cairo_surface),
0, 0);
impl->pending_buffer_offset_x,
impl->pending_buffer_offset_y);
impl->pending_buffer_offset_x = 0;
impl->pending_buffer_offset_y = 0;
/* Only set the buffer scale if supported by the compositor */
display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
@@ -694,15 +697,9 @@ gdk_wayland_window_configure (GdkWindow *window,
int height,
int scale)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkDisplay *display;
GdkEvent *event;
if (window->width == width &&
window->height == height &&
impl->scale == scale)
return;
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = g_object_ref (window);
event->configure.send_event = FALSE;
@@ -1133,8 +1130,8 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window,
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowImplWayland *parent_impl = GDK_WINDOW_IMPL_WAYLAND (parent->impl);
GdkDeviceManager *device_manager;
GdkWaylandDevice *device;
GdkSeat *gdk_seat;
int x, y;
int parent_x, parent_y;
@@ -1144,8 +1141,8 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window,
if (!parent_impl->surface)
return;
device_manager = gdk_display_get_device_manager (GDK_DISPLAY (display));
device = GDK_WAYLAND_DEVICE (gdk_device_manager_get_client_pointer (device_manager));
gdk_seat = gdk_display_get_default_seat (GDK_DISPLAY (display));
device = GDK_WAYLAND_DEVICE (gdk_seat_get_pointer (gdk_seat));
gdk_wayland_window_get_fake_root_coords (parent, &parent_x, &parent_y);
@@ -1174,7 +1171,7 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
* grab before showing the popup window.
*/
if (impl->grab_input_seat)
return impl->grab_input_seat;
return gdk_wayland_seat_get_wl_seat (impl->grab_input_seat);
/* HACK: GtkMenu grabs a special window known as the "grab transfer window"
* and then transfers the grab over to the correct window later. Look for
@@ -1187,7 +1184,7 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
{
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (attached_grab_window->impl);
if (tmp_impl->grab_input_seat)
return tmp_impl->grab_input_seat;
return gdk_wayland_seat_get_wl_seat (tmp_impl->grab_input_seat);
}
while (transient_for)
@@ -1195,7 +1192,7 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (transient_for->impl);
if (tmp_impl->grab_input_seat)
return tmp_impl->grab_input_seat;
return gdk_wayland_seat_get_wl_seat (tmp_impl->grab_input_seat);
transient_for = tmp_impl->transient_for;
}
@@ -1203,6 +1200,18 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
return NULL;
}
static struct wl_seat *
find_default_input_seat (GdkWindow *window)
{
GdkDisplay *display;
GdkSeat *seat;
display = gdk_window_get_display (window);
seat = gdk_display_get_default_seat (display);
return gdk_wayland_seat_get_wl_seat (seat);
}
static gboolean
should_be_mapped (GdkWindow *window)
{
@@ -1319,7 +1328,7 @@ gdk_wayland_window_map (GdkWindow *window)
*/
if (!impl->transient_for && impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU)
{
GdkDevice *grab_device;
GdkDevice *grab_device = NULL;
/* The popup menu window is not the grabbed window. This may mean
* that a "transfer window" (see gtkmenu.c) is used, and we need
@@ -1327,7 +1336,7 @@ gdk_wayland_window_map (GdkWindow *window)
* the "transfer window" can be retrieved via the
* "gdk-attached-grab-window" associated data field.
*/
if (!impl->grab_device)
if (!impl->grab_input_seat)
{
GdkWindow *attached_grab_window =
g_object_get_data (G_OBJECT (window),
@@ -1336,7 +1345,7 @@ gdk_wayland_window_map (GdkWindow *window)
{
GdkWindowImplWayland *attached_impl =
GDK_WINDOW_IMPL_WAYLAND (attached_grab_window->impl);
grab_device = attached_impl->grab_device;
grab_device = gdk_seat_get_pointer (attached_impl->grab_input_seat);
transient_for =
gdk_device_get_window_at_position (grab_device,
NULL, NULL);
@@ -1344,7 +1353,7 @@ gdk_wayland_window_map (GdkWindow *window)
}
else
{
grab_device = impl->grab_device;
grab_device = gdk_seat_get_pointer (impl->grab_input_seat);
transient_for =
gdk_device_get_window_at_position (grab_device, NULL, NULL);
}
@@ -1355,9 +1364,8 @@ gdk_wayland_window_map (GdkWindow *window)
/* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab.
*/
if (!impl->position_set)
gdk_window_get_device_position (transient_for,
impl->grab_device,
if (!impl->position_set && grab_device)
gdk_window_get_device_position (transient_for, grab_device,
&window->x, &window->y, NULL);
}
else
@@ -1376,10 +1384,12 @@ gdk_wayland_window_map (GdkWindow *window)
if (!grab_input_seat)
{
g_warning ("Couldn't map window %p as popup because no grabbed seat found",
g_warning ("No grabbed seat found, using the default one in "
"order to map popup window %p. You may find oddities "
"ahead, gdk_seat_grab() should be used to "
"simultaneously grab input and show this popup",
window);
create_fallback = TRUE;
grab_input_seat = find_default_input_seat (window);
}
}
@@ -1769,7 +1779,11 @@ gdk_wayland_window_destroy (GdkWindow *window,
gdk_wayland_window_hide_surface (window);
if (impl->cairo_surface)
cairo_surface_finish (impl->cairo_surface);
{
cairo_surface_finish (impl->cairo_surface);
cairo_surface_destroy (impl->cairo_surface);
impl->cairo_surface = NULL;
}
}
static void
@@ -1929,12 +1943,33 @@ gdk_wayland_window_set_startup_id (GdkWindow *window,
{
}
static gboolean
check_transient_for_loop (GdkWindow *window,
GdkWindow *parent)
{
while (parent)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (parent->impl);
if (impl->transient_for == window)
return TRUE;
parent = impl->transient_for;
}
return FALSE;
}
static void
gdk_wayland_window_set_transient_for (GdkWindow *window,
GdkWindow *parent)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (check_transient_for_loop (window, parent))
{
g_warning ("Setting %p transient for %p would create a loop", window, parent);
return;
}
if (impl->subsurface)
unmap_subsurface (window);
@@ -2221,7 +2256,7 @@ gdk_wayland_window_begin_resize_drag (GdkWindow *window,
/* This is needed since Wayland will absorb all the pointer events after the
* above function - FIXME: Is this always safe..?
*/
gdk_device_ungrab (device, timestamp);
gdk_seat_ungrab (gdk_device_get_seat (device));
}
static void
@@ -2256,7 +2291,7 @@ gdk_wayland_window_begin_move_drag (GdkWindow *window,
/* This is needed since Wayland will absorb all the pointer events after the
* above function - FIXME: Is this always safe..?
*/
gdk_device_ungrab (device, timestamp);
gdk_seat_ungrab (gdk_device_get_seat (device));
}
static void
@@ -2532,20 +2567,15 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
}
void
_gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device,
struct wl_seat *seat,
guint32 time_)
_gdk_wayland_window_set_grab_seat (GdkWindow *window,
GdkSeat *seat)
{
GdkWindowImplWayland *impl;
g_return_if_fail (window != NULL);
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->grab_device = device;
impl->grab_input_seat = seat;
impl->grab_time = time_;
}
/**
@@ -2744,3 +2774,18 @@ gdk_wayland_window_set_dbus_properties_libgtk_only (GdkWindow *window,
maybe_set_gtk_surface_dbus_properties (window);
}
void
_gdk_wayland_window_offset_next_wl_buffer (GdkWindow *window,
int x,
int y)
{
GdkWindowImplWayland *impl;
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->pending_buffer_offset_x = x;
impl->pending_buffer_offset_y = y;
}

View File

@@ -1,172 +0,0 @@
<protocol name="pointer_gestures">
<interface name="_wl_pointer_gestures" version="1">
<description summary="touchpad gestures">
A global interface to provide semantic touchpad gestures for a given
pointer.
Two gestures are currently supported: swipe and zoom/rotate.
All gestures follow a three-stage cycle: begin, update, end and
are identified by a unique id.
Warning! The protocol described in this file is experimental. Each
version of this protocol should be considered incompatible with any
other version, and a client binding to a version different to the one
advertised will be terminated. Once the protocol is declared stable,
compatibility is guaranteed, the '_' prefix will be removed from the
name and the version will be reset to 1.
</description>
<request name="get_swipe_gesture">
<description summary="get swipe gesture">
Create a swipe gesture object. See the
wl_pointer_gesture_swipe interface for details.
</description>
<arg name="id" type="new_id" interface="_wl_pointer_gesture_swipe"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
<request name="get_pinch_gesture">
<description summary="get pinch gesture">
Create a pinch gesture object. See the
wl_pointer_gesture_pinch interface for details.
</description>
<arg name="id" type="new_id" interface="_wl_pointer_gesture_pinch"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
</interface>
<interface name="_wl_pointer_gesture_swipe" version="1">
<description summary="a swipe gesture object">
A swipe gesture object notifies a client about a multi-finger swipe
gesture detected on an indirect input device such as a touchpad.
The gesture is usually initiated by multiple fingers moving in the
same direction but once initiated the direction may change.
The precise conditions of when such a gesture is detected are
implementation-dependent.
A gesture consists of three stages: begin, update (optional) and end.
There cannot be multiple simultaneous pinch or swipe gestures on a
same pointer/seat, how compositors prevent these situations is
implementation-dependent.
A gesture may be cancelled by the compositor or the hardware.
Clients should not consider performing permanent or irreversible
actions until the end of a gesture has been received.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the pointer swipe gesture object"/>
</request>
<event name="begin">
<description summary="multi-finger swipe begin">
This event is sent when a multi-finger swipe gesture is detected
on the device.
</description>
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="fingers" type="uint" summary="number of fingers"/>
</event>
<event name="update">
<description summary="multi-finger swipe motion">
This event is sent when a multi-finger swipe gesture changes the
position of the logical center.
The dx and dy coordinates are relative coordinates of the logical
center of the gesture compared to the previous event.
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
<arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
</event>
<event name="end">
<description summary="multi-finger swipe end">
This event is sent when a multi-finger swipe gesture ceases to
be valid. This may happen when one or more finger is lifted or
the gesture is cancelled.
When a gesture is cancelled, the client should undo state changes
caused by this gesture. What causes a gesture to be cancelled is
implementation-dependent.
</description>
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
</event>
</interface>
<interface name="_wl_pointer_gesture_pinch" version="1">
<description summary="a pinch gesture object">
A pinch gesture object notifies a client about a multi-finger pinch
gesture detected on an indirect input device such as a touchpad.
The gesture is usually initiated by multiple fingers moving towards
each other or away from each other, or by two or more fingers rotating
around a logical center of gravity. The precise conditions of when
such a gesture is detected are implementation-dependent.
A gesture consists of three stages: begin, update (optional) and end.
There cannot be multiple simultaneous pinch or swipe gestures on a
same pointer/seat, how compositors prevent these situations is
implementation-dependent.
A gesture may be cancelled by the compositor or the hardware.
Clients should not consider performing permanent or irreversible
actions until the end of a gesture has been received.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the pinch gesture object"/>
</request>
<event name="begin">
<description summary="multi-finger pinch begin">
This event is sent when a multi-finger pinch gesture is detected
on the device.
</description>
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="fingers" type="uint" summary="number of fingers"/>
</event>
<event name="update">
<description summary="multi-finger pinch motion">
This event is sent when a multi-finger pinch gesture changes the
position of the logical center, the rotation or the relative scale.
The dx and dy coordinates are relative coordinates in the
surface coordinate space of the logical center of the gesture.
The scale factor is an absolute scale compared to the
pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers
are now twice as far apart as on pointer_gesture_pinch.begin.
The rotation is the relative angle in degrees clockwise compared to the previous
pointer_gesture_pinch.begin or pointer_gesture_pinch.update event.
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
<arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
<arg name="scale" type="fixed" summary="scale relative to the initial finger position"/>
<arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/>
</event>
<event name="end">
<description summary="multi-finger pinch end">
This event is sent when a multi-finger pinch gesture ceases to
be valid. This may happen when one or more finger is lifted or
the gesture is cancelled.
When a gesture is cancelled, the client should undo state changes
caused by this gesture. What causes a gesture to be cancelled is
implementation-dependent.
</description>
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
</event>
</interface>
</protocol>

Some files were not shown because too many files have changed in this diff Show More