aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/window.c3
-rw-r--r--src/window.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 729008b..52cd923 100644
--- a/src/window.c
+++ b/src/window.c
@@ -78,7 +78,7 @@ cherry_window_new(void)
window->base = cherry_widget_new();
window->title = NULL;
window->listener = NULL;
- window->base->draw = cherry_window_draw;
+ window->draw = cherry_window_draw;
int offset = 10;
int x, y, width, height;
@@ -168,6 +168,7 @@ cherry_window_set_visible(CherryWindow *w, int visible)
{
CherryApplication *app = cherry_application_get_running_app();
+ w->draw((CherryWidget *) w );
if (visible) {
XMapRaised(app->display, w->window_handler);
}
diff --git a/src/window.h b/src/window.h
index a24b237..b7a3081 100644
--- a/src/window.h
+++ b/src/window.h
@@ -15,6 +15,7 @@ typedef struct CherryWindow {
GC gc;
int (*listener)(struct CherryWindow *, CherryEvent);
+ void (*draw)(struct CherryWidget *);
} CherryWindow;
CherryWindow *cherry_window_new(void);