libqt5-qtbase/xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
Dominique Leuenberger 7169baff88 Accepting request 286573 from KDE:Qt5
- Added patches from upstream:
  Fix-Meta-shortcuts-on-XCB.patch (qtbug#43572),
  Fix-detection-of-GCC5.patch,
  Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch
  (qtbug#43688), Fix-typo-in-Qt5CoreMacroscmake.patch,
  Make-sure-theres-a-scene-before-using-it.patch (qtbug#44509),
  Multi-screen-DPI-support-for-X11.patch (qtbug#43713),
  QSystemTrayIcon-handle-submenus-correctly.patch,
  Update-mouse-buttons-from-MotionNotify-events.patch
  (qtbug#32609, qtbug#35065, qtbug#43776, qtbug#44166, qtbug#44231),
  X11-devicePixelRatio-screen-mapping-fix.patch (qtbug#43713) and
  xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
  (qtcreatorbug#9589)

OBS-URL: https://build.opensuse.org/request/show/286573
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=37
2015-02-20 11:43:00 +00:00

30 lines
1.2 KiB
Diff

From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Fri, 12 Dec 2014 11:37:36 +0000
Subject: xcb: Don't return 0 from QXcbKeyboard::possibleKeys
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8a075c405709eab9c08ed4230d795ca45eabd5a7
---
xcb: Don't return 0 from QXcbKeyboard::possibleKeys
It's possible to get 0 for baseQtKey in case Caps Lock is used as
a layout switcher. So don't include this value in the result.
Similar fix was in commit d904533acba1267431ca2c5f0d3e85cc59a20a26.
Task-number: QTCREATORBUG-9589
Change-Id: I46fc91f9faf6fd0699f062a72fd2ca3187232f5a
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
---
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -957,7 +957,8 @@
QList<int> result;
int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode));
- result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
+ if (baseQtKey)
+ result += (baseQtKey + modifiers);
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt");