diff options
author | Ken Moore <ken@ixsystems.com> | 2017-01-26 15:09:22 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-01-26 15:09:22 -0500 |
commit | a74bf353f08f45f8f5fb91573d67ad463a25ad4d (patch) | |
tree | ba9a0f906666d7e593740bebe9776e2c03407e86 /src-qt5/core/lumina-desktop-unified/src-events | |
parent | Finish up the new RootWindow class, and tie it into the lumina-desktop-unifie... (diff) | |
download | lumina-a74bf353f08f45f8f5fb91573d67ad463a25ad4d.tar.gz lumina-a74bf353f08f45f8f5fb91573d67ad463a25ad4d.tar.bz2 lumina-a74bf353f08f45f8f5fb91573d67ad463a25ad4d.zip |
Another large batch of work on the new unified desktop.
1) Get the RootWindow up and functional.
2) Get the lumina-desktop-unified binary functional for starting to test the various pieces (not ready yet for general use)
3) Get the start-lumina-desktop binary setup to launch the new unified binary for testing if the "--unified" flag is used.
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-events')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp | 24 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h | 1 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp index e04ee924..ced2cadb 100644 --- a/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp @@ -22,7 +22,7 @@ #define SYSTEM_TRAY_CANCEL_MESSAGE 2 -#define DEBUG 1 +#define DEBUG 0 // Also keep the root window/screen around for use in the filters namespace L_XCB{ @@ -64,6 +64,10 @@ void EventFilter::stop(){ QList<WId> EventFilter::currentTrayApps(){ return static_cast<XCBEventFilter*>(EF)->trayApps(); } +// === PUBLIC SLOTS === +void EventFilter::RegisterVirtualRoot(WId id){ + XCB->WM_Set_Virtual_Roots( QList<WId>() << id ); +} //============================= // XCBEventFilter Class @@ -121,19 +125,19 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag //============================== case XCB_KEY_PRESS: //This is a keyboard key press - //qDebug() << "Key Press Event"; + qDebug() << "Key Press Event"; obj->emit NewInputEvent(); stopevent = BlockInputEvent( ((xcb_key_press_event_t *) ev)->root ); //use the main "root" window - not the child widget break; case XCB_KEY_RELEASE: //This is a keyboard key release - //qDebug() << "Key Release Event"; + qDebug() << "Key Release Event"; obj->emit NewInputEvent(); stopevent = BlockInputEvent( ((xcb_key_release_event_t *) ev)->root ); //use the main "root" window - not the child widget break; case XCB_BUTTON_PRESS: //This is a mouse button press - //qDebug() << "Button Press Event"; + qDebug() << "Button Press Event"; obj->emit NewInputEvent(); stopevent = BlockInputEvent( ((xcb_button_press_event_t *) ev)->root ); //use the main "root" window - not the child widget if(!stopevent){ @@ -145,7 +149,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag break; case XCB_BUTTON_RELEASE: //This is a mouse button release - //qDebug() << "Button Release Event"; + qDebug() << "Button Release Event"; //xcb_button_release_event_t *tmp = (xcb_button_release_event_t *)ev; stopevent = BlockInputEvent( ((xcb_button_release_event_t *) ev)->root ); //use the main "root" window - not the child widget break; @@ -157,19 +161,19 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag break; case XCB_ENTER_NOTIFY: //This is a mouse movement event when mouse goes over a new window - //qDebug() << "Enter Notify Event"; + qDebug() << "Enter Notify Event"; obj->emit NewInputEvent(); stopevent = BlockInputEvent( ((xcb_enter_notify_event_t *) ev)->root ); break; case XCB_LEAVE_NOTIFY: //This is a mouse movement event when mouse goes leaves a window - //qDebug() << "Leave Notify Event"; + qDebug() << "Leave Notify Event"; obj->emit NewInputEvent(); stopevent = BlockInputEvent(); break; //============================== case XCB_EXPOSE: - //qDebug() << "Expose Notify Event:"; + qDebug() << "Expose Notify Event:"; //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; break; //============================== @@ -205,12 +209,12 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag break; //============================== case XCB_PROPERTY_NOTIFY: - //qDebug() << "Property Notify Event:"; + qDebug() << "Property Notify Event:"; //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; break; //============================== case XCB_CLIENT_MESSAGE: - //qDebug() << "Client Message Event"; + qDebug() << "Client Message Event"; //qDebug() << " - Given Window:" << ((xcb_client_message_event_t*)ev)->window; if( ((xcb_client_message_event_t*)ev)->type == _NET_SYSTEM_TRAY_OPCODE && ((xcb_client_message_event_t*)ev)->format == 32){ //data32[0] is timestamp, [1] is opcode, [2] is window handle diff --git a/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h index 713d97a0..bd235658 100644 --- a/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h +++ b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h @@ -62,6 +62,7 @@ public: LXCB *XCB; //used to interact with the X11 graphics subsystem public slots: + void RegisterVirtualRoot(WId); signals: void NewInputEvent(); |