summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-18 18:38:53 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-18 18:38:53 +0100
commit82a4703fea93ca792542a8d45d72bd1db49bb6e4 (patch)
tree69d1363161cfbdf8e7f2a3e74b7ef4222f443022
parenta01677289c0a2d0ada32b254762bc2c15fa660ad (diff)
Do not grab display widget
We used to gtk_grab_add() after mouse grab to limit the mouse events to the display. But it isn't necessary if the display has its own window, since gdk_pointer_grab() will be limited to it. Note the widget has the keyboard focus & is focused, so this doesn't affect keyboard events. However, this allows application to keep global accelerators functionning if they want to (like virt-viewer with custom key bindings).
-rw-r--r--gtk/spice-widget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index fb40d1a..850fd5b 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -364,6 +364,7 @@ static void spice_display_init(SpiceDisplay *display)
GDK_KEY_PRESS_MASK);
gtk_widget_set_double_buffered(widget, false);
gtk_widget_set_can_focus(widget, true);
+ gtk_widget_set_has_window(widget, true);
d->keycode_map = vnc_display_keymap_gdk2xtkbd_table(&d->keycode_maplen);
d->grabseq = spice_grab_sequence_new_from_string("Control_L+Alt_L");
@@ -610,7 +611,6 @@ static GdkGrabStatus do_pointer_grab(SpiceDisplay *display)
ClipCursor(&client_rect);
}
#endif
- gtk_grab_add(GTK_WIDGET(display));
#ifdef GDK_WINDOWING_X11
if (status == GDK_GRAB_SUCCESS) {