summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-09-17 18:02:43 -0400
committerKristian Høgsberg <krh@redhat.com>2009-09-17 18:02:43 -0400
commit446fccc722fbf05af9a37344337a9cb634ffdb32 (patch)
treeb201eb0c0b38c40f121acda37789e32b1f8f931d
parent3d4b76fc5e0c0ebde31173973d3efa6c0a1010fa (diff)
Fix a couple of window move bugs
-rw-r--r--src/wayland.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/wayland.c b/src/wayland.c
index feee7052..e15fd17d 100644
--- a/src/wayland.c
+++ b/src/wayland.c
@@ -261,6 +261,7 @@ static void
handle_motion(void *data, struct wl_input_device *input_device,
int32_t x, int32_t y, int32_t sx, int32_t sy)
{
+ ScreenPtr pScreen;
struct xwl_window *window;
struct xwl_input_device *d = data;
int32_t dx, dy;
@@ -282,11 +283,9 @@ handle_motion(void *data, struct wl_input_device *input_device,
window->x = d->grab_x + x;
window->y = d->grab_y + y;
-#if 0
- /* Hmm... */
- window->window->drawable.x = window->x;
- window->window->drawable.y = window->y;
-#endif
+ pScreen = window->window->drawable.pScreen;
+ (*pScreen->MoveWindow)(window->window,
+ window->x, window->y, NullWindow, VTMove);
wl_surface_map(d->focus_window->surface,
window->x,
@@ -366,7 +365,18 @@ handle_keyboard_focus(void *data,
struct wl_surface *surface,
struct wl_array *keys)
{
- /* FIXME: Restore X modifiers here. */
+ struct xwl_input_device *d = data;
+ uint32_t *k, *end;
+
+ end = (uint32_t *) ((char *) keys->data + keys->size);
+ for (k = keys->data; k < end; k++) {
+ switch (*k) {
+ case KEY_LEFTALT:
+ case KEY_RIGHTALT:
+ d->alt = 1;
+ break;
+ }
+ }
}
static const struct wl_input_device_listener input_device_listener = {