Commit Graph

29722 Commits

Author SHA1 Message Date
Matthias Clasen
8747c7a42a Fix a typo
The signal is called ::unpaired-release.
2017-11-27 10:56:09 -05:00
Matthias Clasen
268ebb3a46 listbox: Handle unpaired releases as well
Same as for flowbox in the previous commit.
2017-11-26 19:52:01 -05:00
Carlos Garnacho
0567b41f24 gtkflowbox: Activate items on ::unpaired-release
If the flowbox is single-click.

https://bugzilla.gnome.org/show_bug.cgi?id=789163
2017-11-26 19:42:03 -05:00
Carlos Garnacho
bce91555f5 gtkgesturemultipress: Add ::unpaired-release signal
This signal will be emitted whenever the gesture received a
button release or touch end event without a pairing button
press or touch begin. This usually happens when grabs transfer
input from one widget to another mid-press.

https://bugzilla.gnome.org/show_bug.cgi?id=789163
2017-11-26 19:42:03 -05:00
Kjell Ahlstedt
7ef5858f8d GtkWindow: Fix the down-scaling in icon_from_list()
Must use floating-point division to get the correct scale factors.
cairo_set_source_surface() must be called after cairo_scale().

https://bugzilla.gnome.org/show_bug.cgi?id=790287
2017-11-26 18:54:59 -05:00
Matthias Clasen
4c40accbb9 gdk: Move gdk_disable_multidevice tot he X11 backend
This api only ever did something for X11, so move
it there. Update the docs and adapt the only caller.
2017-11-25 11:04:14 -05:00
Matthias Clasen
835805ad61 treeview: Don't use GdkDeviceManager
We can just as well use GdkSeat to enumerate (attached)
devices. Note that this change excludes floating devices
from consideration.

This keeps the copy-pasted code in sync with gtkwindow.c
2017-11-25 11:04:14 -05:00
Matthias Clasen
7c0a1ddb05 window: Don't use GdkDeviceManager
We can just as well use GdkSeat to enumerate (attached)
devices. Note that this change excludes floating devices
from consideration.
2017-11-25 11:04:14 -05:00
Matthias Clasen
2250daeb53 widget: Don't use GdkDeviceManager
We can just as well use GdkSeat to enumerate the devices.
2017-11-25 11:04:13 -05:00
Daniel Boles
630f83957a Entry:show-emoji-icon is in GTK+ 3 too
Document the earliest version reached.
2017-11-23 17:21:36 +00:00
Daniel Boles
89c51f51e2 Be more specific in ::insert-emoji Since tag
I had been unsure whether to include the minor version, but
:show-emoji-icon already did, so do the same here to match.
2017-11-23 17:18:36 +00:00
Daniel Boles
9fef90b0f7 Add Since to ::insert-emoji, and some trivialities
Document when these keybinding signals were added.
2017-11-22 22:36:31 +00:00
Matthias Clasen
567447456e text view: Support the Emoji chooser
Similar to GtkEntry, add an "Insert Emoji" context
menu item, and add the same keybindings. We don't
add the icon here, since it is not clear where it
would go.

https://bugzilla.gnome.org/show_bug.cgi?id=790029
2017-11-22 16:50:10 -05:00
Matthias Clasen
462a77ffb5 Fix indentation mishap 2017-11-22 16:50:10 -05:00
Daniel Boles
fecce75c73 SpinButton: Explain meaning of nullable Adjustment
configure() marked the @adj argument as (allow-none) but did not explain
what passing NULL would do. Fix that, and move it to (nullable) as well.
2017-11-22 20:58:28 +00:00
Daniel Boles
98c1f16002 doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:28 +00:00
Daniel Boles
23f7208235 CellRendererPixbuf: Link stock-size doc → IconSize
Add a doc comment for :stock-size in order to link to GtkIconSize.
2017-11-22 20:48:11 +00:00
Daniel Boles
7c2e28c8c5 doc: TextLayout: Add missing (out) annotations
and move from (allow-none) to (optional)
2017-11-22 20:48:11 +00:00
Chun-wei Fan
a687fd9aeb gtk/gskpango.c: Use g_snprintf()
This fixes the build of GTK+ master on Visual Studio 2013 (and possibly
others) as snprintf() may not be supported even if the required C99
features are supported by the compiler.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-11-21 14:22:23 +08:00
Chun-wei Fan
8059975f74 gtk/gtkseclection.c: Don't build X11 items unconditionally
Limit building the X11 items only when GDK_WINDOWING_X11 is defined.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-11-21 14:16:19 +08:00
Benjamin Otte
c82378ea57 gdk: Add GType support to GdkContentFormats
This is not used by anything yet, but add it now, so people looking at
this new code can make sense of it.
Plus, the documentation mentions it, so better have the docs make sense.

It will be used once we add support for conversions to GDK and allow
doing cipboard/dnd by GValue.
2017-11-20 23:22:28 +01:00
Benjamin Otte
1a70ca75e8 gdk: Sanitize GdkContentFormats API
Make sure the API reflects the idea that GdkContentFormats is a set
containing mime types. In particular, treat the object itself as a
plural - it's named content format`S' after all - and therefor use
the correct verb form.

Also make GdkContentFormats keep an array instead of a list, now that
it's immutable.
2017-11-20 23:15:11 +01:00
Benjamin Otte
fc2ce5a925 gdk: Make GdkContentFormats immutable 2017-11-20 23:13:10 +01:00
Benjamin Otte
d6a209816b gdkdnd: Make GdkDragContext->formats a GdkContentFormats
Instead of it being a GList of GdkAtoms.
2017-11-20 23:12:33 +01:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
0638bbb5d5 gdk: Move GtkTargetList to GDK
It's gonna be renamed next, so put it in the right source file already.

