From e7d2688990388a99baaccb01c61889ca479340a6 Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 25 Jul 2015 23:10:04 +0200 Subject: coco: Add handle configure event --- src/themes/coco/coco-theme.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c index 171588d..5d374ea 100644 --- a/src/themes/coco/coco-theme.c +++ b/src/themes/coco/coco-theme.c @@ -276,6 +276,16 @@ countdown_expose_cb(GtkWidget *pie, return TRUE; } +static gboolean on_configure_event (GtkWidget* widget, GdkEventConfigure* event, WindowData* windata) +{ + windata->width = event->width; + windata->height = event->height; + + gtk_widget_queue_draw (widget); + + return FALSE; +} + static void action_clicked_cb(GtkWidget *w, GdkEventButton *event, ActionInvokedCb action_cb) @@ -396,6 +406,8 @@ create_notification(UrlClickedCb url_clicked) G_CALLBACK(paint_window), windata); #endif + g_signal_connect (G_OBJECT (win), "configure-event", G_CALLBACK (on_configure_event), windata); + padding = gtk_alignment_new(0, 0, 0, 0); gtk_widget_show(padding); gtk_box_pack_start(GTK_BOX(main_vbox), padding, FALSE, FALSE, 0); -- cgit v1.2.1