[gtk/issue-67] Disable GdkSurface.minimize on Wayland



commit 1ec4cb7f17111420bc125049031c267ef7291945
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Nov 16 20:04:00 2019 +0000

    Disable GdkSurface.minimize on Wayland
    
    The existing xdg-shell protocols do not support minimization in a way
    that allows us to implement the GdkSurface API; the only minimization
    operation does not come with a state notification, nor it comes with
    a way to undo itself.
    
    Closes: #67

 gdk/wayland/gdksurface-wayland.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index e29039df75..c24091c607 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -3275,9 +3275,6 @@ gdk_wayland_surface_set_icon_name (GdkSurface  *surface,
 static void
 gdk_wayland_surface_minimize (GdkSurface *surface)
 {
-  GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
-  GdkWaylandDisplay *display_wayland;
-
   if (GDK_SURFACE_DESTROYED (surface) ||
       !SURFACE_IS_TOPLEVEL (surface))
     return;
@@ -3285,6 +3282,14 @@ gdk_wayland_surface_minimize (GdkSurface *surface)
   if (!is_realized_toplevel (surface))
     return;
 
+#if 0
+  GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
+  GdkWaylandDisplay *display_wayland;
+
+  /* We cannot use set_minimized() because it does not come with a
+   * minimized state that we can query or get notified of. This means
+   * we cannot implement the full GdkSurface API
+   */
   display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
   switch (display_wayland->shell_variant)
     {
@@ -3297,6 +3302,7 @@ gdk_wayland_surface_minimize (GdkSurface *surface)
     default:
       g_assert_not_reached ();
     }
+#endif
 }
 
 static void
@@ -3306,15 +3312,16 @@ gdk_wayland_surface_unminimize (GdkSurface *surface)
       !SURFACE_IS_TOPLEVEL (surface))
     return;
 
+#if 0
   if (GDK_SURFACE_IS_MAPPED (surface))
     {
       gdk_surface_show (surface);
     }
   else
     {
-      /* Flip our client side flag, the real work happens on map. */
       gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_MINIMIZED, 0);
     }
+#endif
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]