For now retain the old name to keep the diff small.
2017-11-20 23:12:33 +01:00
Benjamin Otte
0b40ad32f3 selection: Make GtkTargetList members private
Outside of the target list, don't access it directly, instead use public
APIs like the newly introduced gtk_target_list_intersects().
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
2017-11-20 23:12:33 +01:00
Matthias Clasen
49d02eff93 emoji chooser: break out a helper function
This is just a small cleanup.
2017-11-19 22:43:36 -05:00
Matthias Clasen
5a6c6070d6 remove debug spew 2017-11-19 22:43:36 -05:00
Matthias Clasen
4d9b7b2359 entry: Add a key binding for the emoji chooser
Make Ctrl-. and Ctrl-; bring up the emoji chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=789160
2017-11-19 18:06:19 -05:00
Matthias Clasen
1cd5df9404 emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-19 18:04:38 -05:00
Matthias Clasen
d3a358b9bd Adwaita: Bring fix focus in flowbox
Bring back the focus rectangle for flowbox children.
Its absence makes keynav in flowboxes really difficult.
2017-11-19 18:04:31 -05:00
Matthias Clasen
5e748ce940 emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.

This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-19 18:04:26 -05:00
Matthias Clasen
4d0a57fe0b listbox: Listen to ::stopped on the press gesture
Otherwise, we end up interpreting grab notify's as
button releases, which is not right. This matches
what GtkFlowBox does.
2017-11-19 14:49:58 -05:00
Matthias Clasen
2f9d980c93 Trivial cleanup
Better to use G_SOURCE_REMOVE than FALSE, for clarity.
2017-11-19 09:28:00 -05:00
Matthias Clasen
1f8debbac9 emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
2017-11-19 09:27:53 -05:00
Matthias Clasen
a8531605db Some more interning
This avoids more strdups at startup.
2017-11-18 08:18:11 -05:00
Matthias Clasen
997f0de4d5 a11y: Intern a string 2017-11-17 23:25:45 -05:00
Matthias Clasen
7dded559c0 cell area: Use GTK_PARAM_READWRITE consistently 2017-11-17 23:25:07 -05:00
Matthias Clasen
7c4a1a596f icon helper: Avoid a few string copies 2017-11-17 23:21:24 -05:00
Matthias Clasen
8c06cd5f98 styleproperty: Use G_PARAM_STATIC_STRINGS 2017-11-17 22:56:25 -05:00
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Matthias Clasen
dd7163a699 settings: Use gdk_display_set_cursor_theme
This allows us to reduce the amount of ifdef ugliness.
2017-11-17 17:56:03 -05:00
Matthias Clasen
2d591cde78 Include gdk-private.h
This gives us access to private gdk api.
2017-11-17 16:34:04 -05:00
Matthias Clasen
4865c3273a clipboard: Use gdk_display_get_last_seen_time
This removes the backend dependent code from gtkclipboard.c.
A good thing!
2017-11-17 15:40:49 -05:00
Benjamin Otte
594aae71e5 toolbar: Remove gdk_flush() calls
It's not 2003 anymore.
2017-11-17 08:07:27 +01:00
Benjamin Otte
0019178014 main: Don't gdk_flush() after every main loop wait
For a start, this makes gtk_main() work different from g_main_loop_run()
calls.

But most importantly, modern GDK does proper syncing itself and doesn't
need to rely on a catch-all to get it right.
2017-11-17 08:07:10 +01:00
Matthias Clasen
daacd25344 selection: Use x11-specific traps
The generic trap api is going away.
2017-11-16 23:42:55 -05:00
Matthias Clasen
8b3e9fe35c mountoperation-x11: Use x11-specific traps
The generic trap api is going away.
2017-11-16 23:36:21 -05:00
Matthias Clasen
95876cbc9c Remove gdk/gdkx.h
It was just a kludge.
2017-11-16 23:00:01 -05:00
Matthias Clasen
dca8c8e189 gtk: Stop using gdk_notify_startup_complete_with_id
This function is about to go away. Instead, use the
display-specific function that this is a wrapper of.
2017-11-16 22:45:04 -05:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Benjamin Otte
5da3059175 selection: Remove gtk_target_table_*() functions 2017-11-16 22:59:42 +01:00
Benjamin Otte
b200d4f099 textview: Stop playing shenanigans with the target list
This breaks GtkSourceView adding custom targets on top of GtkTextView,
but we'll fix that later.
2017-11-16 22:59:42 +01:00
Benjamin Otte
47e75b34a4 selection: Make GtkTargetEntry not allocatable
And remove it being registered as a boxed type (lol).
2017-11-16 22:59:42 +01:00
Matthias Clasen
e62ec97707 HighContrast: misc fixes
The HighContrast theme was not parsing anymore, due to
leftover widget style properties, and some missed cleanups,
like -gtk-icon-effect. Also update for the new focus handling,
and make checks and radios sharp again.
2017-11-15 18:08:46 -05:00
Matthias Clasen
a4c4df3b95 Adwaita: Make checks and radios sharp again
The assets we have are 14x14, set -gtk-icon-size to reflect that.
2017-11-15 18:07:52 -05:00
Matthias Clasen
d9a146f54a Change icon-size properties
We no longer support registering custom icon sizes, so
we can make these properties just enums. This also lets
us specify them by nick in ui files. Nice!
2017-11-15 14:22:17 -05:00
Matthias Clasen
a28cf475af image: Update docs
Mention the new icon-size style classes, update the docs
for removed arguments and return values, and add new
functions to the docs.
2017-11-15 14:22:17 -05:00
Matthias Clasen
43a9b82797 Support -gtk-icon-size for builtins
This makes css icons more similar to themed icons, which
is the overall goal here.
2017-11-15 14:22:17 -05:00
Matthias Clasen
0d23606653 Drop gtk_icon_size_lookup
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
2017-11-15 14:22:17 -05:00
Matthias Clasen
866ff2b8f0 recentchooser: Use GIcon instead of GdkPixbuf 2017-11-15 14:22:17 -05:00
Matthias Clasen
c6c3427507 iconhelper: Query size via CSS
Instead of looking at the icon size, look at the CSS value for
-gtk-icon-size. Set style classes depending on icon size instead.

