[gtk/matthiasc/surface-state-rework: 2/80] wayland/popup: Use maybe_notify_mapped() helper
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/surface-state-rework: 2/80] wayland/popup: Use maybe_notify_mapped() helper
- Date: Sat, 5 Dec 2020 17:42:37 +0000 (UTC)
commit bc95e2012e2cd3f78855a33c84a7f3c72752232d
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Nov 19 10:43:22 2020 +0100
wayland/popup: Use maybe_notify_mapped() helper
gdk/wayland/gdksurface-wayland.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 2f227dcd3f..c992ff4214 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2948,6 +2948,19 @@ is_relayout_finished (GdkSurface *surface)
return TRUE;
}
+static void
+maybe_notify_mapped (GdkSurface *surface)
+{
+ if (surface->destroyed)
+ return;
+
+ if (!GDK_SURFACE_IS_MAPPED (surface))
+ {
+ gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
+ gdk_surface_invalidate_rect (surface, NULL);
+ }
+}
+
static void
gdk_wayland_surface_map_popup (GdkSurface *surface,
int width,
@@ -2983,7 +2996,7 @@ gdk_wayland_surface_map_popup (GdkSurface *surface,
impl->popup.unconstrained_height = height;
impl->mapped = TRUE;
- gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
+ maybe_notify_mapped (surface);
}
static void
@@ -4736,19 +4749,6 @@ gdk_wayland_toplevel_class_init (GdkWaylandToplevelClass *class)
gdk_toplevel_install_properties (object_class, 1);
}
-static void
-maybe_notify_mapped (GdkSurface *surface)
-{
- if (surface->destroyed)
- return;
-
- if (!GDK_SURFACE_IS_MAPPED (surface))
- {
- gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
- gdk_surface_invalidate_rect (surface, NULL);
- }
-}
-
static void
reconfigure_callback (void *data,
struct wl_callback *callback,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]