[PATCH 2/4] eventdemo: fix --no-border

Philipp Brüschweiler blei42 at gmail.com
Tue Aug 14 02:02:40 PDT 2012


This was broken by commit 29af3ebce676b3cdd516dedc0cbedc47f70ce425
---
 clients/eventdemo.c | 18 ++++++++++--------
 1 Datei geändert, 10 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)

diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index 5556a75..49e4399 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -274,8 +274,16 @@ eventdemo_create(struct display *d)
 		return NULL;
 
 	e->window = window_create(d);
-	e->widget = frame_create(e->window, e);
-	window_set_title(e->window, title);
+
+	if (noborder) {
+		/* Demonstrate how to create a borderless window.
+		 * Move windows with META + left mouse button.
+		 */
+		e->widget = window_add_widget(e->window, e);
+	} else {
+		e->widget = frame_create(e->window, e);
+		window_set_title(e->window, title);
+	}
 	e->display = d;
 
 	/* The eventdemo window draws a red rectangle as a demonstration
@@ -309,12 +317,6 @@ eventdemo_create(struct display *d)
 	/* Set the callback motion handler for the window */
 	widget_set_motion_handler(e->widget, motion_handler);
 
-	/* Demonstrate how to create a borderless window.
-	   Move windows with META + left mouse button.
-	 */
-	if (noborder) {
-	}
-
 	/* Initial drawing of the window */
 	window_schedule_resize(e->window, width, height);
 
-- 
1.7.11.4



More information about the wayland-devel mailing list