Trivially change Adwaita and HighContrast to report the same values as
before.
2017-11-15 14:22:17 -05:00
Matthias Clasen
2301d8d90b enums: Change GtkIconSize values
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
2017-11-15 14:22:17 -05:00
Benjamin Otte
e5da85631a image: Don't take icon size in set_from_definition() 2017-11-15 14:22:17 -05:00
Matthias Clasen
67268bcc23 filechooserwidget: icon size is always 16 2017-11-15 14:22:17 -05:00
Matthias Clasen
b598a5ab78 filechooserbutton: icon size is always 16
So define it that way.
2017-11-15 14:22:17 -05:00
Benjamin Otte
e0a5f4e081 cellrendererspinner: Don't track old icon size
It was only used to avoid gtk_icon_size_lookup() calls and those aren't
expensive.
2017-11-15 14:22:17 -05:00
Matthias Clasen
dbfaa99107 image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.

Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01 image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.

As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.

Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
f53b72e5ff button: Get rid of icon size
In fact, make gtk_button_new_from_icon_name() just set the icon-name
property instead of creating a GtkImage.
2017-11-15 14:22:16 -05:00
Benjamin Otte
3da65ff233 scalebutton: Remove icon size 2017-11-15 14:22:16 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
8df61992d7 tooltips: Remove GtkIconSize usage 2017-11-15 14:22:16 -05:00
Benjamin Otte
129dc7d73b css: Add -gtk-icon-size
This will replace GtkIconSize in future patches.
2017-11-15 14:22:16 -05:00
Benjamin Otte
dcc2577b97 introspection: Fix build 2017-11-15 19:33:26 +01:00
Benjamin Otte
4c4e914806 gdk: Replace GDK_NONE with NULL 2017-11-15 19:07:17 +01:00
Benjamin Otte
5a1a11bcde dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
fb94f79094 selection: Remove #ifdef WAYLAND
Instead, turn the functions into backend API:
  gdk_broadway_display_add_selection_targets()
  gdk_broadway_display_clear_selection_targets()
Remove the old per-backend functions, too.
2017-11-15 19:07:16 +01:00
Benjamin Otte
13ca03efb1 cellrendererpixbuf: Remove stock-detail property
GTK3 didn't use that property already...
2017-11-14 18:37:38 -05:00
Benjamin Otte
515b13fdd5 messagedialog: Remove unused header 2017-11-14 18:24:43 -05:00
Benjamin Otte
77efc60a15 placessiderbar: Fix sunny compilation
Make compilation not warn about unused variables when compiling with
HAVE_CLOUDPROVIDERS undefined.
2017-11-13 23:45:18 +01:00
Benjamin Otte
457bf3b604 widget: No need to update events
GtkWindow queues for all events anyway, so the needed ones are already
there.
2017-11-13 23:41:38 +01:00
Benjamin Otte
ed1b6a9bed gdkwindow: Remove event_mask arguments from constructors 2017-11-13 23:41:38 +01:00
Benjamin Otte
9d56cee622 widget: Remove gtk_widget_set_device_enabled()
Nobody is using it.
2017-11-13 23:41:37 +01:00
Matthias Clasen
724863c275 icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
2017-11-13 12:13:42 -05:00
Carlos Soriano
1b1cb8295b gtkplacessidebar: Fix new tab/window handling for cloud accounts
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.

To fix it, do as with the other menus and check for the availability of
new tab/window flags.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 16:57:02 +01:00
Carlos Soriano
f54e7712c5 gtkplacessidebar: Adapt to libcloudproviders 0.2.x
And a few improvements on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 16:55:10 +01:00
Matthias Clasen
2ff175938d application: Append a / to the icon resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-13 07:35:18 -05:00
Matthias Clasen
ec1ea0db04 icontheme: Append a / to the resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-13 07:33:35 -05:00
Benjamin Otte
e0d3602331 a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
2017-11-13 03:51:53 +01:00
Benjamin Otte
b968147e0a treeview: Only update vadjustment in size_allocate()
The 2 calls even do different things, but because the one in allocate
always overrides the one here...
2017-11-13 01:53:45 +01:00
Benjamin Otte
f31a51a1c8 treeview: Pass height to allocate as argument
Instead of exporting a function to query it.
2017-11-13 01:28:16 +01:00
Benjamin Otte
b47ff72ebc progresstracker: Don't hand out NaN
When the duration is set to 0, clamp it to 1us. This way we're almost
correct: We should really instantly finish, but we don't. But we do
respect the delay.

Doing this properly would require some refactoring of how the progress
tracker actually maintains progress, and this is just a quick fix.
2017-11-12 06:22:34 +01:00
Benjamin Otte
6eead8f6a3 treeview: Use gtk_widget_get_width()
... instead of gtk_widget_get_allocated_width() and same for height.

