[mutter] window: Move get_toplevel_xwindow to window-x11



commit 3c0fae74f168da927c02a989ece5a0080b1b0b69
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jun 16 18:25:40 2014 -0400

    window: Move get_toplevel_xwindow to window-x11

 src/compositor/meta-surface-actor-x11.c |    7 ++++---
 src/core/keybindings.c                  |    5 +++--
 src/core/window-private.h               |    2 --
 src/core/window.c                       |    6 ------
 src/x11/window-x11.c                    |    6 ++++++
 src/x11/window-x11.h                    |    2 ++
 6 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor-x11.c b/src/compositor/meta-surface-actor-x11.c
index f6c9fb1..78004f5 100644
--- a/src/compositor/meta-surface-actor-x11.c
+++ b/src/compositor/meta-surface-actor-x11.c
@@ -34,6 +34,7 @@
 #include "window-private.h"
 #include "meta-shaped-texture-private.h"
 #include "meta-cullable.h"
+#include "x11/window-x11.h"
 
 struct _MetaSurfaceActorX11Private
 {
@@ -143,7 +144,7 @@ update_pixmap (MetaSurfaceActorX11 *self)
   if (priv->pixmap == None)
     {
       Pixmap new_pixmap;
-      Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
+      Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
 
       meta_error_trap_push (display);
       new_pixmap = XCompositeNameWindowPixmap (xdisplay, xwindow);
@@ -312,7 +313,7 @@ sync_unredirected (MetaSurfaceActorX11 *self)
   MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
   MetaDisplay *display = priv->display;
   Display *xdisplay = meta_display_get_xdisplay (display);
-  Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
+  Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
 
   meta_error_trap_push (display);
 
@@ -404,7 +405,7 @@ create_damage (MetaSurfaceActorX11 *self)
 {
   MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
   Display *xdisplay = meta_display_get_xdisplay (priv->display);
-  Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
+  Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
 
   priv->damage = XDamageCreate (xdisplay, xwindow, XDamageReportBoundingBox);
 }
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 09625df..f1414a5 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -57,6 +57,7 @@
 
 #include "wayland/meta-wayland.h"
 #include "backends/x11/meta-backend-x11.h"
+#include "x11/window-x11.h"
 
 #ifdef HAVE_NATIVE_BACKEND
 #include "backends/native/meta-backend-native.h"
@@ -1223,7 +1224,7 @@ meta_window_grab_keys (MetaWindow  *window)
     }
 
   meta_window_change_keygrabs (window,
-                               meta_window_get_toplevel_xwindow (window),
+                               meta_window_x11_get_toplevel_xwindow (window),
                                TRUE);
 
   window->keys_grabbed = TRUE;
@@ -1437,7 +1438,7 @@ meta_window_grab_all_keys (MetaWindow  *window,
               window->desc);
   meta_window_focus (window, timestamp);
 
-  grabwindow = meta_window_get_toplevel_xwindow (window);
+  grabwindow = meta_window_x11_get_toplevel_xwindow (window);
 
   meta_topic (META_DEBUG_KEYBINDINGS,
               "Grabbing all keys on window %s\n", window->desc);
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 4aa8da9..267f163 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -668,8 +668,6 @@ gboolean meta_window_handle_ungrabbed_event (MetaWindow         *window,
 void meta_window_set_surface_mapped (MetaWindow *window,
                                      gboolean    surface_mapped);
 
-Window meta_window_get_toplevel_xwindow (MetaWindow *window);
-
 void meta_window_get_client_area_rect (const MetaWindow      *window,
                                        cairo_rectangle_int_t *rect);
 void meta_window_get_titlebar_rect (MetaWindow    *window,
diff --git a/src/core/window.c b/src/core/window.c
index cce2b46..4461cab 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7950,12 +7950,6 @@ meta_window_set_surface_mapped (MetaWindow *window,
   meta_window_queue (window, META_QUEUE_CALC_SHOWING);
 }
 
-Window
-meta_window_get_toplevel_xwindow (MetaWindow *window)
-{
-  return window->frame ? window->frame->xwindow : window->xwindow;
-}
-
 void
 meta_window_set_custom_frame_extents (MetaWindow *window,
                                       GtkBorder  *extents)
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index f3189ba..ca91dab 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -3484,3 +3484,9 @@ meta_window_x11_update_sync_request_counter (MetaWindow *window,
     meta_compositor_queue_frame_drawn (window->display->compositor, window,
                                        no_delay_frame);
 }
+
+Window
+meta_window_x11_get_toplevel_xwindow (MetaWindow *window)
+{
+  return window->frame ? window->frame->xwindow : window->xwindow;
+}
diff --git a/src/x11/window-x11.h b/src/x11/window-x11.h
index fc15ff7..cceb56e 100644
--- a/src/x11/window-x11.h
+++ b/src/x11/window-x11.h
@@ -73,4 +73,6 @@ gboolean meta_window_x11_client_message          (MetaWindow *window,
 void     meta_window_x11_configure_notify        (MetaWindow      *window,
                                                   XConfigureEvent *event);
 
+Window   meta_window_x11_get_toplevel_xwindow    (MetaWindow *window);
+
 #endif


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