[metacity] compositor: add meta_compositor_sync_screen_size



commit 9bfe070c0d01799c95f5c5230a358be66f131ed3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Mar 16 17:38:00 2017 +0200

    compositor: add meta_compositor_sync_screen_size

 src/compositor/meta-compositor-none.c    |    6 ++++++
 src/compositor/meta-compositor-private.h |    2 ++
 src/compositor/meta-compositor-vulkan.c  |    6 ++++++
 src/compositor/meta-compositor-xrender.c |    6 ++++++
 src/compositor/meta-compositor.c         |   10 ++++++++++
 src/core/screen.c                        |    2 ++
 src/include/meta-compositor.h            |    2 ++
 7 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c
index eea9396..9964cc0 100644
--- a/src/compositor/meta-compositor-none.c
+++ b/src/compositor/meta-compositor-none.c
@@ -105,6 +105,11 @@ meta_compositor_none_unmaximize_window (MetaCompositor *compositor,
 }
 
 static void
+meta_compositor_none_sync_screen_size (MetaCompositor *compositor)
+{
+}
+
+static void
 meta_compositor_none_sync_stack (MetaCompositor *compositor,
                                  GList          *stack)
 {
@@ -129,6 +134,7 @@ meta_compositor_none_class_init (MetaCompositorNoneClass *none_class)
   compositor_class->get_window_surface = meta_compositor_none_get_window_surface;
   compositor_class->maximize_window = meta_compositor_none_maximize_window;
   compositor_class->unmaximize_window = meta_compositor_none_unmaximize_window;
+  compositor_class->sync_screen_size = meta_compositor_none_sync_screen_size;
   compositor_class->sync_stack = meta_compositor_none_sync_stack;
 }
 
diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h
index 8f4cb09..614a122 100644
--- a/src/compositor/meta-compositor-private.h
+++ b/src/compositor/meta-compositor-private.h
@@ -67,6 +67,8 @@ struct _MetaCompositorClass
   void              (* unmaximize_window)      (MetaCompositor     *compositor,
                                                 MetaWindow         *window);
 
+  void              (* sync_screen_size)       (MetaCompositor     *compositor);
+
   void              (* sync_stack)             (MetaCompositor     *compositor,
                                                 GList              *stack);
 };
diff --git a/src/compositor/meta-compositor-vulkan.c b/src/compositor/meta-compositor-vulkan.c
index 9ec831a..ef1545e 100644
--- a/src/compositor/meta-compositor-vulkan.c
+++ b/src/compositor/meta-compositor-vulkan.c
@@ -879,6 +879,11 @@ meta_compositor_vulkan_unmaximize_window (MetaCompositor *compositor,
 }
 
 static void
+meta_compositor_vulkan_sync_screen_size (MetaCompositor *compositor)
+{
+}
+
+static void
 meta_compositor_vulkan_sync_stack (MetaCompositor *compositor,
                                    GList          *stack)
 {
@@ -907,6 +912,7 @@ meta_compositor_vulkan_class_init (MetaCompositorVulkanClass *vulkan_class)
   compositor_class->get_window_surface = meta_compositor_vulkan_get_window_surface;
   compositor_class->maximize_window = meta_compositor_vulkan_maximize_window;
   compositor_class->unmaximize_window = meta_compositor_vulkan_unmaximize_window;
+  compositor_class->sync_screen_size = meta_compositor_vulkan_sync_screen_size;
   compositor_class->sync_stack = meta_compositor_vulkan_sync_stack;
 }
 
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 88935aa..463edc5 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -3003,6 +3003,11 @@ meta_compositor_xrender_unmaximize_window (MetaCompositor *compositor,
 }
 
 static void
+meta_compositor_xrender_sync_screen_size (MetaCompositor *compositor)
+{
+}
+
+static void
 meta_compositor_xrender_sync_stack (MetaCompositor *compositor,
                                     GList          *stack)
 {
@@ -3068,6 +3073,7 @@ meta_compositor_xrender_class_init (MetaCompositorXRenderClass *xrender_class)
   compositor_class->get_window_surface = meta_compositor_xrender_get_window_surface;
   compositor_class->maximize_window = meta_compositor_xrender_maximize_window;
   compositor_class->unmaximize_window = meta_compositor_xrender_unmaximize_window;
+  compositor_class->sync_screen_size = meta_compositor_xrender_sync_screen_size;
   compositor_class->sync_stack = meta_compositor_xrender_sync_stack;
 }
 
diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c
index 789ac3b..4b5a9d4 100644
--- a/src/compositor/meta-compositor.c
+++ b/src/compositor/meta-compositor.c
@@ -417,6 +417,16 @@ meta_compositor_unmaximize_window (MetaCompositor *compositor,
 }
 
 void
+meta_compositor_sync_screen_size (MetaCompositor *compositor)
+{
+  MetaCompositorClass *compositor_class;
+
+  compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
+
+  compositor_class->sync_screen_size (compositor);
+}
+
+void
 meta_compositor_sync_stack (MetaCompositor *compositor,
                             GList          *stack)
 {
diff --git a/src/core/screen.c b/src/core/screen.c
index 9f4c193..911046d 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -2293,6 +2293,8 @@ meta_screen_resize (MetaScreen *screen,
   reload_xinerama_infos (screen);
   set_desktop_geometry_hint (screen);
 
+  meta_compositor_sync_screen_size (screen->display->compositor);
+
   /* Queue a resize on all the windows */
   meta_screen_foreach_window (screen, meta_screen_resize_func, 0);
 }
diff --git a/src/include/meta-compositor.h b/src/include/meta-compositor.h
index aa7ea0a..2d5cab6 100644
--- a/src/include/meta-compositor.h
+++ b/src/include/meta-compositor.h
@@ -87,6 +87,8 @@ void             meta_compositor_maximize_window        (MetaCompositor     *com
 void             meta_compositor_unmaximize_window      (MetaCompositor     *compositor,
                                                          MetaWindow         *window);
 
+void             meta_compositor_sync_screen_size       (MetaCompositor     *compositor);
+
 void             meta_compositor_sync_stack             (MetaCompositor     *compositor,
                                                          GList              *stack);
 


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