From a306a2691a0d02769238580a7b933cae506eaa61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Br=C3=BCschweiler?= Date: Tue, 14 Aug 2012 11:02:40 +0200 Subject: [PATCH] eventdemo: fix --no-border This was broken by commit 29af3ebce676b3cdd516dedc0cbedc47f70ce425 --- clients/eventdemo.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/clients/eventdemo.c b/clients/eventdemo.c index 5556a754..49e4399f 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);