[gtk: 7/16] wayland: Remove old "gdk-attached-grab-surface" hackery
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 7/16] wayland: Remove old "gdk-attached-grab-surface" hackery
- Date: Wed, 19 Feb 2020 18:58:38 +0000 (UTC)
commit 49fcbc27caa069c6f959f1ec2952016d1e3a876f
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Feb 10 09:56:18 2020 +0100
wayland: Remove old "gdk-attached-grab-surface" hackery
The corresponding code in gtk/ is long gone, so it's luckly unused these
days.
gdk/wayland/gdksurface-wayland.c | 37 +------------------------------------
1 file changed, 1 insertion(+), 36 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 55134b1409..20198e7494 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2297,7 +2297,6 @@ static GdkWaylandSeat *
find_grab_input_seat (GdkSurface *surface,
GdkSurface *transient_for)
{
- GdkSurface *attached_grab_surface;
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
GdkWaylandSurface *tmp_impl;
@@ -2308,20 +2307,6 @@ find_grab_input_seat (GdkSurface *surface,
if (impl->grab_input_seat)
return GDK_WAYLAND_SEAT (impl->grab_input_seat);
- /* HACK: GtkMenu grabs a special surface known as the "grab transfer surface"
- * and then transfers the grab over to the correct surface later. Look for
- * this surface when taking the grab to know it's correct.
- *
- * See: associate_menu_grab_transfer_surface in gtkmenu.c
- */
- attached_grab_surface = g_object_get_data (G_OBJECT (surface), "gdk-attached-grab-surface");
- if (attached_grab_surface)
- {
- tmp_impl = GDK_WAYLAND_SURFACE (attached_grab_surface);
- if (tmp_impl->grab_input_seat)
- return GDK_WAYLAND_SEAT (tmp_impl->grab_input_seat);
- }
-
while (transient_for)
{
tmp_impl = GDK_WAYLAND_SURFACE (transient_for);
@@ -2437,27 +2422,7 @@ gdk_wayland_surface_map (GdkSurface *surface)
{
GdkDevice *grab_device = NULL;
- /* The popup menu surface is not the grabbed surface. This may mean
- * that a "transfer surface" (see gtkmenu.c) is used, and we need
- * to find that surface to get the grab device. If so is the case
- * the "transfer surface" can be retrieved via the
- * "gdk-attached-grab-surface" associated data field.
- */
- if (!impl->grab_input_seat)
- {
- GdkSurface *attached_grab_surface =
- g_object_get_data (G_OBJECT (surface),
- "gdk-attached-grab-surface");
- if (attached_grab_surface)
- {
- GdkWaylandSurface *attached_impl =
- GDK_WAYLAND_SURFACE (attached_grab_surface);
- grab_device = gdk_seat_get_pointer (attached_impl->grab_input_seat);
- transient_for =
- gdk_device_get_surface_at_position (grab_device, NULL, NULL);
- }
- }
- else
+ if (impl->grab_input_seat)
{
grab_device = gdk_seat_get_pointer (impl->grab_input_seat);
transient_for =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]