This makes the treeview do the right thing when used with padding.
2017-11-12 05:46:06 +01:00
Benjamin Otte
61ecd10240 treeview: Don't allocate columns outside of size_allocate() 2017-11-12 05:38:58 +01:00
Benjamin Otte
5db1aa5401 treeview: Fix RTL column header allocation 2017-11-12 05:37:06 +01:00
Benjamin Otte
48de0bf741 treeview: width_changed is always true, so remove it
Also, sanitize the RTL correction code that made sure resizing the width
of a treeview would keep the contents glued to the right border instead
of the left border.
2017-11-12 05:31:21 +01:00
Matthias Clasen
f40b3bc5bc Fix up managed dnd
Since commit 6c56d04cee,
we were doing some calls twice in the managed dnd case,
leading to double drops.
2017-11-11 07:50:11 -05:00
Benjamin Otte
af13d474e8 textview: Remove GDK windows 2017-11-11 05:37:37 +01:00
Benjamin Otte
26909ee913 textview: Simplify gtk_text_view_buffer_to_window_coords()
... and gtk_text_view_window_to_buffer_coords()
2017-11-11 05:25:22 +01:00
Benjamin Otte
2533ad723a textview: Use text_window_get_width()/height()
Instead of poking the GdkWindow. They have the same size after all.
2017-11-11 05:12:07 +01:00
Benjamin Otte
17600b6bab textview: Make the semi-private headrs really private
Rename the files to have the private.h ending.

And remove gtktextdisplay.h from the installed files.
2017-11-11 05:01:31 +01:00
Benjamin Otte
d18b10a3d7 textview: Store border window sizes in a custom struct
That way, we don't need to have a GtKRequisition in every TextWindow.
2017-11-11 04:30:00 +01:00
Benjamin Otte
d65d5d0a84 gtktexttag: Remove GtkTextTag::event and gtk_text_tag_event()
GtkSourceView is not using it, so it's unneeded. And it's certainly
diving deep into event internals of GtkTextView which hinders a proper
gesturization.
2017-11-11 04:25:11 +01:00
Benjamin Otte
52424d8640 textview: Hide the selection bubble better
The selection bubble is not part of the text windows, so hiding it
during scroll should not be done in the text window code.

Also remove an unused variable that was only set in that code but never
read.
2017-11-11 02:49:08 +01:00
Benjamin Otte
e9dd5f327f flowbox: Compute view box from correct variables 2017-11-11 02:49:08 +01:00
Matthias Clasen
12837f6905 Drop the last use of GDK_MULTIHEAD_SAFE
This define is not used anymore, this was a leftover.
2017-11-10 16:14:19 -05:00
Kjell Ahlstedt
b0d1ae4a5c GtkCssImageIconTheme: Don't try to unref a NULL pointer
In gtk_css_image_icon_theme_snapshot(), don't try to unref icon_info
if it's NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=790171
2017-11-10 16:48:30 +01:00
Benjamin Otte
1da8c1b27f rendericon: Add missing include 2017-11-10 15:04:13 +01:00
Benjamin Otte
5b94fe6342 stylecontext: Make first property name explicit
Insist that a first non-NULL property is passed to
gtk_style_context_get().

This is in particular relevant because of dropping the state argument
since GTK3, and code like
  gtk_style_context_get (context, state, "font", &font);
would keep compiling without warnings without this change.
2017-11-10 14:56:42 +01:00
Benjamin Otte
51c5ccf412 a11y: Report correct spinner size 2017-11-10 14:56:42 +01:00
Benjamin Otte
723bf44887 calendar: Fix for GTK4 changes 2017-11-10 14:56:42 +01:00
Matthias Clasen
2aa52c7d00 Simplify the gtk_snapshot_icon_texture API
Instead of passing the color matrix in from the outside,
just pass a boolean and set up the matrix internally.
2017-11-08 22:21:42 -05:00
Matthias Clasen
7aa236fbb2 Fix a compiler warning 2017-11-08 22:09:34 -05:00
Matthias Clasen
a381ee6a55 Fix a typo 2017-11-08 22:09:23 -05:00
Matthias Clasen
23162bf0de filesystem: Drop surface-based APIs
These are no longer used.
2017-11-08 21:56:28 -05:00
Matthias Clasen
8460034f58 filechooserwidget: Use GIcons
This lets us avoid much of the symbolic icon rendering api.
2017-11-08 21:56:28 -05:00
Matthias Clasen
9aba7e3aa7 filechooserbutton: Use GIcons
This lets use avoid much of the symbolic icon rendering api.
2017-11-08 21:56:28 -05:00
Matthias Clasen
4148795c8b filesystem: Add GIcon getters
We want to move away from surfaces, and instead pass
GIcons and GdkTextures around.
2017-11-08 21:56:28 -05:00
Matthias Clasen
c83665005a Use color matrices for -gtk-recolor
Use the same approach we take for recoloring in GtkIconHelper now.
As part of this change, GtkCsSImageRecolor is changed to not derive
from GtkCssImageUrl anymore.
2017-11-08 10:04:38 -05:00
Daniel Boles
6f54e1fc6d CssProvider: Fix doc of min theme version loaded
The code shows that we only load back to 4.0, but this still said 3.0.
2017-11-08 09:22:49 +00:00
Daniel Boles
6a9c14b2fa CssProvider: Use consistent theme name placeholder
commit 475d916eb9 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
2017-11-08 09:22:46 +00:00
Matthias Clasen
6e4f7ad857 Fix the build 2017-11-08 00:37:04 -05:00
Matthias Clasen
acf58063a7 css image: Use GdkTexture api directly
No need to load a pixbuf anymore, we can just
directly create textures.
2017-11-07 23:04:36 -05:00
Matthias Clasen
44a3f6bb41 css: Use a color matrix for recoloring -gtk-icontheme
This is the same approach we are already using in
GtkIconHelper.
2017-11-07 21:39:47 -05:00
Matthias Clasen
1da7dc890c Make the recoloring code more robust
Pass both width+height and scale, so we can handle the case
where width+height are zero and we are using the file, scaled.
2017-11-07 21:27:38 -05:00
Matthias Clasen
6ebd2d384b fix the build 2017-11-07 19:56:11 -05:00
Matthias Clasen
284fd36e5d Fix symbolic.svg rendering
With the shader approach to symbolic recoloring, we must
not recolor the svgs anymore as we're loading them. Instead,
load them the same way that gtk-encode-symbolic-svg does.

