From f1e49d930965dd780f6bc03481b3705a3878a838 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 19 Nov 2018 16:32:12 +0100 Subject: [PATCH] use new feature name xkbcommon_evdev -> xkbcommon The xkbcommon configure logic was refactored in qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. For more details see the relevant commit. Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a Reviewed-by: Johan Helsing --- src/plugins/platforms/wayland/client.pro | 4 ++-- .../shellintegration/wl-shell/wl-shell.pro | 4 ++-- .../xdg-shell-v5/xdg-shell-v5.pro | 4 ++-- .../xdg-shell-v6/xdg-shell-v6.pro | 4 ++-- .../shellintegration/xdg-shell/xdg-shell.pro | 4 ++-- .../platforms/wayland/qwaylandinputdevice.cpp | 22 +++++++++---------- .../platforms/wayland/qwaylandinputdevice_p.h | 10 ++++----- .../platforms/wayland/shared/qwaylandxkb.cpp | 10 ++++----- .../platforms/wayland/shared/qwaylandxkb_p.h | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index 45bbb976b4e..30f32dd7e18 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -15,8 +15,8 @@ use_gold_linker: CONFIG += no_linker_version_script CONFIG -= precompile_header CONFIG += link_pkgconfig wayland-scanner -qtConfig(xkbcommon-evdev): \ - QMAKE_USE_PRIVATE += xkbcommon_evdev +qtConfig(xkbcommon): \ + QMAKE_USE_PRIVATE += xkbcommon QMAKE_USE += wayland-client diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/wl-shell.pro b/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/wl-shell.pro index fbff63c712e..bb2c1829afe 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/wl-shell.pro +++ b/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/wl-shell.pro @@ -2,8 +2,8 @@ QT += gui-private waylandclient-private CONFIG += wayland-scanner QMAKE_USE += wayland-client -qtConfig(xkbcommon-evdev): \ - QMAKE_USE_PRIVATE += xkbcommon_evdev +qtConfig(xkbcommon): \ + QMAKE_USE_PRIVATE += xkbcommon WAYLANDCLIENTSOURCES += \ ../../../3rdparty/protocol/wayland.xml diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v5/xdg-shell-v5.pro b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v5/xdg-shell-v5.pro index bf9edba7842..4f6dde9bcf6 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v5/xdg-shell-v5.pro +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v5/xdg-shell-v5.pro @@ -3,8 +3,8 @@ CONFIG += wayland-scanner QMAKE_USE += wayland-client -qtConfig(xkbcommon-evdev): \ - QMAKE_USE += xkbcommon_evdev +qtConfig(xkbcommon): \ + QMAKE_USE += xkbcommon HEADERS += \ qwaylandxdgpopupv5_p.h \ diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v6/xdg-shell-v6.pro b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v6/xdg-shell-v6.pro index 5d5046f6066..3c1aaee818e 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v6/xdg-shell-v6.pro +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell-v6/xdg-shell-v6.pro @@ -2,8 +2,8 @@ QT += gui-private waylandclient-private CONFIG += wayland-scanner QMAKE_USE += wayland-client -qtConfig(xkbcommon-evdev): \ - QMAKE_USE_PRIVATE += xkbcommon_evdev +qtConfig(xkbcommon): \ + QMAKE_USE_PRIVATE += xkbcommon WAYLANDCLIENTSOURCES += \ ../../../3rdparty/protocol/xdg-shell-unstable-v6.xml diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/xdg-shell.pro b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/xdg-shell.pro index 2b1191af03a..261715845c8 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/xdg-shell.pro +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/xdg-shell.pro @@ -2,8 +2,8 @@ QT += gui-private waylandclient-private CONFIG += wayland-scanner QMAKE_USE += wayland-client -qtConfig(xkbcommon-evdev): \ - QMAKE_USE_PRIVATE += xkbcommon_evdev +qtConfig(xkbcommon): \ + QMAKE_USE_PRIVATE += xkbcommon WAYLANDCLIENTSOURCES += \ ../../../3rdparty/protocol/xdg-decoration-unstable-v1.xml \ diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 9d675ae21d7..ba55e6e1721 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -70,7 +70,7 @@ #include -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) #include #endif @@ -84,7 +84,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p) connect(&mRepeatTimer, SIGNAL(timeout()), this, SLOT(repeatKey())); } -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) bool QWaylandInputDevice::Keyboard::createDefaultKeyMap() { if (mXkbContext && mXkbMap && mXkbState) { @@ -156,7 +156,7 @@ void QWaylandInputDevice::Keyboard::releaseComposeState() QWaylandInputDevice::Keyboard::~Keyboard() { -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) releaseComposeState(); releaseKeyMap(); #endif @@ -344,7 +344,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const { Qt::KeyboardModifiers ret = Qt::NoModifier; -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) if (!mXkbState) return ret; @@ -625,7 +625,7 @@ void QWaylandInputDevice::Pointer::pointer_axis(uint32_t time, uint32_t axis, in void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd, uint32_t size) { -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { close(fd); return; @@ -728,7 +728,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, if (isDown) mParent->mQDisplay->setLastInputDevice(mParent, serial, window); -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) if (!createDefaultKeyMap()) { return; } @@ -771,7 +771,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, #endif if (state == WL_KEYBOARD_KEY_STATE_PRESSED -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) && xkb_keymap_key_repeats(mXkbMap, code) #endif ) { @@ -779,7 +779,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, mRepeatCode = code; mRepeatTime = time; mRepeatText = text; -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) mRepeatSym = sym; #endif mRepeatTimer.setInterval(400); @@ -793,7 +793,7 @@ void QWaylandInputDevice::Keyboard::repeatKey() { mRepeatTimer.setInterval(25); sendKey(mFocus->window(), mRepeatTime, QEvent::KeyRelease, mRepeatKey, modifiers(), mRepeatCode, -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) mRepeatSym, mNativeModifiers, #else 0, 0, @@ -801,7 +801,7 @@ void QWaylandInputDevice::Keyboard::repeatKey() mRepeatText, true); sendKey(mFocus->window(), mRepeatTime, QEvent::KeyPress, mRepeatKey, modifiers(), mRepeatCode, -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) mRepeatSym, mNativeModifiers, #else 0, 0, @@ -816,7 +816,7 @@ void QWaylandInputDevice::Keyboard::keyboard_modifiers(uint32_t serial, uint32_t group) { Q_UNUSED(serial); -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) if (mXkbState) xkb_state_update_mask(mXkbState, mods_depressed, mods_latched, mods_locked, diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h index 4b12cc089b2..7aa86539b49 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h @@ -65,7 +65,7 @@ #include -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) #include #include #endif @@ -77,7 +77,7 @@ struct wl_cursor_image; #endif -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) struct xkb_compose_state; struct xkb_compose_table; #endif @@ -209,7 +209,7 @@ public: QWaylandInputDevice *mParent = nullptr; QPointer mFocus; -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) xkb_context *mXkbContext = nullptr; xkb_keymap *mXkbMap = nullptr; xkb_state *mXkbState = nullptr; @@ -222,7 +222,7 @@ public: uint32_t mRepeatCode; uint32_t mRepeatTime; QString mRepeatText; -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) xkb_keysym_t mRepeatSym; #endif QTimer mRepeatTimer; @@ -233,7 +233,7 @@ private slots: void repeatKey(); private: -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) bool createDefaultKeyMap(); void releaseKeyMap(); void createComposeState(); diff --git a/src/plugins/platforms/wayland/shared/qwaylandxkb.cpp b/src/plugins/platforms/wayland/shared/qwaylandxkb.cpp index a0e388a1c9b..3cfc4b074e5 100644 --- a/src/plugins/platforms/wayland/shared/qwaylandxkb.cpp +++ b/src/plugins/platforms/wayland/shared/qwaylandxkb.cpp @@ -43,13 +43,13 @@ #include #include -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) #include #endif QT_BEGIN_NAMESPACE -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) static const uint32_t KeyTbl[] = { XKB_KEY_Escape, Qt::Key_Escape, XKB_KEY_Tab, Qt::Key_Tab, @@ -297,7 +297,7 @@ static xkb_keysym_t toKeysymFromTable(uint32_t key) std::pair QWaylandXkb::keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers &modifiers) { -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) QString text; uint utf32 = xkb_keysym_to_utf32(keysym); if (utf32) @@ -339,7 +339,7 @@ std::pair QWaylandXkb::keysymToQtKey(xkb_keysym_t keysym, Qt::Keyb Qt::KeyboardModifiers QWaylandXkb::modifiers(struct xkb_state *state) { -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) Qt::KeyboardModifiers modifiers = Qt::NoModifier; xkb_state_component cstate = static_cast(XKB_STATE_DEPRESSED | XKB_STATE_LATCHED | XKB_STATE_LOCKED); @@ -367,7 +367,7 @@ QEvent::Type QWaylandXkb::toQtEventType(uint32_t state) QVector QWaylandXkb::toKeysym(QKeyEvent *event) { -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) QVector keysyms; if (event->key() >= Qt::Key_F1 && event->key() <= Qt::Key_F35) { keysyms.append(XKB_KEY_F1 + (event->key() - Qt::Key_F1)); diff --git a/src/plugins/platforms/wayland/shared/qwaylandxkb_p.h b/src/plugins/platforms/wayland/shared/qwaylandxkb_p.h index 6fa1ea45b8e..4820d94bea6 100644 --- a/src/plugins/platforms/wayland/shared/qwaylandxkb_p.h +++ b/src/plugins/platforms/wayland/shared/qwaylandxkb_p.h @@ -45,7 +45,7 @@ #include #include -#if QT_CONFIG(xkbcommon_evdev) +#if QT_CONFIG(xkbcommon) #include #else typedef quint32 xkb_keysym_t;