[mutter] window: Move meta_window_wayland_new to window-wayland.c
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Move meta_window_wayland_new to window-wayland.c
- Date: Tue, 20 May 2014 20:04:21 +0000 (UTC)
commit 1a3aa75385e061a5cce9d4232840a9ccb2d46488
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue May 20 09:08:11 2014 -0400
window: Move meta_window_wayland_new to window-wayland.c
src/core/window.c | 56 -----------------------------------------
src/wayland/window-wayland.c | 57 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 56 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 0e2427a..79853f5 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1215,62 +1215,6 @@ _meta_window_shared_new (MetaDisplay *display,
return window;
}
-MetaWindow *
-meta_window_wayland_new (MetaDisplay *display,
- MetaWaylandSurface *surface)
-{
- XWindowAttributes attrs;
- MetaScreen *scr = display->screen;
- MetaWindow *window;
-
- attrs.x = 0;
- attrs.y = 0;
- attrs.width = 1;
- attrs.height = 1;
- attrs.border_width = 0;
- attrs.depth = 24;
- attrs.visual = NULL;
- attrs.root = scr->xroot;
- attrs.class = InputOutput;
- attrs.bit_gravity = NorthWestGravity;
- attrs.win_gravity = NorthWestGravity;
- attrs.backing_store = 0;
- attrs.backing_planes = ~0;
- attrs.backing_pixel = 0;
- attrs.save_under = 0;
- attrs.colormap = 0;
- attrs.map_installed = 1;
- attrs.map_state = IsUnmapped;
- attrs.all_event_masks = ~0;
- attrs.your_event_mask = 0;
- attrs.do_not_propagate_mask = 0;
- attrs.override_redirect = 0;
- attrs.screen = scr->xscreen;
-
- /* XXX: Note: In the Wayland case we currently still trap X errors while
- * creating a MetaWindow because we will still be making various redundant
- * X requests (passing a window xid of None) until we thoroughly audit all
- * the code to make sure it knows about non X based clients...
- */
- meta_error_trap_push (display); /* Push a trap over all of window
- * creation, to reduce XSync() calls
- */
-
- window = _meta_window_shared_new (display,
- scr,
- META_WINDOW_CLIENT_TYPE_WAYLAND,
- surface,
- None,
- WithdrawnState,
- META_COMP_EFFECT_CREATE,
- &attrs);
- window->can_ping = TRUE;
-
- meta_error_trap_pop (display); /* pop the XSync()-reducing trap */
-
- return window;
-}
-
static gboolean
detach_foreach_func (MetaWindow *window,
void *data)
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index dd6eed9..132addb 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -26,6 +26,7 @@
#include "window-wayland.h"
+#include <meta/errors.h>
#include "window-private.h"
#include "boxes-private.h"
#include "stack-tracker.h"
@@ -259,6 +260,62 @@ meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
window_class->move_resize_internal = meta_window_wayland_move_resize_internal;
}
+MetaWindow *
+meta_window_wayland_new (MetaDisplay *display,
+ MetaWaylandSurface *surface)
+{
+ XWindowAttributes attrs;
+ MetaScreen *scr = display->screen;
+ MetaWindow *window;
+
+ attrs.x = 0;
+ attrs.y = 0;
+ attrs.width = 1;
+ attrs.height = 1;
+ attrs.border_width = 0;
+ attrs.depth = 24;
+ attrs.visual = NULL;
+ attrs.root = scr->xroot;
+ attrs.class = InputOutput;
+ attrs.bit_gravity = NorthWestGravity;
+ attrs.win_gravity = NorthWestGravity;
+ attrs.backing_store = 0;
+ attrs.backing_planes = ~0;
+ attrs.backing_pixel = 0;
+ attrs.save_under = 0;
+ attrs.colormap = 0;
+ attrs.map_installed = 1;
+ attrs.map_state = IsUnmapped;
+ attrs.all_event_masks = ~0;
+ attrs.your_event_mask = 0;
+ attrs.do_not_propagate_mask = 0;
+ attrs.override_redirect = 0;
+ attrs.screen = scr->xscreen;
+
+ /* XXX: Note: In the Wayland case we currently still trap X errors while
+ * creating a MetaWindow because we will still be making various redundant
+ * X requests (passing a window xid of None) until we thoroughly audit all
+ * the code to make sure it knows about non X based clients...
+ */
+ meta_error_trap_push (display); /* Push a trap over all of window
+ * creation, to reduce XSync() calls
+ */
+
+ window = _meta_window_shared_new (display,
+ scr,
+ META_WINDOW_CLIENT_TYPE_WAYLAND,
+ surface,
+ None,
+ WithdrawnState,
+ META_COMP_EFFECT_CREATE,
+ &attrs);
+ window->can_ping = TRUE;
+
+ meta_error_trap_pop (display); /* pop the XSync()-reducing trap */
+
+ return window;
+}
+
/**
* meta_window_move_resize_wayland:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]