ALT Linux repositórios
Group :: Desktop gráfico/XFce
RPM: xfwm4
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: 01_keysym_svn_backport.patch
Download
Download
diff -Nur xfwm4-4.4.0/mcs-plugin/xfwm4_shortcuteditor.c xfwm4-4.4.0.new/mcs-plugin/xfwm4_shortcuteditor.c
--- xfwm4-4.4.0/mcs-plugin/xfwm4_shortcuteditor.c 2007-01-20 19:20:22.000000000 +0100
+++ xfwm4-4.4.0.new/mcs-plugin/xfwm4_shortcuteditor.c 2007-02-24 18:47:50.000000000 +0100
@@ -757,6 +757,12 @@
g_free (accelerator);
g_strfreev (shortcuts);
+ /* Use keycode if unknown keysym */
+ if (!strlen (shortcut_string))
+ {
+ g_snprintf (shortcut_string, sizeof (shortcut_string), "0x%X", (guint) event->hardware_keycode);
+ }
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (itf->treeview3));
/* Apply change */
diff -Nur xfwm4-4.4.0/src/keyboard.c xfwm4-4.4.0.new/src/keyboard.c
--- xfwm4-4.4.0/src/keyboard.c 2007-01-20 19:20:18.000000000 +0100
+++ xfwm4-4.4.0.new/src/keyboard.c 2007-02-24 18:46:45.000000000 +0100
@@ -38,6 +38,29 @@
unsigned int SuperMask;
unsigned int HyperMask;
+static gboolean
+getKeycode (Display *dpy, const char *str, KeyCode *keycode)
+{
+unsigned int value;
+KeySym keysym;
+
+keysym = XStringToKeysym (str);
+if (keysym == NoSymbol)
+{
+if (sscanf (str, "0x%X", (unsigned int *) &value) != 1)
+{
+*keycode = 0;
+return FALSE;
+}
+*keycode = (KeyCode) value;
+}
+else
+{
+*keycode = XKeysymToKeycode (dpy, keysym);
+}
+return TRUE;
+}
+
int
getModifierMap (char *str)
{
@@ -120,12 +143,12 @@
if (k)
{
/* There is a modifier */
- key->keycode = XKeysymToKeycode (dpy, XStringToKeysym (++k));
+ getKeycode (dpy, ++k, &key->keycode);
key->modifier = getModifierMap (str);
}
else
{
- key->keycode = XKeysymToKeycode (dpy, XStringToKeysym (str));
+ getKeycode (dpy, str, &key->keycode);
key->modifier = 0;
}
}