Commit Graph

32630 Commits

Author SHA1 Message Date
Matthias Clasen
c7ccaa5ef2 menu: Update scrollbar policy
We want to avoid sizing problems for small menus
due to the vertical scrollbar imposing a min-height on
its slider.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1930
2019-06-03 14:49:13 +00:00
Michael Natterer
caf50bcb93 gtk: fix weed_out_neg_zero() in spinbutton and scale
It was not copying the terminating \0 in the string, breaking output
in spinbutton (didn't try scale). Fixes #3452.


(cherry picked from commit ae2ef1472c)
2019-06-03 00:34:44 +00:00
Christian Hergert
41e373f10c gtk: fix all uses of g_cclosure_marshal_generic
This adds specific marshallers for all of the locations where a generic
marshaller is being used. It also provides va_marshallers to reduce the
chances that we get stack traces from perf going through ffi_call_unix64.

This is forward ported from gtk-3-24.

# Conflicts:
#	gtk/gtkeventcontrollerkey.c
#	gtk/gtkeventcontrollermotion.c
#	gtk/gtkgesture.c
#	gtk/gtkgesturemultipress.c
2019-06-02 14:24:51 -07:00
Matthias Clasen
aa267c1c84 Add gtkmenubarprivate.h
Move private api into a private header.
2019-06-01 21:56:49 +00:00
Matthias Clasen
3dea73bd4a Cosmetics
Remove comments that are old enough to still
talk about option menus and item factories.
2019-06-01 21:56:49 +00:00
Matthias Clasen
03964b5edb Remove an unused enum
No use of GtkArrowPlacement anywhere.
2019-06-01 04:11:22 +00:00
Matthias Clasen
0c7e567c32 Merge branch 'global-coords' into 'master'
Drop global coordinates

See merge request GNOME/gtk!899
2019-06-01 03:53:13 +00:00
Matthias Clasen
fcdea03796 Fix menu item accessible
The menu shell is not a direct parent anymore.
2019-06-01 03:39:12 +00:00
Matthias Clasen
feef0ef93a menu: Fix destruction
Now that menubar and menu are containers
with internal structure, we need to be
careful about doing the right thing in
forall and dispose.
2019-06-01 03:32:10 +00:00
Matthias Clasen
6c201e7927 menu: Fix keynav between submenus
Left/Right arrow now work again to enter
or leave a submenu.
2019-05-31 23:36:35 +00:00
Matthias Clasen
ace30d42ea menu: Bring back the scroll keybindings
Home, End, Page Up/Down, work again.
2019-05-31 23:36:35 +00:00
Matthias Clasen
e599336ad4 menu: Keep selected item in view
This gets us most of the way to working scrolling.
2019-05-31 23:36:35 +00:00
Matthias Clasen
8ba3c75682 More menu work 2019-05-31 23:36:35 +00:00
Matthias Clasen
3f6272f56e More menu restructuring
Make GtkMenuBar use a box as well,
and let GtkMenuShell get the items
from GtkMenuBar and GtkMenu via
a vfunc. Use that to fix the keynav
implementation in GtkMenuShell.
2019-05-31 23:36:35 +00:00
Matthias Clasen
13e010deb6 menu: Use a scrolled window
This brings back some support for scrolling.
We still need to reinstate some of the
scroll-to-selected and keynav functionality.
2019-05-31 23:36:35 +00:00
Matthias Clasen
ae1ba79f63 menu: Use a box
This makes some of the GtkMenuShell api
no longer work, since we don't let the
menu shell code maintain the list of
children anymore.
2019-05-31 23:36:35 +00:00
Matthias Clasen
17cd6d7f44 widget: Stop setting root coords in events
Nothing should use them anymore.
2019-05-31 23:36:35 +00:00
Matthias Clasen
f645c4e923 menu: Remove global coordinates
This commit removes support for scrolling and
for the keep-up triangle from GtkMenu, and gets
rid of all use of global coordinates.
2019-05-31 23:36:34 +00:00
Benjamin Otte
4e464b4960 menu: Only set position in one place 2019-05-31 23:36:34 +00:00
Benjamin Otte
d971c4e69d menu: Simplify function
No need to do complicated math when we can just look at the allocation.
2019-05-31 23:36:34 +00:00
Benjamin Otte
e702a33432 menuitem: Introduce gtk_menu_item_get_menu_shell()
Returns the parent menu shell or NULL.

Replace all calls to gtk_widget_get_parent() with this function.
2019-05-31 23:36:34 +00:00
Lubomir Rintel
8799e5798b builder-tool: Rewrite GtkDialog
Changes

  <object class="GtkDialog">
    <child internal-child="vbox">
      <...>
        <child internal-child="action_area">...</child>
        ...
      </...>
      <packing />
    </child>
  <object>

to

  <object class="GtkDialog">
    <child internal-child="content_area">
      <...>
        ...
      </...>
    </child>
    <child internal-child="action_area">...</child>
  <object>
2019-05-31 17:03:12 +00:00
Matthias Clasen
97e15b8718 scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
2019-05-31 15:04:23 +00:00
Matthias Clasen
2ae6f1a741 Add a gtk-overlay-scrolling setting
This is in preparation for letting user opt out of
overlay scrolling in the control-center.
2019-05-31 14:07:15 +00:00
Matthias Clasen
8145872e27 Merge branch 'wip/chergert/remove-cclosure' into 'master'
gtk: rely on default marshallers

See merge request GNOME/gtk!893
2019-05-31 10:57:27 +00:00
Benjamin Otte
4df049e81c Merge branch 'for-master' into 'master'
For master

See merge request GNOME/gtk!892
2019-05-31 04:07:11 +00:00
Christian Hergert
bd26cce812 gtk: rely on default marshallers
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.

Related to GNOME/Initiatives#10
2019-05-30 20:56:50 -07:00
Benjamin Otte
6b2518a190 widget: fix CSS transforms with margins
The CSS transform should operate on the border-box, not the margin box.
So we need to shrink the bounds by the margin before we apply the CSS
transform.
2019-05-31 05:36:50 +02:00
Niels De Graef
df9aed6c61 Fix some GObject introspection annotations
Fixes several warnings by the GIR compiler.
2019-05-30 20:34:43 +02:00
Benjamin Otte
1e0c0c0ba7 rendernodeparser: Parse cairo script
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.

This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.

A new test is included that tests all of this.
2019-05-30 15:32:36 +02:00
Matthias Clasen
2f37207487 Remove leftover debug spew 2019-05-30 08:19:08 -04:00
Matthias Clasen
d71bf4d35c Add gtknative.h to public headers 2019-05-30 08:18:29 -04:00
Matthias Clasen
93a34eb62d Merge branch 'lr/builder-tool-templates' into 'master'
builder-tool: Rewrite GtkBuilder templates too

See merge request GNOME/gtk!888
2019-05-30 11:56:05 +00:00
Lubomir Rintel
1e7225aa1c builder-tool: Set the parent of newly created GtkAssistantPage
...and its property. Otherwise simplify_element() blows up when looking
up the hierarchy to determine a property type.

  $ gtk4-builder-tool simplify --3to4 /dev/stdin <<EOF
  > <?xml version="1.0" encoding="UTF-8"?>
  > <!-- Generated with glade 3.20.2 -->
  > <interface domain="nm-applet">
  >   <object class="GtkAssistant">
  >     <child>
  >       <object class="GtkBox" id="confirm_page">
  >       </object>
  >       <packing>
  >         <property name="page_type">confirm</property>
  >         <property name="complete">True</property>
  >       </packing>
  >     </child>
  >   </object>
  > </interface>
  > EOF
  /dev/stdin: Packing property GtkAssistant::page_type not found
  /dev/stdin: Packing property GtkAssistant::complete not found
  Segmentation fault (core dumped)
2019-05-30 11:39:09 +02:00
Lubomir Rintel
2d55fce23d builder-tool: Rewrite GtkBuilder templates too 2019-05-30 10:34:24 +02:00
Matthias Clasen
e0cc72e94f Fix shortcuts window sizing
We were deferring the reflow until map, but this
leads to the section initially having an enormous
height and the window picks up that size before
we have a chance to reflow, This could be seen
in the "Builder" demo in gtk4-demo.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/11
2019-05-29 17:06:27 -04:00
Christian Hergert
82afe850e8 marshallers: add missing g_cclosure_marshal_VOID__VOID fixes 2019-05-29 13:48:33 -07:00
Christian Hergert
f507a79056 marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
2019-05-29 13:22:31 -07:00
Matthias Clasen
90f330e27a Merge branch 'gesture-click' into 'master'
Rename GtkGestureMultiPress to GtkGestureClick

See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Matthias Clasen
2be733497b Merge branch 'global-coords' into 'master'
Drop global coordinates

See merge request GNOME/gtk!879
2019-05-29 18:29:57 +00:00
Matthias Clasen
b867cbe0d8 Cosmetics
Remove an unused variable.
2019-05-29 18:04:08 +00:00
Matthias Clasen
956e94a8d4 Remove a misleading comment
We don't have windowed widgets anymore, and
gdk_surface_move_resize is about to go away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
2081bf346e window: Remove move unused fields
position_constraints_changed is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
74db7cbe00 window: Never call gdk_surface_move
With gtk_window_set_position gone, we should never
come up with a new position to set in this code.

Leave a warning in place and remove the gdk_surface_move
calls.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d6d5d60703 Drop an empty function
gtk_window_constrain_position is not doing anything
anymore, so no need to call it.
2019-05-29 18:04:08 +00:00
Matthias Clasen
ece7fff339 window: Drop more unused fields
need_default_position is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
147adc0bc5 window: Drop some unused fields
initial_x/y and initial_pos_set are never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
b636e32d85 widget: Stop using gdk_device_get_position
Root coordinates are going away. Stop
setting them in crossing events, so we
can drop this api.
2019-05-29 18:04:08 +00:00
Matthias Clasen
a8899cc6a3 window: Drop gtk_window_set_position
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
2019-05-29 18:04:08 +00:00
Matthias Clasen
f0ef5332be a11y: Stop using gdk_surface_get_frame_extnts
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
83827d3199 a11y: Stop using gdk_surface_get_origin
Global coordinates are going away.
Stop supporting ATK_XY_SCREEN.
2019-05-29 18:04:08 +00:00
Matthias Clasen
fcc8a365b9 main: Use gdk_surface_translate_coordinates
This gets rid of another use of global coordinates.
2019-05-29 18:04:08 +00:00
Matthias Clasen
7f65e5f96b Rename GtkGestureMultiPress to GtkGestureClick
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Colomban Wendling
745a7cf29e HighContrast: Improve contrast of notebook tabs 2019-05-29 17:46:41 +02:00
Benjamin Otte
56db17e5e8 Revert "window: Chain up in show/hide"
This reverts commit 863f4d13ff.
2019-05-29 16:52:13 +02:00
Benjamin Otte
863f4d13ff window: Chain up in show/hide 2019-05-29 16:34:56 +02:00
Benjamin Otte
cabe39862b widget: Add marshallers to signals
Yay for better sysprof logs!
2019-05-29 16:34:56 +02:00
Benjamin Otte
2380f9673b widget: Do proper clean up in real_hide()
Do the same things set_visible_flag() does.
2019-05-29 16:34:56 +02:00
Benjamin Otte
170c25a9d2 widget: Move functions around
Copy them further up so that we can use them there in the next commit.
2019-05-29 16:34:56 +02:00
Benjamin Otte
e85f1e176a widget: Insist on proper vfunc calling
Insist that ->show() is only called for invisible and ->hide only for
visible widgets.
2019-05-29 16:34:56 +02:00
Benjamin Otte
a079fd2def widget: Fix transform refcounting in allocate()
Make the transform (transfer full).

1. This makes sure we actually reference the transform. Previously we
   did not.
2. Most callers create a new transform to pass to us. Now they don't
   have to uref it anymore.
2019-05-29 16:34:56 +02:00
Benjamin Otte
89fb752a8f css: Use %f, not %.17f
The testusite failures explain why:
We don't want to print "1.00000000000000000", but "1".
2019-05-29 14:30:13 +02:00
Benjamin Otte
d71c196c5c css: Don't print numbers with exponent
CSS does not do exponents, so printing numbers close to 0 as 1.234e-15
does not work.

Also up the accuracy to 17 digits because that's what everyone else
uses.
2019-05-29 07:14:31 +02:00
Matthias Clasen
ead96b65fd notebook: Drop position from ::create-window
Global coordinates are going away.
2019-05-28 23:23:06 -04:00
Matthias Clasen
0cc94ed72e Some entry completion fixes
This gets popover-based entry completion closer
to working as expected. And it drops a use of
gdk_surface_get_origin.
2019-05-28 23:23:06 -04:00
Matthias Clasen
dd5839dfe8 tree models: Use standard padding 2019-05-28 23:23:06 -04:00
Matthias Clasen
9abc7262b0 treeview column: Make final 2019-05-28 23:22:57 -04:00
Matthias Clasen
79940b32b5 treeview: Make final
Make GtkTreeSelection final as well.
2019-05-28 21:42:38 -04:00
Matthias Clasen
aec5e3d71e flow box: Make final
We keep GtkFlowBoxChild subclassable, though.
2019-05-28 20:01:43 -04:00
Matthias Clasen
217115d35f listbox Make final
We keep GtkListBoxRow subclassable, though.
2019-05-28 20:01:43 -04:00
Matthias Clasen
ee29b9ba95 notebook: Make final 2019-05-28 20:01:43 -04:00
Matthias Clasen
c34abb6775 label: Make final 2019-05-28 19:45:45 -04:00
Matthias Clasen
b523f2b46a menubar: Make final 2019-05-28 19:43:43 -04:00
Matthias Clasen
6836bfc208 toolbar: make final 2019-05-28 23:38:16 +00:00
Matthias Clasen
8695e8c1b8 menu: Make final 2019-05-28 23:38:16 +00:00
Matthias Clasen
6ffc9f9e6e Forgotten file 2019-05-28 23:30:02 +00:00
Matthias Clasen
0a6813d0aa menu tool button: Make final 2019-05-28 18:58:58 -04:00
Matthias Clasen
ef3e20cffe radio tool button: Make final 2019-05-28 18:58:46 -04:00
Matthias Clasen
5db4530a22 toggle tool button: Use standard padding 2019-05-28 18:58:31 -04:00
Matthias Clasen
4b5fee943e tool button: Use standard padding 2019-05-28 18:58:05 -04:00
Matthias Clasen
f0fd4843d5 iconview: Make final 2019-05-28 22:50:08 +00:00
Matthias Clasen
700e9e03c5 stack: Make final 2019-05-28 22:35:36 +00:00
Matthias Clasen
055a991e08 file chooser error stack: Don't derive from stack
We can just have a GtkStack, instead.
2019-05-28 22:35:36 +00:00
Matthias Clasen
bc739e607b scrolled window: Make final 2019-05-28 22:35:36 +00:00
Matthias Clasen
211128fb7c inspector: Stop deriving from scrolled window 2019-05-28 22:35:36 +00:00
Matthias Clasen
461e8e0218 places sidebar: Don't derive from scrolled window
We can just have a scrolled window, instead.
2019-05-28 22:35:36 +00:00
Matthias Clasen
a4b1ff7736 Forgotten file 2019-05-28 22:35:36 +00:00
Matthias Clasen
908632138c inspector: Show surface and renderer 2019-05-28 20:25:17 +00:00
Руслан Ижбулатов
90058ed951 Don't assume that gdk_surface[_move]_resize() is asynchronous
On Windows that call resizes the native window immediately,
and the corresponding GDK event is emitted and processed
before the control is returned to gtk_window_move_resize().
Therefore, update freeze and configure_request_count increment
must happen before the call, not after it.
2019-05-28 20:25:17 +00:00
Руслан Ижбулатов
82c80c06e8 Add missing include 2019-05-28 20:25:17 +00:00
Matthias Clasen
5ccb081fdb Avoid compiler warnings
Avoid priv being flagged as unused on win32.
2019-05-28 20:25:17 +00:00
Matthias Clasen
d08805d7f0 popover: Don't constantly redraw the beak
We don't want to constantly draw the arrow
if we don't have to. Save the render node
to achieve this.
2019-05-28 20:25:17 +00:00
Matthias Clasen
f154fd4c09 popover: Stop needles allocations
We were queuing an allocation whenever
the popover is flipped over, unnecessarily,
since we don't change the size of the surface.

This was showing up as popovers being invisible
when flipped over, under X.
2019-05-28 20:25:17 +00:00
Matthias Clasen
c638a0aa59 Adwaita: Remove Emoji completion special case
We can use GtkPopover::has-arrow now.
2019-05-28 20:25:16 +00:00
Matthias Clasen
db21cbdfb3 inspector: Avoid a critical warning 2019-05-28 20:25:16 +00:00
Matthias Clasen
ec413357c6 popover: Make it possible to not have an arrow
This will make popovers move flexible for other
uses, such as the Emoji completion popup.
2019-05-28 20:25:16 +00:00
Matthias Clasen
a841ff0316 popover: Set input shapes on wayland too
No reason not to do it. Wayland has input shapes.
2019-05-28 20:25:16 +00:00
Руслан Ижбулатов
83f952d771 IME IM: Be able to handle NULL widget correctly 2019-05-28 20:25:16 +00:00
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
Matthias Clasen
5de06f47cf widget: Use GtkNative 2019-05-28 20:24:39 +00:00
Matthias Clasen
9059eee2f0 Review and replace uses of get_toplevel
Now that roots can have parent widgets, we need to
carefully examine all calls of gtk_widget_get_toplevel,
and replace them with gtk_widget_get_root if we want
the nearest root, and not the ultimate end of the parent
chain.
2019-05-28 20:24:39 +00:00