summaryrefslogtreecommitdiff
path: root/clients/flower.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-31 11:53:20 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-31 11:53:20 -0500
commit8e054f76ccfe1ba43dd9e6d0968083f1d930cbb2 (patch)
treebd3b99f7ae83de187543c9071b2d6b5452d7ea6c /clients/flower.c
parentc25a1d73fca2fd9057e3fe1923f8515b92de9d4b (diff)
flower: Dont allow resizing
Diffstat (limited to 'clients/flower.c')
-rw-r--r--clients/flower.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clients/flower.c b/clients/flower.c
index 8b57626..ae70d58 100644
--- a/clients/flower.c
+++ b/clients/flower.c
@@ -106,6 +106,16 @@ draw_stuff(cairo_surface_t *surface, int width, int height)
}
static void
+resize_handler(struct widget *widget,
+ int32_t width, int32_t height, void *data)
+{
+ struct flower *flower = data;
+
+ /* Dont resize me */
+ widget_set_size(flower->widget, flower->width, flower->height);
+}
+
+static void
redraw_handler(struct widget *widget, void *data)
{
struct flower *flower = data;
@@ -173,6 +183,7 @@ int main(int argc, char *argv[])
flower.window = window_create(d, flower.width, flower.height);
flower.widget = window_add_widget(flower.window, &flower);
+ widget_set_resize_handler(flower.widget, resize_handler);
widget_set_redraw_handler(flower.widget, redraw_handler);
widget_set_motion_handler(flower.widget, motion_handler);
widget_set_button_handler(flower.widget, button_handler);