[gtk+/wip/garnacho/gdkseat: 14/21] GtkButton: Use gdk_seat_grab()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/garnacho/gdkseat: 14/21] GtkButton: Use gdk_seat_grab()
- Date: Fri, 27 Nov 2015 12:53:49 +0000 (UTC)
commit a6afc83b6d836fe40589fb76df42985874ddf783
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Nov 26 19:54:01 2015 +0100
GtkButton: Use gdk_seat_grab()
gtk/gtkbutton.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 315a11b..88856c6 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -2081,11 +2081,10 @@ gtk_real_button_activate (GtkButton *button)
*/
if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
{
- if (gdk_device_grab (device, priv->event_window,
- GDK_OWNERSHIP_WINDOW, TRUE,
- GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
- NULL, time) == GDK_GRAB_SUCCESS)
- {
+ if (gdk_seat_grab (gdk_device_get_seat (device), priv->event_window,
+ GDK_SEAT_CAPABILITY_KEYBOARD, TRUE,
+ NULL, NULL, NULL, NULL) == GDK_GRAB_SUCCESS)
+ {
gtk_device_grab_add (widget, device, TRUE);
priv->grab_keyboard = device;
priv->grab_time = time;
@@ -2113,7 +2112,7 @@ gtk_button_finish_activate (GtkButton *button,
if (priv->grab_keyboard)
{
- gdk_device_ungrab (priv->grab_keyboard, priv->grab_time);
+ gdk_seat_ungrab (gdk_device_get_seat (priv->grab_keyboard));
gtk_device_grab_remove (widget, priv->grab_keyboard);
priv->grab_keyboard = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]