libqt5-qtbase/0005-Translate-Super-Hyper-keys-to-MetaModifier.patch
Stephan Kulow 154cc92f96 Accepting request 238711 from KDE:Qt5
- Update to 5.3.1
  * Bugfix release, for more details please see:
    http://blog.qt.digia.com/blog/2014/06/25/qt-5-3-1-released/
- Drop libqt5-fix-the-modal-dialogs-can-go-behind.patch, merged upstream
- Added patches from upstream:
  0001-Do-not-overwrite-existing-event-mask-of-root-window.patch -- QTBUG-39648
  0002-Properly-check-which-OpenGL-features-are-supported.patch -- QTBUG-39730
  0003-Fix-data-race-on-QLoggingCategory-when-using-qDebug-.patch -- Fix data race on QLoggingCategory
  0004-QDBus-fix-data-race-on-isDebugging-bool.patch -- fix data race on isDebugging bool
  0005-Translate-Super-Hyper-keys-to-MetaModifier.patch -- QTBUG-38428

OBS-URL: https://build.opensuse.org/request/show/238711
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=22
2014-06-30 19:44:19 +00:00

45 lines
1.6 KiB
Diff

From 51d6df1d18322c630f79567ed22de3718436d78d Mon Sep 17 00:00:00 2001
From: Gatis Paeglis <gatis.paeglis@digia.com>
Date: Tue, 17 Jun 2014 11:41:23 +0200
Subject: [PATCH 1/1] Translate Super/Hyper keys to MetaModifier
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is how it was done in Qt4. If users are interested
in an actual X11 keysym they can use QKeyEvent::nativeVirtualKey().
Change-Id: I710664e48c5db1633a357aa0a5d238f3453103ab
Task-number: QTBUG-38428
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sebastian Kügler <sebas@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
---
src/plugins/platforms/xcb/qxcbkeyboard.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 69601f4..4c84b19 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -929,6 +929,15 @@ int QXcbKeyboard::keysymToQtKey(xcb_keysym_t key) const
i += 2;
}
+ if (rmod_masks.meta) {
+ // translate Super/Hyper keys to Meta if we're using them as the MetaModifier
+ if (rmod_masks.meta == rmod_masks.super && (code == Qt::Key_Super_L || code == Qt::Key_Super_R)) {
+ code = Qt::Key_Meta;
+ } else if (rmod_masks.meta == rmod_masks.hyper && (code == Qt::Key_Hyper_L || code == Qt::Key_Hyper_R)) {
+ code = Qt::Key_Meta;
+ }
+ }
+
return code;
}
--
1.9.3