diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index ba5b9b5..491e2b7 100644 --- a/src/window.c +++ b/src/window.c @@ -180,11 +180,16 @@ cherry_window_set_position(CherryWindow *window, int x, int y) void cherry_window_set_visible(CherryWindow *window, int visible) { - CherryApplication *app = cherry_application_get_running_app(); + CherryWidget *widget = (CherryWidget *) window; + cherry_widget_set_visible(widget, visible); + + if (widget->drawn == 0) { + window->draw((CherryWidget *) window); - window->draw((CherryWidget *) window); - if (visible) { - XMapRaised(app->display, window->window_handler); + if (visible) { + CherryApplication *app = cherry_application_get_running_app(); + XMapRaised(app->display, window->window_handler); + } } } |