[PATCH 5/6 xserver] xwayland: make more explicit root window creation path

Tiago Vignatti tiago.vignatti at intel.com
Tue Apr 3 06:58:03 PDT 2012


Just moving code around. No functional changes.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 hw/xfree86/xwayland/xwayland-window.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
index 0f2a26f..101ef01 100644
--- a/hw/xfree86/xwayland/xwayland-window.c
+++ b/hw/xfree86/xwayland/xwayland-window.c
@@ -105,21 +105,21 @@ xwl_create_window(WindowPtr window)
     xwl_screen->CreateWindow = screen->CreateWindow;
     screen->CreateWindow = xwl_create_window;
 
-    if (window->parent != NULL)
-	return ret;
-
-    len = snprintf(buffer, sizeof buffer, "_NET_WM_CM_S%d", screen->myNum);
-    name = MakeAtom(buffer, len, TRUE);
-    rc = AddSelection(&selection, name, serverClient);
-    if (rc != Success)
-	return ret;
-
-    selection->lastTimeChanged = currentTime;
-    selection->window = window->drawable.id;
-    selection->pWin = window;
-    selection->client = serverClient;
-
-    CompositeRedirectSubwindows(window, CompositeRedirectManual);
+    /* InitRootWindow path */
+    if (window->parent == NULL) {
+	len = snprintf(buffer, sizeof buffer, "_NET_WM_CM_S%d", screen->myNum);
+	name = MakeAtom(buffer, len, TRUE);
+	rc = AddSelection(&selection, name, serverClient);
+	if (rc != Success)
+	    return ret;
+
+	selection->lastTimeChanged = currentTime;
+	selection->window = window->drawable.id;
+	selection->pWin = window;
+	selection->client = serverClient;
+
+	CompositeRedirectSubwindows(window, CompositeRedirectManual);
+    }
 
     return ret;
 }
-- 
1.7.5.4



More information about the wayland-devel mailing list