It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
The preview widget harks from a platform before time, when we didn't
have GIO, or a thumbnail specification.
Very few applications use it correctly, if at all; it has an horrid hack
to deal with the ownership of the widget's instance when accessed
through the getter function; it messes up the layout of the widget and
its label is less than useful when it comes to file names longer than a
dozen characters; it's a poor substitute for a proper thumbnail view.
GtkFileChooser's API predates GIO by a few years, so it started off with
filenames and URI as character arrays. After introducing GIO as a
dependency, the API included GFile-based entry points.
It's much more appropriate to use GFile everywhere, as we want to
encourage people to use GIO instead of passing random bytes to low level
POSIX API.
See: #2455
... and use one controller per button instead of using it on the
switcher and then going through lots of pain attempting to find the
right button for the location under the mouse.
Emit crossing events - with a new GTK_CROSSING_DROP type - like we do
for motion events. There is no more special casing for them.
Note that the gesture has not been updated yet, so some obscure behavior
may occur.
And in particular, only do it if the widget doesn't use ALIGN_FILL.
This avoids lots of measuring in the common case and speeds up
size_allocate() by about 25%.
And because size_allocate() is the bottleneck in the fishbowl, this also
gets ~25% more fishies.
Widgets should be given the actual size they will be allocated, so they
can do something with it.
If they want to clamp themselves to their natural size, nothing's
stopping them, they know their natural size after all.
It's the native's job to request a 1px x 1px size, not the job of
gtk_widget_size_allocate()
Also saves 10% of size_allocate() time because checking for an interface
is really expensive.
FIXME: Is this necessary?
Could the surfaces just clamp to 1x1 themselves?
We recently declared that surfaces can decide on whatever size they want
so natives need to inspect the size they requested anyway.
We are using (dddd) variants to store colors in variants,
which is dangerous now that GdkRGBA members are just floats.
Avoid passsing the GdkRGBA members directly to any varargs
functions.