diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-12-08 15:00:53 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-12-09 14:01:02 +0100 |
commit | 8f2890d20f83f854ab219979399e68ba0acfe030 (patch) | |
tree | 794636312ca20725d831476b5186fe4249518e1a | |
parent | 670a4008304d7df7b4cff2194150febec4442f54 (diff) | |
download | spice-gtk-8f2890d20f83f854ab219979399e68ba0acfe030.tar.gz spice-gtk-8f2890d20f83f854ab219979399e68ba0acfe030.tar.xz spice-gtk-8f2890d20f83f854ab219979399e68ba0acfe030.zip |
Ignore the first mouse click when taking the grab
-rw-r--r-- | gtk/spice-widget.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index 4f55a27..63e8c02 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -1141,12 +1141,16 @@ static gboolean button_event(GtkWidget *widget, GdkEventButton *button) } gtk_widget_grab_focus(widget); - if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) - try_mouse_grab(display); - else /* allow to drag and drop between windows/displays: - FIXME: should be multiple widget grab, but how? - or should now the position of the other widgets?.. - */ + if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) { + if (!d->mouse_grab_active) { + try_mouse_grab(display); + return true; + } + } else + /* allow to drag and drop between windows/displays: + FIXME: should be multiple widget grab, but how? + or should now the position of the other widgets?.. + */ gdk_pointer_ungrab(GDK_CURRENT_TIME); if (!d->inputs) |