Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.0.2
-
None
-
Xlib-xcb
Description
INIT:
Add debug statement in the qxcbconnection.cpp:
case XCB_MAPPING_NOTIFY: qDebug() << "XCB_MAPPING_NOTIFY"; m_keyboard->handleMappingNotifyEvent((xcb_mapping_notify_event_t *)event); break;
1) Compile and run the provided example.
2) Add or remove any keyboard layout from system's keyboard layout settings.
EXPECTED:
Message XCB_MAPPING_NOTIFY in the output.
ACTUAL:
No XCB_MAPPING_NOTIFY message in the output.
class MainWindow : public QWidget { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); protected: }; MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { QVBoxLayout *layout = new QVBoxLayout(this); QPushButton *fiveButton = new QPushButton("5"); QTextEdit *edit = new QTextEdit; layout->addWidget(fiveButton); layout->addWidget(edit); fiveButton->setShortcut(QKeySequence(Qt::Key_5)); } int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
If we type something in the text field and then repeat the test case, then message XCB_MAPPING_NOTIFY appears in the output - as expected. So unless user triggers QXcbKeyboard::handleKeyEvent (which in turn calls XLookupString) Qt is not receiving mapping notify events which are stuck somewhere in the Xlib's event queue. Related bug report on freedesktop bug tracker https://bugs.freedesktop.org/show_bug.cgi?id=23202
Running test application under:
xtrace ./testapp | grep -i mapping
I can see that MappingNotify is deliver for both test cases, but for some reason Xlib holds it to itself..
Attachments
Issue Links
- depends on
-
QTBUG-73862 Bump minimal requred libxcb to 1.11 in Qt 5.13
- Closed
- relates to
-
QTBUG-37652 REG: Can't switch input language under Linux
- Closed
-
QTBUG-34005 Qt5 apps don't react to changing keyboard layouts under GNOME
- Closed
-
QTBUG-30939 Decide what to do with x11 extension switches in the ./configure file
- Closed