[mutter/wip/carlosg/frames-client: 1000/1005] x11: Add intermediate helper function to update X11 window after sync




commit d2f94883ef1f15c831192243b3861f42f81139e3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Sep 9 13:10:30 2022 +0200

    x11: Add intermediate helper function to update X11 window after sync
    
    This function will be added some more logic in future commits.

 src/x11/meta-sync-counter.c  | 15 +++------------
 src/x11/window-x11-private.h |  2 ++
 src/x11/window-x11.c         | 10 ++++++++++
 3 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/src/x11/meta-sync-counter.c b/src/x11/meta-sync-counter.c
index 6368b49266..33693e4f7a 100644
--- a/src/x11/meta-sync-counter.c
+++ b/src/x11/meta-sync-counter.c
@@ -24,6 +24,7 @@
 #include "core/window-private.h"
 #include "meta/meta-x11-errors.h"
 #include "x11/meta-x11-display-private.h"
+#include "x11/window-x11-private.h"
 
 void
 meta_sync_counter_init (MetaSyncCounter *sync_counter,
@@ -186,13 +187,7 @@ sync_request_timeout (gpointer data)
 
   if (window == window->display->grab_window &&
       meta_grab_op_is_resizing (window->display->grab_op))
-    {
-      meta_window_update_resize (window,
-                                 window->display->grab_last_edge_resistance_flags,
-                                 window->display->grab_latest_motion_x,
-                                 window->display->grab_latest_motion_y,
-                                 TRUE);
-    }
+    meta_window_x11_check_update_resize (window);
 
   return G_SOURCE_REMOVE;
 }
@@ -297,11 +292,7 @@ meta_sync_counter_update (MetaSyncCounter *sync_counter,
 
           /* This means we are ready for another configure;
            * no pointer round trip here, to keep in sync */
-          meta_window_update_resize (window,
-                                     window->display->grab_last_edge_resistance_flags,
-                                     window->display->grab_latest_motion_x,
-                                     window->display->grab_latest_motion_y,
-                                     TRUE);
+          meta_window_x11_check_update_resize (window);
         }
     }
 
diff --git a/src/x11/window-x11-private.h b/src/x11/window-x11-private.h
index 973fc083b8..2c8af9f08c 100644
--- a/src/x11/window-x11-private.h
+++ b/src/x11/window-x11-private.h
@@ -95,6 +95,8 @@ void meta_window_x11_queue_update_icon (MetaWindowX11 *window_x11);
 
 void meta_window_x11_initialize_state (MetaWindow *window);
 
+void meta_window_x11_check_update_resize (MetaWindow *window);
+
 G_END_DECLS
 
 #endif
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 30c8688e96..045775302e 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -4155,3 +4155,13 @@ meta_window_x11_is_awaiting_sync_response (MetaWindow *window)
 
   return meta_sync_counter_is_waiting_response (&priv->sync_counter);
 }
+
+void
+meta_window_x11_check_update_resize (MetaWindow *window)
+{
+  meta_window_update_resize (window,
+                             window->display->grab_last_edge_resistance_flags,
+                             window->display->grab_latest_motion_x,
+                             window->display->grab_latest_motion_y,
+                             TRUE);
+}


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