diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-01-15 22:04:17 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-01-15 22:07:05 +0100 |
commit | 8c6e1441795cfcbcd5778cf2006afeac187e3b22 (patch) | |
tree | 45c809e6b48f3d0cd5d93c310a94767442a1a055 | |
parent | cc6aace26ce9f8dcfc6e406335c82c05a73e7d5a (diff) |
Send grab-key signal even in mouse client mode
-rw-r--r-- | gtk/spice-widget.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index a3ca4fc..86001be 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -941,13 +941,16 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key) __FUNCTION__, key->type == GDK_KEY_PRESS ? "press" : "release", key->hardware_keycode, key->state, key->group); - if (check_for_grab_key(display, key->type, key->keyval) && - d->mouse_mode == SPICE_MOUSE_MODE_SERVER) { + if (check_for_grab_key(display, key->type, key->keyval)) { g_signal_emit(widget, signals[SPICE_DISPLAY_GRAB_KEY_PRESSED], 0); - if (d->mouse_grab_active) - try_mouse_ungrab(display); - else - try_mouse_grab(display); + + if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) { + if (d->mouse_grab_active) + try_mouse_ungrab(display); + else + try_mouse_grab(display); + } + return true; } |