[gtk/wip/matthiasc/popup4: 40/110] wayland: Stop using child surface apis
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 40/110] wayland: Stop using child surface apis
- Date: Tue, 23 Apr 2019 19:04:20 +0000 (UTC)
commit 80c1ed8de010b948432d3326a67e31f949341ab7
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 23 00:14:46 2019 -0400
wayland: Stop using child surface apis
We no longer have child surfaces.
Drop code that only makes sense in their
presence.
gdk/wayland/gdkdevice-wayland.c | 4 ++--
gdk/wayland/gdksurface-wayland.c | 26 ++------------------------
2 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index b98abcfff8..78f01d5f1e 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -731,7 +731,7 @@ device_maybe_emit_grab_crossing (GdkDevice *device,
guint32 time)
{
GdkSurface *native = gdk_wayland_device_get_focus (device);
- GdkSurface *focus = gdk_surface_get_toplevel (window);
+ GdkSurface *focus = window;
if (focus != native)
device_emit_grab_crossing (device, focus, window, GDK_CROSSING_GRAB, time);
@@ -4630,7 +4630,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
GdkSurface *native;
GList *l;
- native = gdk_surface_get_toplevel (surface);
+ native = surface;
if (native == NULL || GDK_SURFACE_DESTROYED (native))
return GDK_GRAB_NOT_VIEWABLE;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 89ae48c72d..094da79fc6 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -519,7 +519,6 @@ gdk_wayland_surface_update_scale (GdkSurface *surface)
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
guint32 scale;
GSList *l;
- GList *children, *c;
if (display_wayland->compositor_version < WL_SURFACE_HAS_BUFFER_SCALE)
{
@@ -536,14 +535,6 @@ gdk_wayland_surface_update_scale (GdkSurface *surface)
/* Notify app that scale changed */
gdk_wayland_surface_maybe_configure (surface, surface->width, surface->height, scale);
-
- children = gdk_surface_get_children (surface);
- for (c = children; c; c = c->next)
- {
- GdkSurface *child = c->data;
- gdk_wayland_surface_update_scale (child);
- }
- g_list_free (children);
}
static void gdk_wayland_surface_create_surface (GdkSurface *surface);
@@ -1707,19 +1698,6 @@ get_real_parent_and_translate (GdkSurface *surface,
GdkSurfaceImplWayland *impl = GDK_SURFACE_IMPL_WAYLAND (surface->impl);
GdkSurface *parent = impl->transient_for;
- while (parent)
- {
- GdkSurface *effective_parent = gdk_surface_get_parent (parent);
-
- if (gdk_surface_has_native (parent) && !effective_parent)
- break;
-
- *x += parent->x;
- *y += parent->y;
-
- parent = effective_parent;
- }
-
return parent;
}
@@ -2457,7 +2435,7 @@ gdk_wayland_surface_map (GdkSurface *surface)
}
if (transient_for)
- transient_for = get_popup_parent (gdk_surface_get_toplevel (transient_for));
+ transient_for = get_popup_parent (transient_for);
/* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab.
@@ -2473,7 +2451,7 @@ gdk_wayland_surface_map (GdkSurface *surface)
}
else
{
- transient_for = gdk_surface_get_toplevel (impl->transient_for);
+ transient_for = impl->transient_for;
transient_for = get_popup_parent (transient_for);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]