From 321e8b7fd33cd5669b08f6c6e6aeae5245852377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 30 Jul 2012 15:40:57 -0400 Subject: [PATCH] gears: Exit on ESC --- clients/simple-egl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index 0e703dfe..51f810fb 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -97,6 +97,8 @@ static const char *frag_shader_text = " gl_FragColor = v_color;\n" "}\n"; +static int running = 1; + static void init_egl(struct display *display, EGLint alpha_size) { @@ -477,6 +479,8 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, if (key == KEY_F11 && state) toggle_fullscreen(d->window, d->window->fullscreen ^ 1); + else if (key == KEY_ESC && state) + running = 0; } static void @@ -549,8 +553,6 @@ event_mask_update(uint32_t mask, void *data) return 0; } -static int running = 1; - static void signal_int(int signum) {