This fixes the rendering of large symbolic icons e.g. the
'no search results found' page in the file chooser.
2017-11-07 18:56:32 -05:00
Benjamin Otte
f80a90d39a widget: Don't leak the cursor on destruction 2017-11-06 03:28:34 +01:00
Piotr Drąg
08d5ed5875 placessidebar: correct quotation marks in a new string 2017-11-05 21:18:53 +01:00
Alexandru Pandelea
2421e745b9 placessidebar: add starred location item
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag

https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 21:02:04 +01:00
Benjamin Otte
1cee71049a emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-05 16:12:35 +01:00
Benjamin Otte
c4ecc0993a flowbox: Don't call get_allocation()
That's wome outdated workaround code from the last version of GTK3.
2017-11-05 14:46:01 +01:00
Benjamin Otte
73077c4e90 viewport: Implement clipping for picking
This is necessary because picking is no longer automatically constrained
to a widget's box. So all clipping widgets need to constrain their
clipping, too.

This patch does that for GtkViewport only.
2017-11-05 07:19:22 +01:00
Benjamin Otte
e8b2493680 aboutdialog: Clean up for logo being a texture 2017-11-05 06:50:28 +01:00
Benjamin Otte
22472c1924 entry: Remove surface icons
We have texture icons.
2017-11-05 06:45:01 +01:00
Benjamin Otte
0f5d807cae iconhelper: Don't render to surface anymore
Just go directly to texture.
2017-11-05 06:30:45 +01:00
Benjamin Otte
bc552e74d8 menubutton: Don't fiddle with prelight state 2017-11-05 05:13:17 +01:00
Benjamin Otte
4ee02725b4 themes: Do expander arrow :hover properly
We want to prelight the arrow even when the label is hovered.
2017-11-05 05:13:17 +01:00
Benjamin Otte
e3effc8df2 expander: Don't do :hover yourself
GTK does it for you.
2017-11-05 05:13:17 +01:00
Benjamin Otte
c4a9fa9865 range: Stop trying to be smarter than GTK
GTK deals with PRELIGHT properly itself now, so there's no need to try
do it manually.
2017-11-05 05:13:17 +01:00
Benjamin Otte
4bb9a6360f range: Use gtk_widget_pick() to pick the mouse location
That's rather unsuccessful so far because it requires skipping a bunch
of irrelevant widgets, but oh well...
2017-11-05 05:13:17 +01:00
Benjamin Otte
994287b71f widget: Make gtk_widget_pick() really slow
We cannot fast-track picking by using gtk_widget_contains(). Child
widgets may extend their parent using ie negative margins.

This is not just a theoretical concern, this is what's happening right
now with GtkScale's sliders relative to the trough.

The problem is that we now iterate through all widgets, even when they
aren't anywhere near the mouse pointer. So essentially every pick
operation is now guaranteed O(N_WIDGETS) which used to be the worst case
that pretty much never happened.
2017-11-05 05:13:17 +01:00
Benjamin Otte
cf1cd19b61 range: Stack widgets properly
The trough widgets have the slider on top of the fill level and the
hilight widget. Make sure the widget stacking respects that.

