summaryrefslogtreecommitdiff
path: root/plugins/media-keys/msd-media-keys-manager.c
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-09-29 15:44:57 +0800
committerraveit65 <[email protected]>2018-10-01 11:05:15 +0200
commit193f3fbc64a1690f2d4392833b9591832bc29377 (patch)
tree1d9e3f8f3ba563c75ba42b64b482c505c3cc0e5a /plugins/media-keys/msd-media-keys-manager.c
parentb761b23f64644122db4a3a57a831e7183e17b340 (diff)
downloadmate-settings-daemon-193f3fbc64a1690f2d4392833b9591832bc29377.tar.bz2
mate-settings-daemon-193f3fbc64a1690f2d4392833b9591832bc29377.tar.xz
media-keys: Add support for XF86TouchpadOn/Off
Using hard-coded keys. This requires new keycodes added to X.org in: https://bugs.freedesktop.org/show_bug.cgi?id=31300 Signed-off-by: Zhang Xianwei <[email protected]>
Diffstat (limited to 'plugins/media-keys/msd-media-keys-manager.c')
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
index 3a7a4e6..fbca896 100644
--- a/plugins/media-keys/msd-media-keys-manager.c
+++ b/plugins/media-keys/msd-media-keys-manager.c
@@ -586,6 +586,15 @@ do_eject_action (MsdMediaKeysManager *manager)
}
static void
+do_touchpad_osd_action (MsdMediaKeysManager *manager, gboolean state)
+{
+ dialog_init (manager);
+ msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog),
+ state ? "touchpad-enabled" : "touchpad-disabled",
+ FALSE);
+ dialog_show (manager);
+}
+static void
do_touchpad_action (MsdMediaKeysManager *manager)
{
GSettings *settings = g_settings_new (TOUCHPAD_SCHEMA);
@@ -930,6 +939,12 @@ do_action (MsdMediaKeysManager *manager,
case TOUCHPAD_KEY:
do_touchpad_action (manager);
break;
+ case TOUCHPAD_ON_KEY:
+ do_touchpad_osd_action(manager, TRUE);
+ break;
+ case TOUCHPAD_OFF_KEY:
+ do_touchpad_osd_action(manager, FALSE);
+ break;
case MUTE_KEY:
case VOLUME_DOWN_KEY:
case VOLUME_UP_KEY: