[gtk+/composite-templates] Be more strict in ignoring ineffective modifiers
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] Be more strict in ignoring ineffective modifiers
- Date: Fri, 14 Sep 2012 21:29:10 +0000 (UTC)
commit c0a5814358642b12dc3e4c09c3a6b0f80c672527
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Sep 9 18:28:48 2012 -0400
Be more strict in ignoring ineffective modifiers
After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
gdk/x11/gdkkeys-x11.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 9d06cba..4dba9d4 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -1113,7 +1113,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
int found = 0;
for (i=0,entry=type->map;i<type->map_count;i++,entry++) {
- if (!entry->active)
+ if (!entry->active || syms[col+entry->level] == syms[col])
continue;
if (mods_rtrn) {
int bits = 0;
@@ -1130,7 +1130,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
* and F10 anymore). And don't add modifiers that are
* explicitly marked as preserved, either.
*/
- if ((bits == 1 && syms[col+entry->level] != syms[col]) ||
+ if (bits == 1 ||
(mods&type->mods.mask) == entry->mods.mask)
{
if (type->preserve)
@@ -1140,7 +1140,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
}
}
- if (!found&&((mods&type->mods.mask)==entry->mods.mask)) {
+ if (!found && ((mods&type->mods.mask) == entry->mods.mask)) {
col+= entry->level;
if (type->preserve)
preserve= type->preserve[i].mask;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]