xcb: Fix windows opened from keyboard are not active on Marco or Xfwm4
Windows opened from keyboard (e.g. keyboard shortcut) are not active on Marco or Xfwm4. These windows are under the window which received the key event. This patch fixes the problem by updating XCB timestamp on every key press like Qt4 does. Task-number: QTBUG-49567 Change-Id: I9ea483784ac361d0b645d0f11f643868b367ac2c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
39c0d16a8e
commit
436ad32f9f
@ -1086,8 +1086,12 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
|
||||
case XCB_FOCUS_OUT:
|
||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_focus_out_event_t, event, handleFocusOutEvent);
|
||||
case XCB_KEY_PRESS:
|
||||
m_keyboard->updateXKBStateFromCore(((xcb_key_press_event_t *)event)->state);
|
||||
{
|
||||
xcb_key_press_event_t *kp = (xcb_key_press_event_t *)event;
|
||||
m_keyboard->updateXKBStateFromCore(kp->state);
|
||||
setTime(kp->time);
|
||||
HANDLE_KEYBOARD_EVENT(xcb_key_press_event_t, handleKeyPressEvent);
|
||||
}
|
||||
case XCB_KEY_RELEASE:
|
||||
m_keyboard->updateXKBStateFromCore(((xcb_key_release_event_t *)event)->state);
|
||||
HANDLE_KEYBOARD_EVENT(xcb_key_release_event_t, handleKeyReleaseEvent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user