]> Dogcows Code - chaz/openbox/blobdiff - obt/keyboard.c
add application opacity configuration
[chaz/openbox] / obt / keyboard.c
index 5b80fd8af52dab485564b4021451908c8cc4a4a9..ef2678b529f15a8ab9811e798a8ceb06621d0d7f 100644 (file)
@@ -147,7 +147,6 @@ void xim_init(void)
     if (g_ascii_islower(aclass[0]))
         aclass[0] = g_ascii_toupper(aclass[0]);
 
-    g_print("Opening Input Method for %s %s\n", aname, aclass);
     xim = XOpenIM(obt_display, NULL, aname, aclass);
 
     if (!xim)
@@ -209,9 +208,9 @@ ObtModkeysKey obt_keyboard_keyevent_to_modkey(XEvent *e)
     case XK_Super_L:
     case XK_Super_R: return OBT_KEYBOARD_MODKEY_SUPER;
     case XK_Hyper_L:
-    case XK_Hyper_R: return OBT_KEYBOARD_MODKEY_SUPER;
+    case XK_Hyper_R: return OBT_KEYBOARD_MODKEY_HYPER;
     case XK_Meta_L:
-    case XK_Meta_R: return OBT_KEYBOARD_MODKEY_SUPER;
+    case XK_Meta_R: return OBT_KEYBOARD_MODKEY_META;
     case XK_Control_L:
     case XK_Control_R: return OBT_KEYBOARD_MODKEY_CONTROL;
     case XK_Shift_L:
@@ -390,12 +389,11 @@ gunichar obt_keyboard_keypress_to_unichar(ObtIC *ic, XEvent *ev)
 KeySym obt_keyboard_keypress_to_keysym(XEvent *ev)
 {
     KeySym sym;
-    gint r;
 
     g_return_val_if_fail(ev->type == KeyPress, None);
 
     sym = None;
-    r = XLookupString(&ev->xkey, NULL, 0, &sym, NULL);
+    XLookupString(&ev->xkey, NULL, 0, &sym, NULL);
     return sym;
 }
 
@@ -440,7 +438,8 @@ void obt_keyboard_context_unref(ObtIC *ic)
 {
     if (--ic->ref < 1) {
         xic_all = g_slist_remove(xic_all, ic);
-        XDestroyIC(ic->xic);
+        if (ic->xic)
+            XDestroyIC(ic->xic);
         g_slice_free(ObtIC, ic);
     }
 }
This page took 0.021045 seconds and 4 git commands to generate.