summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-05-27 18:42:00 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2015-09-18 14:55:00 +0200
commit44f250a7e8eb86d3f41da5d186d839e7a14648a3 (patch)
tree78053ca3da51425f764a17213eadbcc7b44fab41 /hw/xwayland
parentb7cd48f71d269101e28ae6855b895057378715f9 (diff)
xwayland: Remove related touchpoints when unrealizing windows
These sequences are forgotten to all purposes. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-input.c14
-rw-r--r--hw/xwayland/xwayland.c6
-rw-r--r--hw/xwayland/xwayland.h2
3 files changed, 19 insertions, 3 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index ef38e6af9..d26a7863a 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -845,6 +845,20 @@ DDXRingBell(int volume, int pitch, int duration)
}
void
+xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window)
+{
+ struct xwl_touch *xwl_touch, *next_xwl_touch;
+
+ xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
+ &xwl_seat->touches, link_touch) {
+ if (xwl_touch->window->window == window) {
+ xorg_list_del(&xwl_touch->link_touch);
+ free(xwl_touch);
+ }
+ }
+}
+
+void
InitInput(int argc, char *argv[])
{
ScreenPtr pScreen = screenInfo.screens[0];
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index bc92beb38..f25bc006b 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -287,10 +287,10 @@ xwl_unrealize_window(WindowPtr window)
xwl_screen = xwl_screen_get(screen);
xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
- if (!xwl_seat->focus_window)
- continue;
- if (xwl_seat->focus_window->window == window)
+ if (xwl_seat->focus_window && xwl_seat->focus_window->window == window)
xwl_seat->focus_window = NULL;
+
+ xwl_seat_clear_touch(xwl_seat, window);
}
screen->UnrealizeWindow = xwl_screen->UnrealizeWindow;
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 857650edc..53ca420cf 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -159,6 +159,8 @@ void xwl_seat_set_cursor(struct xwl_seat *xwl_seat);
void xwl_seat_destroy(struct xwl_seat *xwl_seat);
+void xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window);
+
Bool xwl_screen_init_output(struct xwl_screen *xwl_screen);
struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,