summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <conselvan2@gmail.com>2012-06-26 17:09:11 +0300
committerKristian Høgsberg <krh@bitplanet.net>2012-06-26 10:21:23 -0400
commit57e0ce1d2afd1c5c335f43f38a348ddbcbefdcf1 (patch)
treef5fea518184053cfccd6c59167f4db1a3a8a5cf7
parente28fd7d5e0175ebda27d05a24a1201722722b6f7 (diff)
simple-egl: Make window moveable
-rw-r--r--clients/simple-egl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 25c7bdfa..0091172f 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -28,6 +28,8 @@
#include <assert.h>
#include <signal.h>
+#include <linux/input.h>
+
#include <wayland-client.h>
#include <wayland-egl.h>
@@ -380,6 +382,11 @@ pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
uint32_t serial, uint32_t time, uint32_t button,
uint32_t state)
{
+ struct display *display = data;
+
+ if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED)
+ wl_shell_surface_move(display->window->shell_surface,
+ display->seat, serial);
}
static void