diff options
author | Ken Moore <ken@ixsystems.com> | 2017-02-01 16:13:52 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-02-01 16:13:52 -0500 |
commit | 014ce3d9363b15912a53cc8885358b0436b3bb27 (patch) | |
tree | 3fba59a0ffedadac98cb904db64c10ccc29417a0 /src-qt5/core/libLumina/LuminaX11.cpp | |
parent | Add a new "NativeWindow" class to the library. This is a pure Qt container cl... (diff) | |
download | lumina-014ce3d9363b15912a53cc8885358b0436b3bb27.tar.gz lumina-014ce3d9363b15912a53cc8885358b0436b3bb27.tar.bz2 lumina-014ce3d9363b15912a53cc8885358b0436b3bb27.zip |
Another large batch of work on Lumina2:
The NativeWindow intermediary seems to be working really well, now just to start adding the the various event detection parsing in to modify that object on-demand.
There is still a window focus issue too - the setActive routine is not properly setting that window to have focus yet - need to examine further.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaX11.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaX11.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaX11.cpp b/src-qt5/core/libLumina/LuminaX11.cpp index a8016460..c586790b 100644 --- a/src-qt5/core/libLumina/LuminaX11.cpp +++ b/src-qt5/core/libLumina/LuminaX11.cpp @@ -1609,7 +1609,20 @@ WId LXCB::WM_Get_Active_Window(){ } void LXCB::WM_Set_Active_Window(WId win){ - xcb_ewmh_set_active_window(&EWMH, QX11Info::appScreen(), win); + xcb_ewmh_set_active_window(&EWMH, QX11Info::appScreen(), win); + //Also send the active window a message to take input focus + xcb_client_message_event_t event; + event.response_type = XCB_CLIENT_MESSAGE; + event.format = 32; + event.window = win; //window to activate + event.type = ATOMS[atoms.indexOf("WM_PROTOCOLS")]; + event.data.data32[0] = ATOMS[atoms.indexOf("WM_TAKE_FOCUS")]; + event.data.data32[1] = QX11Info::getTimestamp(); //current timestamp + event.data.data32[2] = 0; + event.data.data32[3] = 0; + event.data.data32[4] = 0; + + xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); } // _NET_WORKAREA |