[gtk/matthiasc/surface-state-rework: 68/80] x11/surface: Remember when there is a pending ConfigureNotify




commit 7dc4f6031f22df7132ddf651aa57ce12a67d1618
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Sat Dec 5 11:02:58 2020 +0100

    x11/surface: Remember when there is a pending ConfigureNotify
    
    This will be used to decide whether to try to resize windows when .

 gdk/x11/gdkdisplay-x11.c | 1 +
 gdk/x11/gdksurface-x11.c | 1 +
 gdk/x11/gdksurface-x11.h | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 73529906c5..31b06ea53f 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -964,6 +964,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
               surface_impl->next_layout.configured_width = configured_width;
               surface_impl->next_layout.configured_height = configured_height;
               surface_impl->next_layout.surface_geometry_dirty = TRUE;
+              surface_impl->next_layout.configure_pending = TRUE;
               gdk_surface_request_layout (surface);
             }
 
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 5e0fc557d8..0348e9b85b 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -341,6 +341,7 @@ gdk_x11_surface_compute_size (GdkSurface *surface)
       _gdk_x11_surface_update_size (impl);
 
       impl->next_layout.surface_geometry_dirty = FALSE;
+      impl->next_layout.configure_pending = FALSE;
     }
   else
     {
diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h
index 6fd7122ba0..994d125036 100644
--- a/gdk/x11/gdksurface-x11.h
+++ b/gdk/x11/gdksurface-x11.h
@@ -75,6 +75,7 @@ struct _GdkX11Surface
   struct {
     int configured_width;
     int configured_height;
+    gboolean configure_pending;
     gboolean surface_geometry_dirty;
   } next_layout;
 


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