This is particularly relevant because picking event targets should pick
the slider and not the hilight widget.
2017-11-05 05:13:17 +01:00
Benjamin Otte
897fdaf1c0 entry: Texture properties are objects
Carelessly copy/pasting made them boxeds. Oops.
2017-11-05 05:13:17 +01:00
Benjamin Otte
cf2d549e92 widget: Implement gtk_widget_pick()
... and use it.
2017-11-05 05:13:17 +01:00
Benjamin Otte
8d849458ac docs: You can't modify textures
So there's no need to tell people they must not do that.
2017-11-05 00:07:17 +01:00
Benjamin Otte
70846c85b3 window: Make icons GdkTextures
Cairo surfaces are bad, mkay?
2017-11-05 00:07:17 +01:00
Benjamin Otte
b4b7c27274 aboutdialog: Make logo a texture property
Get rid of cairo surfaces!
2017-11-05 00:07:17 +01:00
Benjamin Otte
b12a53406d builder: Mirror GdkPixbuf abilities for GdkTexture
In particular, allow specifying a filename for a GDK_TYPE_TEXTURE
property. This makes it easy to transition properties from Pixbuf type
to Texture type without having to touch resource files.
2017-11-05 00:07:17 +01:00
Benjamin Otte
2d959553e9 image: Add the ability to set textures
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Emmanuele Bassi
481b5d1b89 Partially revert GskTexture → GdkTexture rename
Excessive use of sed when moving GskTexture to GDK; the GskTextureNode
should still live under the GSK namespace.
2017-11-04 15:06:00 +00:00
Benjamin Otte
c5a631b999 inspector: Unrealize renderer before unreffing
See previous patch for a description on why that is necessary.
`
2017-11-04 15:22:25 +01:00
Benjamin Otte
a0ff63e162 iconhelper: Compute surface size without icon helper
This is so we can do the next batch of changes
2017-11-04 15:22:25 +01:00
Benjamin Otte
197eeade74 textview: Use gtk_widget_set_cursor()
This currently breaks because we still use GdkWindows. Soon...
2017-11-04 15:22:25 +01:00
Benjamin Otte
f7646cf541 textview: Remove GdkWindow usage from the public API
A sideeffect is that we don't set the correct parent window on child
widgets anymore, but that is hopefully going to be fixed once we get rid
of child windows completely.
2017-11-04 15:22:25 +01:00
Benjamin Otte
a409320cda gtk: Use gtk_widget_set_cursor()
... and gtk_widget_set_cursor_from_name() instead of setting cursors on
GdkWindows.
2017-11-04 01:37:03 +01:00
Benjamin Otte
b38a4cb824 widget: Export gtk_widget_set_cursor()
Widgets can now set their favorite cursor using public API.

This is very necessary because all cursor-setting APIs are still
setting it on their GdkWindow, which by now is the toplevel - oops.
2017-11-04 01:00:27 +01:00
Benjamin Otte
9323d098a6 gdk: Cursors no longer have a display
Change constructors to reflect that.

While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Carlos Garnacho
b8d3f88ddb gtkwindow: Use event target widget for WM handling special paths
The check used to achieve discarding events not meant for the window
widget itself (because they are handled in the regular paths). Using
the target widget is the equivalent now.
2017-11-03 22:19:13 +01:00
Kjell Ahlstedt
23014438d6 GtkWindow: Tidy up after icon became a cairo surface
Use g_value_set/get_boxed() in gtk_window_get/set_property(), case PROP_ICON.
icon_from_list() shall always add a reference to the returned icon.
gtk_window_set_icon() must accept icon != NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=789870
2017-11-03 20:05:28 +01:00
Timm Bäder
11b8f27b76 notebook: Fix setting show-tabs
show-tabs=FALS means the notebook is not supposed to show tabs,
regardless of whether it has a current page or not.
2017-11-03 11:22:44 +01:00
Timm Bäder
2603fa0cc3 notebook: Remove useless call to gtk_widget_reset_style 2017-11-03 11:22:44 +01:00
Timm Bäder
4f4ac29cd2 glarea: Use content size of the widget
For buffer sizes, etc. We only draw in the content area after all.
2017-11-03 10:47:02 +01:00
Timm Bäder
018daaeea8 rendernodeview: Use content size instead of allocated size 2017-11-03 10:47:02 +01:00
Timm Bäder
2283cbad92 colorplane: Use content size everywhere 2017-11-03 10:47:02 +01:00
Timm Bäder
34f3c6bd52 revealer: Create clip node for right widget size
It should use gtk_widget_get_width/height here to get the correct
content size of the revealer.
2017-11-03 10:47:02 +01:00
Benjamin Otte
f33c20920b x11: Add API to query root window and screen from GdkDisplay 2017-11-02 12:42:16 +01:00
Timm Bäder
8f55647fbb widget: Add get_width() and get_height() 2017-11-02 11:54:06 +01:00
Timm Bäder
dea8233663 widget: Remove stray prototype
gtk_cairo_transform_to_window is gone.
2017-11-02 11:25:41 +01:00
Matthias Clasen
fa5e3ee54e label: Stop using gdk_cursor_new_for_display
We prefer to use the name-based api for cursors nowadays.
2017-11-01 21:19:31 -04:00
Matthias Clasen
81cda3dcf7 Use x11-specific api to get at the screen
gdk_display_get_default_screen is going away.
2017-11-01 19:44:28 -04:00
Matthias Clasen
e41936c19c Fix a typo
A display is not of type GDK_TYPE_SCREEN.
2017-11-01 19:44:28 -04:00
Benjamin Otte
bd6b6ed93c gdk: Remove VisibilityNotify events 2017-11-01 22:00:34 +01:00
Benjamin Otte
c0ccad56f9 widget: Don't tell people to wait for nonexisting events 2017-11-01 22:00:34 +01:00
Daniel Boles
f24b286417 Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 20:24:56 +00:00
Daniel Boles
a58a5219b9 HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 20:24:55 +00:00
Daniel Boles
ff66de366c Inspector: better default split of CSS nodes/props
Move the default pos of the Paned handle to 400px from the left, i.e.
50% of the default width of the window. The previous position at 300px
from left meant the node treeview was too narrow & could easily result
in the (useful) State column not being visible in the case of many
apps. The properties pane doesn't need to be as big as it was anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=788898
2017-11-01 20:24:55 +00:00
Benjamin Otte
9d51134459 entry: Remove unused variable 2017-11-01 20:55:41 +01:00
Benjamin Otte
801d69017a switch: Use gtk_widget_contains() 2017-11-01 20:52:57 +01:00
Benjamin Otte
b6e0c9392a button: Use gtk_widget_contains() 2017-11-01 20:50:33 +01:00
Benjamin Otte
9b0d9aa7a6 wayland: Remove unused variable 2017-11-01 20:09:06 +01:00
Benjamin Otte
d88c441764 widget: Add gtk_widget_contains() 2017-11-01 19:46:59 +01:00
Matthias Clasen
606345cbaa Change the fullscreen-on-monitor api
Use GdkMonitor here, since that is our primary monitor
object now, and GdkScreen is going away.
2017-11-01 14:17:20 -04:00
Benjamin Otte
2d31a5499a gdk: Remove gdk_get_display_arg_name()
Since we're no longer allowing arguments, this is always NULL now.
2017-11-01 18:26:34 +01:00
Benjamin Otte
b880296354 window: Unset transient parent in set_display()
If somebody changes a window's display, the transient parent cannot
stay if it's on a different display.
2017-11-01 18:17:11 +01:00
Benjamin Otte
8059f9bb3a window: Clear the renderer un unrealize
We disconnect from the GDK window, so the renderer can't keep any useful
state.

Plus, we might be using an entirely different window next time we
realize (after a call to gtk_window_set_display() for example) that should
use a completely different renderer anyway.
2017-11-01 15:48:00 +01:00
Matthias Clasen
31b7555b7b Stop using screen resolution
This api is going away.
2017-10-31 18:53:29 -04:00
Matthias Clasen
a27bfaa0a3 Drop the GDK_DPI_SCALE variable
It complicates the dpi handling, and was really just a workaround
for non-dpi aware applications when hidpi support was first introduced.
2017-10-31 18:37:54 -04:00
Matthias Clasen
0cd88cd6b7 Stop using gdk_pango_get_context_for_display
The function does nothing useful for us.
2017-10-31 17:52:24 -04:00
Matthias Clasen
85e209a9c3 dnd: Remove remnants of screen tracking
There is only one screen nowadays, no need to track it.
2017-10-31 17:25:01 -04:00
Julian Sparber
2c42d8d6ed AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
Add the ‘new’ GTK_LICENSE_AGPL_3_0 to the allowed enum range checked in
gtk_about_dialog_set_license_type(), so this value can actually be used.

https://bugzilla.gnome.org/show_bug.cgi?id=789678
2017-10-31 18:56:26 +00:00
Benjamin Otte
2740f5eeee inspector: Fix property being "display" now 2017-10-31 18:37:48 +01:00
Matthias Clasen
a3cffa5072 Drop GdkScreen from GdkDevice apis
Returning the screen does not add anything here and
GdkScreen is going away.
2017-10-31 12:30:38 -04:00
Matthias Clasen
f8cad19829 dnd: Drop GdkScreen from apis
Drop the screen argument from gdk_dnd_find_window_for_screen
and rename the function to gdk_dnd_find_window. The screen
argument does not add anything here since the drag context
is already tied to the display. Update all backends, and
update all callers.
2017-10-31 10:18:10 -04:00
Timm Bäder
c97e2af23b widget: Make invalidation coordinates widget-relative
Consider the coordinates passed to gtk_widget_queue_draw_region to be
relative to @widget's origin, not its parent. That implies passing
priv->allocation or priv->clip to _queue_draw_region of a widget means
using its parent as @widget.

This fixes GtkScrolledWindow overshoot invalidation, which assumed the
coordinates to be widget-relative and not parent-relative.
2017-10-31 10:10:53 +01:00
Timm Bäder
3dca25b6e4 textview: Remove {top,bottom,left,right}_border
These are now the same as the equivalent _margin values.
2017-10-31 10:10:53 +01:00
Timm Bäder
3c0657f0fd textview: Stop fiddling with CSS padding
This is done automatically now and doing it again here means we apply
the padding twice.
2017-10-31 10:10:53 +01:00
Timm Bäder
45c03a9263 widget: Rename color variable to match the color 2017-10-31 10:10:53 +01:00
Timm Bäder
23a1328fda viewport: Simplify child allocation
allocation->x and allocation->y are always 0
2017-10-31 10:10:53 +01:00
Timm Bäder
f576002e9e widget: Improve get_request_mode vfunc docs 2017-10-31 10:10:53 +01:00
Timm Bäder
099990fcbe gskpango: Remove GDK api macros
They only belong on public functions.
2017-10-31 10:10:53 +01:00
Benjamin Otte
3967072c66 docs: Fix up some places that still said screen instead of display 2017-10-31 08:25:37 +01:00
Benjamin Otte
ccd52a410e settings: Remove gtk_settings_get_for_screen()
All users of it are gone now.
2017-10-31 08:25:37 +01:00
Benjamin Otte
648d040395 widget: Remove gtk_widget_get_screen()
Replace the remaining users with "correct" code that does not need that
function anymore.
2017-10-31 08:25:37 +01:00
Benjamin Otte
4a43229d0b invisible: Make it use display, not screen 2017-10-31 08:25:37 +01:00
Benjamin Otte
b9504a547a mountoperation: Move from screen to display 2017-10-31 08:25:37 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
941a621ea9 styleprovider: Fix fallout from merge
StyleProvider should inherit from GObject, not from itself.
2017-10-31 06:17:40 +01:00
Benjamin Otte
e8053622eb gtk: Fix debug build
It seems I didn't have debug builds enabled and forgot some
return_if_fail()s when doing the last patch.
2017-10-31 06:10:26 +01:00
Benjamin Otte
83fb7a649f css: Merge GtkStyleProviderPrivate into GtkStyleProvider
This is just lots of renaming.

The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
2017-10-31 04:33:54 +01:00
Benjamin Otte
c8986e66ce window: Remove gtk_window_get_screen()
It's identical to gtk_widget_get_screen(), just use that one.
2017-10-31 04:33:54 +01:00
Benjamin Otte
1c36c6ed4d widget: Remove gtk_widget_has_screen()
All widgets always have a screen (or display).
2017-10-31 04:33:11 +01:00
Matthias Clasen
c20d217d8f printoperation: Stop using gdk_app_launch_context_set_screen
It is not necessary.
2017-10-30 23:01:01 -04:00
Matthias Clasen
f63d01b782 gtk: Stop using gdk_event_get_screen
Use gdk_event_get_display instead.
2017-10-30 22:22:00 -04:00
Benjamin Otte
ecd5b399a4 icontheme: Use GdkDisplay instead of GdkScreen 2017-10-31 03:05:55 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Benjamin Otte
cb0c7d6cf3 immulticontext: Remove unused variable 2017-10-31 00:44:35 +01:00
Benjamin Otte
44614394e6 widget: Turn screen-changed signal into display-changed 2017-10-31 00:43:11 +01:00
Benjamin Otte
59cfd56365 settings: Don't store the screen in the settings object
Screens are going away.

Code that still needs the screen just gets it from the display.
2017-10-31 00:42:32 +01:00
Matthias Clasen
9e5f4f94b3 immulticontext: Avoid GdkScreen api
No need for it here either.
2017-10-30 19:30:29 -04:00
Matthias Clasen
297889e080 immodule: Avoid GdkScreen api
Another place where it is not needed.
2017-10-30 19:27:36 -04:00
Matthias Clasen
24903e3fab modules: Avoid GdkScreen api
No need for this here either.
2017-10-30 19:19:38 -04:00
Matthias Clasen
0cd864283f assistant: Avoid GdkScreen api
There is no need at all here to use gtk_settings_get_for_screen.
2017-10-30 19:19:38 -04:00
Matthias Clasen
a1a5f556cb Some documentation updates
Document gtk_settings_get_for_display instead of for_screen.
2017-10-30 18:59:41 -04:00
Matthias Clasen
e821c2fc2f gtk: Avoid using gdk_screen_get_setting
We can get the setting from the display instead.
2017-10-30 16:51:20 -04:00
Matthias Clasen
f9cc7ca140 Add gtk_settings_get_for_display
This will help us avoiding screens in many places.
2017-10-30 16:50:14 -04:00
Matthias Clasen
a518072e87 Remove GdkScreen api usage
Use GdkDisplay equivalents where they exist.
2017-10-30 16:06:42 -04:00
Matthias Clasen
1f22c6532e Store the display inside GtkSettings
This is a step towards dropping GdkScreen.
2017-10-30 15:56:03 -04:00
Matthias Clasen
2926669a9b gtk: Stop handling settings events
We don't need this anymore, now that we use the ::setting-changed
signal.
2017-10-30 09:48:51 -04:00
Matthias Clasen
a8aff6ef8f gtk: Connect to GdkDisplay::setting-changed
We still handle the setting event, for now.
That will be removed in a future commit.
2017-10-30 09:29:54 -04:00
Benjamin Otte
916981f66e cssimagescaled: Remove now unused struct member 2017-10-30 02:55:46 +01:00
Benjamin Otte
481189867a inspector: Use the new monitor change signals
And on't use the GdkScreen anymore now that the GdkDisplay provides all
the information we care about.
2017-10-30 02:30:44 +01:00
Timm Bäder
91f40eb088 widget: Make parent property read-only 2017-10-29 18:03:10 +01:00
Timm Bäder
09239eb670 widget: Don't notify :parent when rearranging widgets
gtk_widget_reposition_after is also valid to call if the widget already
has a parent, so don't notify the parent property in that case.
2017-10-29 17:27:53 +01:00
Timm Bäder
ff6cd8f75e widget: Remove parent-set signal
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.

Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.
2017-10-29 17:24:12 +01:00
Timm Bäder
0be4166b89 inspector: Remove node != NULL check from recorder model
We use NULL to remove the selection.
2017-10-29 13:44:12 +01:00
Timm Bäder
8b0f60bb6f checkbutton: Destroy indicator widget when draw-indicator is FALSE 2017-10-29 13:27:03 +01:00
Benjamin Otte
457bd2b9ee cssimagescaled: Just return the computed image
... instead of returning either itself with uncomputed images or a
copy of itself with only one computed image and lots of other
uncomputed images that we're never gonna look at again.

This fixes expressions like -gtk-scaled(-gtk-recolor(...),-gtk-recolor(...))
which Adwaita uses for checkmarks and bullets.
2017-10-29 06:41:12 -04:00
Matthias Clasen
598d22d194 Avoid creating trivial shadow nodes
The Vulkan renderer creates a fallback surface for each shadow
node, even if we end up not rendering anything to it. Avoiding
this is a nice optimization.
2017-10-28 16:10:46 -04:00
Matthias Clasen
99d3d31314 Adwaita: Use scaled icons for checks and bullets
This gives us crip rendering on hidpi screens.
2017-10-28 15:22:54 -04:00
Matthias Clasen
1dbc50f3f8 Adwaita: Add scaled version of bullets and checks
We use these assets as .symbolic.png now, so for hidpi, we
should provide @2 variants.
2017-10-28 15:20:11 -04:00
Matthias Clasen
a48015d3c6 inspector: Show details for shadow nodes
One of the few node types that we're not detailing yet.
2017-10-28 14:30:03 -04:00
Matthias Clasen
dc0570cc17 gsk: Drop the GskRenderer::scale-factor property
This is can always be obtained from the window that is already
associated with the renderer, no need to maintain a separate
property for it.
2017-10-28 11:49:39 -04:00
Timm Bäder
50d9484083 Adwaita: Add back visible focus outlines for list rows 2017-10-28 11:46:35 +02:00
Timm Bäder
4dee08dd52 sizerequest: Don't pass uninitialized values to measure
The GtkWidgetClass::measure vfunc is not required to assign a value to
any of the (out) parameters, so we need to initialize the locals we pass
to it, otherwise we can end up with a garbage size request.
2017-10-28 11:42:08 +02:00