diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-27 08:20:14 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-27 08:20:14 -0400 |
commit | 79ed54ff31ed654b953d46987851ce4f572245c2 (patch) | |
tree | b61de25f0ece7cfdb266f396a826b271c47ed0dd /src-qt5/core/libLumina/NativeWindowSystem.cpp | |
parent | Quick fix for the mkport.sh script (diff) | |
download | lumina-79ed54ff31ed654b953d46987851ce4f572245c2.tar.gz lumina-79ed54ff31ed654b953d46987851ce4f572245c2.tar.bz2 lumina-79ed54ff31ed654b953d46987851ce4f572245c2.zip |
Another large batch of re-organization for lumina-desktop-unified.
This gets the new "NativeWindowSystem" and associated Native* classes all integrated (untested)
Diffstat (limited to 'src-qt5/core/libLumina/NativeWindowSystem.cpp')
-rw-r--r-- | src-qt5/core/libLumina/NativeWindowSystem.cpp | 56 |
1 files changed, 20 insertions, 36 deletions
diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index da7f4404..49839a69 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -175,6 +175,7 @@ public: NativeWindowSystem::NativeWindowSystem() : QObject(){ obj = 0; pingTimer = 0; + screenLocked = false; } NativeWindowSystem::~NativeWindowSystem(){ @@ -210,6 +211,8 @@ void NativeWindowSystem::stop(){ //Small simplification functions Qt::Key NativeWindowSystem::KeycodeToQt(int keycode){ + qDebug() << "Try to convert keycode to Qt::Key:" << keycode; + qDebug() << " - Not implemented yet"; return Qt::Key_unknown; } @@ -410,6 +413,10 @@ void NativeWindowSystem::RegisterVirtualRoot(WId){ } +int NativeWindowSystem::currentWorkspace(){ + return 0; +} + //NativeWindowEventFilter interactions void NativeWindowSystem::NewWindowDetected(WId id){ //Make sure this can be managed first @@ -499,54 +506,29 @@ void NativeWindowSystem::GotPong(WId id){ if(waitingForPong.isEmpty() && pingTimer!=0){ pingTimer->stop(); } } -/*void NativeWindowSystem::NewKeyPress(int keycode, WId win){ +void NativeWindowSystem::NewKeyPress(int keycode, WId win){ emit NewInputEvent(); + if(screenLocked){ return; } + emit KeyPressDetected(win, keycode); } void NativeWindowSystem::NewKeyRelease(int keycode, WId win){ emit NewInputEvent(); - //Convert the native button code into a Qt keycode - //Qt::Key key = keycode; //TODO - //emit KeyReleaseDetected( key, win); + if(screenLocked){ return; } + emit KeyReleaseDetected(win, keycode); } void NativeWindowSystem::NewMousePress(int buttoncode, WId win){ emit NewInputEvent(); - //Convert the native button code into a Qt mouse button code - Qt::MouseButton button; - switch(buttoncode){ - case 1: - button = Qt::LeftButton ; break; - case 2: - button = Qt::MiddleButton ; break; - case 3: - button = Qt::RightButton ; break; - case 4: - button = Qt::LeftButton ; break; - default: - return; //Unhandled button - } - emit MousePressDetected(button, win); + if(screenLocked){ return; } + emit MousePressDetected(win, MouseToQt(buttoncode)); } void NativeWindowSystem::NewMouseRelease(int buttoncode, WId win){ emit NewInputEvent(); - //Convert the native button code into a Qt mouse button code - Qt::MouseButton button; - switch(buttoncode){ - case 1: - button = Qt::LeftButton ; break; - case 2: - button = Qt::MiddleButton ; break; - case 3: - button = Qt::RightButton ; break; - case 4: - button = Qt::LeftButton ; break; - default: - return; //Unhandled button - } - emit MouseReleaseDetected(button, win); -}*/ + if(screenLocked){ return; } + emit MouseReleaseDetected(win, MouseToQt(buttoncode)); +} void NativeWindowSystem::CheckDamageID(WId win){ NativeWindow *WIN = findTrayWindow(win); @@ -564,7 +546,9 @@ void NativeWindowSystem::RequestPropertiesChange(WId win, QList<NativeWindow::Pr if(WIN==0){ istraywin = true; WIN = findTrayWindow(win); } if(WIN==0){ return; } //invalid window ID - no longer available //Now make any changes as needed - + // TODO + qDebug() << "Request Properties Changed:" << props << vals; + qDebug() << " - Not implemented yet"; } void NativeWindowSystem::RequestClose(WId win){ |