summaryrefslogtreecommitdiff
path: root/clients/wscreensaver.c
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2012-07-11 20:57:14 -0600
committerKristian Høgsberg <krh@bitplanet.net>2012-07-12 09:18:45 -0400
commita6e24d3104f299e35d3516b89c9af895ad824760 (patch)
tree5c03637901eb75b10ce3358bebfbae999c8e85b7 /clients/wscreensaver.c
parentcd717b56951d069e91d3f2048144a8f9e8238110 (diff)
wscreensaver: Fix --demo mode.
Diffstat (limited to 'clients/wscreensaver.c')
-rw-r--r--clients/wscreensaver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/clients/wscreensaver.c b/clients/wscreensaver.c
index 2b0ea465..f1461f8d 100644
--- a/clients/wscreensaver.c
+++ b/clients/wscreensaver.c
@@ -181,7 +181,11 @@ create_wscreensaver_instance(struct wscreensaver *screensaver,
if (!mi)
return NULL;
- mi->window = window_create_custom(screensaver->display);
+ if (demo_mode)
+ mi->window = window_create(screensaver->display);
+ else
+ mi->window = window_create_custom(screensaver->display);
+
if (!mi->window) {
fprintf(stderr, "%s: creating a window failed.\n", progname);
free(mi);
@@ -190,7 +194,7 @@ create_wscreensaver_instance(struct wscreensaver *screensaver,
window_set_title(mi->window, progname);
- if (screensaver->interface) {
+ if (screensaver->interface && !demo_mode) {
window_set_custom(mi->window);
mi->widget = window_add_widget(mi->window, mi);
screensaver_set_surface(screensaver->interface,