[gimp] Bug 754171 - cmd - missing modifier key to configure input controllers
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 754171 - cmd - missing modifier key to configure input controllers
- Date: Wed, 9 Sep 2015 10:12:28 +0000 (UTC)
commit fb92321d438071a3294154dcdf738995e705b4fa
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 9 12:11:43 2015 +0200
Bug 754171 - cmd - missing modifier key to configure input controllers
Need to call gdk_keymap_map_virtual_modifiers() on the parsed
modifiers in order to the the right ones on all platforms (OS X).
app/widgets/gimpcontrollerkeyboard.c | 5 ++++-
app/widgets/gimpcontrollerwheel.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpcontrollerkeyboard.c b/app/widgets/gimpcontrollerkeyboard.c
index 3277f2a..40b8ed4 100644
--- a/app/widgets/gimpcontrollerkeyboard.c
+++ b/app/widgets/gimpcontrollerkeyboard.c
@@ -21,6 +21,7 @@
#include "config.h"
#include <gegl.h>
+#undef GDK_MULTIHEAD_SAFE /* for gdk_keymap_get_default() */
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
@@ -190,7 +191,8 @@ gimp_controller_keyboard_init (GimpControllerKeyboard *keyboard)
if (! event_names_initialized)
{
- gint i;
+ GdkKeymap *keymap = gdk_keymap_get_default ();
+ gint i;
for (i = 0; i < G_N_ELEMENTS (keyboard_events); i++)
{
@@ -200,6 +202,7 @@ gimp_controller_keyboard_init (GimpControllerKeyboard *keyboard)
{
gtk_accelerator_parse (kevent->modifier_string, NULL,
&kevent->modifiers);
+ gdk_keymap_map_virtual_modifiers (keymap, &kevent->modifiers);
}
if (kevent->modifiers != 0)
diff --git a/app/widgets/gimpcontrollerwheel.c b/app/widgets/gimpcontrollerwheel.c
index b3f5ea1..fb9c126 100644
--- a/app/widgets/gimpcontrollerwheel.c
+++ b/app/widgets/gimpcontrollerwheel.c
@@ -21,6 +21,7 @@
#include "config.h"
#include <gegl.h>
+#undef GDK_MULTIHEAD_SAFE /* for gdk_keymap_get_default() */
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -189,7 +190,8 @@ gimp_controller_wheel_init (GimpControllerWheel *wheel)
if (! events_initialized)
{
- gint i;
+ GdkKeymap *keymap = gdk_keymap_get_default ();
+ gint i;
for (i = 0; i < G_N_ELEMENTS (wheel_events); i++)
{
@@ -199,6 +201,7 @@ gimp_controller_wheel_init (GimpControllerWheel *wheel)
{
gtk_accelerator_parse (wevent->modifier_string, NULL,
&wevent->modifiers);
+ gdk_keymap_map_virtual_modifiers (keymap, &wevent->modifiers);
}
if (wevent->modifiers != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]