[mutter/wip/carlosg/accelerators-on-correct-device] core: Use source device on ::accelerator-activated
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/accelerators-on-correct-device] core: Use source device on ::accelerator-activated
- Date: Mon, 8 Jul 2019 14:27:54 +0000 (UTC)
commit 32592145222eda51bbca105f8b2b081ac70bc3f6
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jul 8 16:23:26 2019 +0200
core: Use source device on ::accelerator-activated
Using the master device, as we did, won't yield the expected result when
looking up the device node (it comes NULL as this is a virtual device).
Use the slave device, as the g-s-d machinery essentially expects.
src/core/display.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 1d06863eb..4f56673b9 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2621,8 +2621,10 @@ meta_display_accelerator_activate (MetaDisplay *display,
guint action,
ClutterKeyEvent *event)
{
- g_signal_emit (display, display_signals[ACCELERATOR_ACTIVATED],
- 0, action, event->device, event->time);
+ g_signal_emit (display, display_signals[ACCELERATOR_ACTIVATED], 0,
+ action,
+ clutter_event_get_source_device ((ClutterEvent *) event),
+ event->time);
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]