Commit 70aee2d9 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

display: cancel wayland client touches when the compositor is grabbed

When a compositor grab begins, clients will stop receiving events, so any
ongoing sequence at that time must be cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=733631
parent 63c75916
......@@ -74,7 +74,7 @@
#include "meta-window-group.h"
#include "meta-stage.h"
#include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */
#include "display-private.h" /* for meta_display_lookup_x_window() and meta_display_cancel_touch() */
#include "util-private.h"
#include "frame.h"
#include <X11/extensions/shape.h>
......@@ -365,7 +365,10 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
display->grab_window, display->grab_op);
if (meta_is_wayland_compositor ())
meta_display_sync_wayland_input_focus (display);
{
meta_display_sync_wayland_input_focus (display);
meta_display_cancel_touch (display);
}
return TRUE;
}
......
......@@ -454,4 +454,6 @@ gboolean meta_display_request_restart (MetaDisplay *display);
void meta_restart_init (void);
void meta_restart_finish (void);
void meta_display_cancel_touch (MetaDisplay *display);
#endif
......@@ -461,7 +461,7 @@ meta_set_gnome_wm_keybindings (const char *wm_keybindings)
gnome_wm_keybindings = wm_keybindings;
}
static void
void
meta_display_cancel_touch (MetaDisplay *display)
{
MetaWaylandCompositor *compositor;
......@@ -1869,7 +1869,10 @@ meta_display_begin_grab_op (MetaDisplay *display,
display->grab_anchor_window_pos = display->grab_initial_window_pos;
if (meta_is_wayland_compositor ())
meta_display_sync_wayland_input_focus (display);
{
meta_display_sync_wayland_input_focus (display);
meta_display_cancel_touch (display);
}
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
screen, display->grab_window, display->grab_op);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment