Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37901937
en ru br
ALT Linux repositórios
S:4.18.0-alt1
5.0: 4.6.1-alt2
4.1: 4.4.3-alt0.M41.1
4.0: 4.4.2-alt0.M40
3.0: 4.2.2-alt1

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


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;
     }
 }
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009