Matthias Clasen
8f291be8c6
tooltip: fix critical warnings
...
We might trigger a requery while unrooted.
Deal with it.
2019-05-28 20:25:16 +00:00
Matthias Clasen
693b2aa4d1
Drop gtk_widget_get_toplevel
...
Not used anymore.
2019-05-28 20:25:16 +00:00
Matthias Clasen
7447abb52b
Stop using gtk_widget_get_toplevel
...
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
6674f2764e
Drop gtk_widget_is_toplevel
...
No longer used.
2019-05-28 20:25:16 +00:00
Matthias Clasen
948347afa9
Stop using gtk_widget_is_toplevel
2019-05-28 20:25:16 +00:00
Matthias Clasen
8fc6f07327
Drop gtk_widget_get_surface
...
It is no longer used.
2019-05-28 20:25:16 +00:00
Matthias Clasen
302d2a04ae
Stop using gtk_widget_get_surface
...
Replace all uses of gtk_widget_get_surface by
gtk_native_get_surface.
2019-05-28 20:25:16 +00:00
Matthias Clasen
a65696fc9f
builder tool: Handle modal->autohide rename
...
Add a facility for renamed properties,
and use it for GtkPopover::modal.
2019-05-28 20:25:15 +00:00
Matthias Clasen
25aef96d5d
popover: Rename modal to autohide
...
This is the term we use for the surface,
and it matches the behavior a bit better
than modal.
Update all callers.
2019-05-28 20:25:15 +00:00
Matthias Clasen
09ec88d0ce
win32: Build fixes
2019-05-28 20:25:15 +00:00
Matthias Clasen
0b3a971056
window: Make unrealize work again
...
GtkWidgets unrealize accesses the frame clock
of the surface, so we need to keep the surface
in place until after we've chained up.
2019-05-28 20:25:15 +00:00
Matthias Clasen
b99962e7a2
Drop gtk_widget_set_surface
...
Not used anymore. Only GtkNative's have surfaces.
2019-05-28 20:25:15 +00:00
Matthias Clasen
43bed7986a
Drop GtkWidget::surface
...
Unneeded.
2019-05-28 20:25:15 +00:00
Matthias Clasen
0047492bf9
Work toward dropping widget->surface
...
Drop special-casing of GtkNative in
most widget vfuncs. GtkNative implementations
need to override these anyway.
2019-05-28 20:25:15 +00:00
Matthias Clasen
18788c2a86
Remove gtk_widget_get/set_has_surface
...
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
fd0a290d77
popover: Bring back the beak
...
Bring back the code that draws an arrow.
2019-05-28 20:25:15 +00:00
Matthias Clasen
61247a8921
widget: Remove a popover special case
...
We never run this since GtkPopover has its
own size_allocate, anyway.
2019-05-28 20:25:15 +00:00
Matthias Clasen
a33d4f0f49
text view: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
6c3ffa1380
places sidebar: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
07426da074
color swatch: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
4cab6ae61a
entry: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
507b2d332e
scale button: Allocate popovers
...
Call gtk_native_check_resize() from size_allocate,
as is required now. This gets volume buttons closer
to working again (dragging the slider still doesn't
work).
2019-05-28 20:25:15 +00:00
Matthias Clasen
e6f71d841e
text: Allocate popovers
...
We need to do the same thing the menu button
does, and call gtk_native_check_resize for
all our popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
1f2d3c0900
window: Don't inherit cursors across surfaces
...
I can't think of a case where this is the desired
behavior. So, instead of setting an explicit cursor
on all popups, just stop walking the parents at
surface boundaries.
2019-05-28 20:25:15 +00:00
Matthias Clasen
f3559fe0f0
widget: Optimize resize propagation
...
When a GtkNative widget is marked as resize_needed,
we need a current position for its parent and we need
the parent to be allocated (so we can position our
surface), but we don't need the parent to be marked
as resize_needed, since the parent size is entirely
independent of the popup size.
2019-05-28 20:25:15 +00:00
Matthias Clasen
27596c328a
widget: Improve warning messages
...
When we print warnings about a widget, using
gtk_widget_get_name() is slightly better than
G_OBJECT_TYPE_NAME(), since it will give us
the widgets unique name when available.
2019-05-28 20:25:15 +00:00
Matthias Clasen
49268c23fd
popover: Use GdkSurface::autohide
...
The new api is made for this case.
2019-05-28 20:25:14 +00:00
Matthias Clasen
d2951d3aac
Rename surface constructors
...
We want to use a gdk_surface_new_popup for popups,
and align the constructor names with the surface
types, so rename
gdk_surface_new_popup -> gdk_surface_new_temp
gdk_surface_new_popup_full -> gdk_surface_new_popup
The temp surface type will disappear eventually.
2019-05-28 20:25:14 +00:00
Matthias Clasen
346bd3f6b5
menu: Stop using gdk_surface_new_temp
...
We can just as well use gdk_surface_new_popup.
2019-05-28 20:25:14 +00:00
Matthias Clasen
bab5836e89
Drop gtk_widget_register_surface
...
This is no longer used.
2019-05-28 20:25:14 +00:00
Matthias Clasen
fa25b06a28
popover: Stop using gtk_widget_register_surface
...
The GtkRoot implementations are expected to handle
the necessary surface setup themselves, going forward.
2019-05-28 20:25:14 +00:00
Matthias Clasen
81a673c908
window: Stop using gtk_widget_register_surface
...
The GtkRoot implementations are expected to handle
the necessary surface setup themselves, going forward.
2019-05-28 20:25:14 +00:00
Matthias Clasen
55c286661b
menu: Stop using gtk_widget_register_surface
...
It does not seem to be necessary at all.
2019-05-28 20:25:14 +00:00
Matthias Clasen
989792cbc0
Drop child surfaces
...
Drop gdk_surface_child_new and the child surface type,
since we no longer use them. Deprecate surface apis
that only make sense with child surfaces.
2019-05-28 20:25:13 +00:00
Matthias Clasen
52c3507ae1
widget: Stop using child surface apis
...
All our surfaces are toplevels now, and thus all native.
2019-05-28 20:25:13 +00:00
Matthias Clasen
43d4c908c9
a11y: Stop supporting ATK_XY_SCREEN
...
We were already not supporting ATK_XY_PARENT, and we can't
support global positions, so just always do ATK_XY_WINDOW.
2019-05-28 20:25:13 +00:00
Matthias Clasen
d6a85188b6
xim: Stop using child surface apis
...
We no longer have child surfaces.
Drop code that only makes sense in
their presence.
2019-05-28 20:25:13 +00:00
Matthias Clasen
c3c33ac168
entry completion: Use a popover
...
This lets us remove a use of GTK_WINDOW_POPUP,
which should eventually be going away.
We need to disable treeview search, since it
creates a toplevel that will disrupt our grabbing
popup, causing it to be dismissed.
We don't need to grab ourselves, since the popover
code does it for us. We don't need to reposition our
window, since the popover takes care of that too.
2019-05-28 20:25:13 +00:00
Matthias Clasen
0d25233e39
main: Use gtk_widget_get_native
2019-05-28 20:25:13 +00:00
Matthias Clasen
66ccc825de
main: Remove special-case hiding popopvers
...
This is now happening in GDK, so we don't have
to do this here anymore.
2019-05-28 20:25:13 +00:00
Matthias Clasen
580aa8204f
widget: Remove some unneeded popover special-casing
2019-05-28 20:25:13 +00:00
Matthias Clasen
82d506acd8
Adwaita: Give popover menus a background
...
This makes the hover highlight on menu items visible.
2019-05-28 20:25:13 +00:00
Matthias Clasen
1cbc26d9ee
menubutton: Allocate the popover
...
This is temporary, until we've figured out
the proper way of hooking this up
2019-05-28 20:25:13 +00:00
Matthias Clasen
4bf4f04d1f
Adapt to new popover lifecycle
...
We need to unparent popovers in dispose.
2019-05-28 20:25:13 +00:00
Matthias Clasen
6ab8ab87c8
Reimplement GtkPopover
2019-05-28 20:25:13 +00:00
Matthias Clasen
2764652b3c
menushell: Keep outside clicks working
...
We need to unset event propagation limits here
to keep receiving outside clicks that cause us
to close the menu.
2019-05-28 20:25:13 +00:00
Matthias Clasen
2606ca0bd1
Introduce event controller propagation limits
...
Limit event handlers by default to only handle
events targeting the same surface as their widget.
2019-05-28 20:25:13 +00:00
Matthias Clasen
54662f4ca0
widget: Don't snapshot foreign children
...
When snapshotting, we walk down the widget tree.
We need to skip children that have a different
surface, since those will do their own snapshot.
2019-05-28 20:25:13 +00:00
Matthias Clasen
8713397948
root: Make gtk_root_get_display public
...
This is following the precedent of making
GtkNative getters public.
2019-05-28 20:25:02 +00:00
Matthias Clasen
f2447e06af
GtkRoot: Drop overlap with GtkNative
...
Drop the parts from the GtkRoot interface
that have been taken over by GtkNative.
2019-05-28 20:24:39 +00:00