[gnome-settings-daemon] cursor: Only enable the OSK when touch is used



commit 2c5e3f8ac3803a19de49d09d1c028b75f7b048d2
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 29 11:39:08 2013 +0100

    cursor: Only enable the OSK when touch is used
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692771

 plugins/cursor/gsd-cursor-manager.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/cursor/gsd-cursor-manager.c b/plugins/cursor/gsd-cursor-manager.c
index 611392b..b0b888f 100644
--- a/plugins/cursor/gsd-cursor-manager.c
+++ b/plugins/cursor/gsd-cursor-manager.c
@@ -56,6 +56,7 @@ struct GsdCursorManagerPrivate
         guint changed_id;
         gboolean cursor_shown;
         GHashTable *monitors;
+        GSettings *osk_settings;
 };
 
 static void     gsd_cursor_manager_class_init  (GsdCursorManagerClass *klass);
@@ -122,6 +123,8 @@ set_cursor_visibility (GsdCursorManager *manager,
                            visible ? "show" : "hide");
         }
 
+        g_settings_set_boolean (manager->priv->osk_settings, "screen-keyboard-enabled", !visible);
+
         manager->priv->cursor_shown = visible;
 }
 
@@ -336,6 +339,7 @@ gsd_cursor_manager_init (GsdCursorManager *manager)
                                                          g_direct_equal,
                                                          NULL,
                                                          g_object_unref);
+        manager->priv->osk_settings = g_settings_new ("org.gnome.desktop.a11y.applications");
 }
 
 static void
@@ -349,6 +353,7 @@ gsd_cursor_manager_finalize (GObject *object)
         cursor_manager = GSD_CURSOR_MANAGER (object);
 
         g_clear_pointer (&cursor_manager->priv->monitors, g_hash_table_destroy);
+        g_clear_object (&cursor_manager->priv->osk_settings);
 
         G_OBJECT_CLASS (gsd_cursor_manager_parent_class)->finalize (object);
 }



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