Commit Graph

49930 Commits

Author SHA1 Message Date
Benjamin Otte
d54117024c x11: Add call to XInitThreads()
The Mesa Vulkan drivers need XInitThreads() being called, because their
implementation has to use threads.

And I don't want to make the call depend on if Vulkan is compiled in
because that makes GTK's X11 behavior depend on compile-time flags, so
it's always called.
2017-01-12 02:01:07 +01:00
Matthias Clasen
0868757cfd More filter documentation updates
Actually document the filter property, not just -gtk-icon-filter.
2017-01-11 14:07:56 -05:00
Matthias Clasen
5f2a7ed3c1 Correct the -gtk-icon-filter docs
I was overlooking that it is possible to specify multiple
functions. Also add a reference to the relevant spec draft.
2017-01-11 13:42:58 -05:00
Benjamin Otte
10bc71a5e6 build: List resource files explicitly
This way, we ensure that files that are built during make always get
properly listed. And we ensure that creating the resources actually
depends on them.
2017-01-11 18:33:09 +01:00
Benjamin Otte
b8371a1d61 shortcutswindow: Make dispose work properly 2017-01-11 18:33:09 +01:00
Benjamin Otte
fd762d203c tests: Add a rendernode test for borders 2017-01-11 18:33:09 +01:00
Benjamin Otte
b186bce7ff vulkan: Add shader for border rendering 2017-01-11 18:33:09 +01:00
Alexander Larsson
c00f8dce9f GtkSnapshot: Always use int for the translation
We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.

This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.
2017-01-11 16:14:03 +01:00
Alexander Larsson
275185d415 widget: Avoid typechecks when accessing ->clip and ->allocation 2017-01-11 15:30:30 +01:00
Alexander Larsson
8cabfef9c9 GtkCSSImage: Avoid some type checks
The width/height/aspect getters are called a lot, and almost all
callers already verify it from _gtk_css_image_get_concrete_size (),
so just skip these checks.
2017-01-11 15:28:35 +01:00
Alexander Larsson
7bee22bcb6 Avoid some more type checks for internal calls 2017-01-11 15:27:51 +01:00
Alexander Larsson
68a27a9951 gtkcssgadget: Use private non-checking versions of gtk_widget calls
This avoids a lot of checking overhead.
2017-01-11 12:05:44 +01:00
Alexander Larsson
6341fab985 GtkSnapshot: Reuse snapshot state objects
Rather than allocate new ones all the time we reuse the previous ones.
We just clear them and save them in the parent for later reuse.
2017-01-11 11:41:46 +01:00
Alexander Larsson
f67ae85b7a GtkSnapshot: Move collect data to a union in the state
This means we allocate the collect data with the state, avoiding
an extra allocation. Also, a union means every state object
is the same size and we could reuse the state objects.
2017-01-11 11:21:27 +01:00
Alexander Larsson
65ad2541d7 Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Alexander Larsson
2f453cc57e gsk_rounded_rect_init_copy: Don't normalize
This was showing up quite high on the profiles, and there is
no real reason for copy to normalize, as the source is a
GskRoundedRect which should be normalized already unless
you did something very strange (and then you should have normalized
manually).
2017-01-11 09:23:37 +01:00
Alexander Larsson
882290b479 Skip dynamic type check in css value getters
This gets called a lot during snapshotting, and this change
alone brings down snapshot time by almost 10% in a syntethic
snapshot test.
2017-01-11 09:20:30 +01:00
Matthias Clasen
249a0b1f22 Some updates to the migration guide 2017-01-10 21:21:26 -05:00
Matthias Clasen
8a83362fb8 Document -gtk-icon-filter
Not much detail here yet, but the syntax is documented.
2017-01-10 21:21:26 -05:00
Benjamin Otte
4c7ddbf519 cssimage: Fix cross-fade
Simgle image cross-fade opacity was computed the wrong way, which caused
weird fade-in/out animations, for example in flat buttons.

