summaryrefslogtreecommitdiff
path: root/clients/gears.c
diff options
context:
space:
mode:
authorOlivier Blin <olivier.blin@softathome.com>2012-07-25 14:33:42 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-07-25 16:21:13 -0400
commitfa820efaf01f9c743dc11a04fd85bcb68ef038dc (patch)
tree2f4ee3201afc01080fb66d13639799c71b018a39 /clients/gears.c
parentea40bf88bce04fb212cc946d8e006d2731a5d944 (diff)
gears: add fullscreen support
Diffstat (limited to 'clients/gears.c')
-rw-r--r--clients/gears.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clients/gears.c b/clients/gears.c
index 166e6a4e..70ec86c4 100644
--- a/clients/gears.c
+++ b/clients/gears.c
@@ -58,6 +58,7 @@ struct gears {
int last_x, last_y;
GLint gear_list[3];
+ int fullscreen;
};
struct gear_template {
@@ -353,6 +354,15 @@ keyboard_focus_handler(struct window *window,
window_schedule_redraw(window);
}
+static void
+fullscreen_handler(struct window *window, void *data)
+{
+ struct gears *gears = data;
+
+ gears->fullscreen ^= 1;
+ window_set_fullscreen(window, gears->fullscreen);
+}
+
static struct gears *
gears_create(struct display *display)
{
@@ -418,6 +428,7 @@ gears_create(struct display *display)
widget_set_motion_handler(gears->widget, motion_handler);
window_set_keyboard_focus_handler(gears->window,
keyboard_focus_handler);
+ window_set_fullscreen_handler(gears->window, fullscreen_handler);
window_schedule_resize(gears->window, width, height);