[gnome-settings-daemon] wacom: allow switching modes while OSD is active



commit 31db82440e1ab88064ad78d26549c6a4f8849553
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jan 9 11:07:18 2013 +0100

    wacom: allow switching modes while OSD is active
    
    so users can cycle through possible modes and select the
    desired mode while the OSD help window is active.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690548

 plugins/wacom/gsd-wacom-manager.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 011e4a8..de04130 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1263,15 +1263,16 @@ filter_button_events (XEvent          *xevent,
 	if (wbutton->type == WACOM_TABLET_BUTTON_TYPE_HARDCODED) {
 		int new_mode;
 
-		/* Update OSD window if shown */
-		if (osd_window_update_viewable (manager, wbutton, dir, xiev))
-			return GDK_FILTER_REMOVE;
-
 		/* We switch modes on key release */
-		if (xiev->evtype == XI_ButtonRelease)
+		if (xiev->evtype == XI_ButtonRelease) {
+			osd_window_update_viewable (manager, wbutton, dir, xiev);
 			return GDK_FILTER_REMOVE;
-
+                }
 		new_mode = gsd_wacom_device_set_next_mode (device, wbutton);
+                if (manager->priv->osd_window != NULL) {
+			gsd_wacom_osd_window_set_mode (GSD_WACOM_OSD_WINDOW(manager->priv->osd_window), wbutton->group_id, new_mode);
+			osd_window_update_viewable (manager, wbutton, dir, xiev);
+                }
 		set_led (device, wbutton, new_mode);
 		return GDK_FILTER_REMOVE;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]