I messed this up when porting cross-fades to snapshot().
2017-01-11 02:53:12 +01:00
Matthias Clasen
9133ec5cd4 Remove an unnecessary check
Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.
2017-01-10 19:56:21 -05:00
Matthias Clasen
c1dc36dff0 Use an internal parameter check here as well
We should not slow down the core parts of the css machinery
with type checks.
2017-01-10 19:56:16 -05:00
Matthias Clasen
ecd0ce3993 Use gtk_internal_return_val_if_fail here
It seems odd to have checks in just a few functions,
so switch everything over to use the internal versions.
2017-01-10 19:56:09 -05:00
Matthias Clasen
a013a16d1c Use _gtk_widget_get_window more
This avoids type checks in places where we know it is safe.
2017-01-10 19:56:02 -05:00
Matthias Clasen
d9bc675cba Refactor some css transition code slightly
Reshuffling things a bit to avoid a bunch of NULL and
type checks.
2017-01-10 19:55:57 -05:00
Matthias Clasen
4f0cf475a5 Use the .symbolic.png assets in Adwaita
Using an image() fallback from svg to png doesn't make too
much sense, since the svg is always used (unless librsvg is
not present), while the png icon is faster and cheaper to
load and thus preferable.
2017-01-10 17:16:10 -05:00
Rui Matos
ae61220c9f gdk/wayland: Handle non-existant gsettings keys
Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:32 +01:00
Rui Matos
b46da27d34 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:27 +01:00
William Hua
57a11ca28d mir: fix compile-time warnings 2017-01-09 17:55:31 -05:00
Daniel Boles
0b7542bad1 revealer: Fix a typo in a function doc
Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.
2017-01-09 22:44:46 +00:00
William Hua
a50a98f38b mir: properly handle empty clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-09 12:04:48 -05:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Chun-wei Fan
e382d9d9b5 build/Makefile.msvcproj: Improve documentation
Tell people about what happens when generating projects when Visual
Studio 2013 or later is required, and mention that the .headers are
only needed when headers need to be copied.
2017-01-09 12:11:33 +08:00
Benjamin Otte
dcb15d6728 cssgadget: Compute clip correctly
We were computing it relative to the gadget allocation, but it should be
relative to the widget allocation.
2017-01-09 01:12:06 +01:00
Timm Bäder
deb458c656 widget: Document child/sibling accessors 2017-01-08 16:58:27 +01:00
Timm Bäder
545fb271b7 switch: Use a widget as slider 2017-01-08 16:54:34 +01:00
Timm Bäder
9b76badb50 widget: Add construct-only css-name property
So we can set the css name of a widget to something that's not related
to the class name. If the css-name property is set to NULL, we will
still fall back to the one set using gtk_widget_class_set_css_name which
is alwasys non-NULL since GtkWidget itself sets it to "widget".
2017-01-08 16:44:46 +01:00
Timm Bäder
d15ca3b2b4 actionbar: Fix class and instance struct parent member 2017-01-08 15:12:45 +01:00
Timm Bäder
3d5a62a0c9 actionbar: Add revealed property
So we can show and hide it with a transition as well as bind another
property to it.
2017-01-08 14:57:11 +01:00
Timm Bäder
ad8acdcebf testsuite/cssprovider: Use actual existing style property
All the style properties in GtkTreeView are gone, so use one from
GtkScrollbar for now.
2017-01-08 13:10:43 +01:00
Timm Bäder
c392f41bb2 builderparser: Shuffle if-statements around once more
The previous reordering broke the builderparser test case.
2017-01-08 13:07:12 +01:00
Timm Bäder
f00ccd3259 testsuite/builder: Use g_assert_no_error to check GError
So we get a proper error message.
2017-01-08 12:02:48 +01:00
Timm Bäder
de6b788a91 printunixdialog: Remove leftover draw handler 2017-01-08 11:06:49 +01:00
Timm Bäder
48d5f7843b actionbar: Add revealer as internal child 2017-01-08 10:49:06 +01:00
Timm Bäder
12c2274750 actionbar: Remove show() and hide() implementations
They only show/hide the widget in a delayed fashion which doesn't
work, just like it doesn't work with infobars and popovers.
2017-01-08 10:46:26 +01:00
Rafael Fontenelle
c78bf6341d Update Brazilian Portuguese translation 2017-01-08 04:31:34 +00:00
Rafael Fontenelle
93e609ed69 Update Brazilian Portuguese translation 2017-01-08 03:40:55 +00:00
Benjamin Otte
7ade6e3f46 gdk: Remove testing functions
They were unused and unimplemented.
2017-01-08 03:46:30 +01:00
Benjamin Otte
2a9ae1e8df tests: Remove gtk_widget_send_key()
It's unused in GTK.
2017-01-08 03:46:30 +01:00
Benjamin Otte
daf0270f1a tests: Remove widget find functions
They are all unused by GTK.

And other people can write their own find functions if they need any in
their tests.
2017-01-08 03:36:05 +01:00