aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-09-06 17:59:34 -0400
committerKen Moore <ken@ixsystems.com>2018-09-06 17:59:34 -0400
commitfda3b6b2dbe6f992383939a52d1229460217b1a7 (patch)
treef455e710dcd0e99dc807d4ef76d62ac0487d67a3 /src-qt5/core/lumina-desktop-unified/src-desktop
parentEnsure that the Fluxbox background/wallpaper setter is disabled before Lumina... (diff)
downloadlumina-fda3b6b2dbe6f992383939a52d1229460217b1a7.tar.gz
lumina-fda3b6b2dbe6f992383939a52d1229460217b1a7.tar.bz2
lumina-fda3b6b2dbe6f992383939a52d1229460217b1a7.zip
Checkpoint commit for some uncommitted changed to lumina-desktop-unified
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp3
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.h1
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeEmbedWidget.h11
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp4
4 files changed, 16 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp
index 6c3c7adf..4eeff5f1 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp
@@ -331,6 +331,9 @@ void NativeWindowObject::requestActivate(){
requestProperty(NativeWindowObject::Active, true);
}
+void NativeWindowObject::announceClosed(){
+ this->emit WindowClosed(winid);
+}
// ==== PRIVATE ====
void NativeWindowObject::emitSinglePropChanged(NativeWindowObject::Property prop){
//Simple switch to emit the QML-usable signals as properties are changed
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.h
index e4efeef7..964f1fc1 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.h
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.h
@@ -125,6 +125,7 @@ public slots:
Q_INVOKABLE void requestKill(); //ask the WM to kill the app associated with this window (harsh - only use if not responding)
Q_INVOKABLE void requestPing(); //ask the app if it is still active (a WindowNotResponding signal will get sent out if there is no reply);
Q_INVOKABLE void requestActivate();
+ Q_INVOKABLE void announceClosed();
private:
QHash <NativeWindowObject::Property, QVariant> hash;
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeEmbedWidget.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeEmbedWidget.h
index 0cce4fdb..a708ba47 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeEmbedWidget.h
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeEmbedWidget.h
@@ -49,11 +49,16 @@ protected:
}
void enterEvent(QEvent *ev){
QWidget::enterEvent(ev);
- qDebug() << "enter event";
+ qDebug() << "Enter event";
}
void paintEvent(QPaintEvent *){
//Never paint anything with this widget
}
+ void closeEvent(QCloseEvent *ev){
+ qDebug() << "Embed Window Closed";
+ WIN->emit WindowClosed(WIN->id());
+ QWidget::closeEvent(ev);
+ }
};
@@ -69,6 +74,10 @@ public:
if(USE_QWINDOW_EMBED){
QWindow* _window = QWindow::fromWinId(WIN->id());
embedW = QWidget::createWindowContainer(_window, parent);
+ QList<WId> related; related << _window->winId();
+ if(embedW->nativeParentWidget()!=0){ related << embedW->nativeParentWidget()->winId(); }
+ WIN->setProperty(NativeWindowObject::RelatedWindows, QVariant::fromValue< QList<WId> >(related) );
+ //connect(_window, SIGNAL(destroyed(QObject*)), WIN, SLOT(announceClosed()) );
}else{
embedW = new EmbedWidget(WIN, parent);
}
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
index 0296d592..a2bfa2c6 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
@@ -23,8 +23,8 @@ NativeWindow::NativeWindow( NativeWindowObject *obj ) : QFrame(0, Qt::Window | Q
resizeTimer->setSingleShot(true);
resizeTimer->setInterval(10); //1/10 second
connect(resizeTimer, SIGNAL(timeout()), this, SLOT(submitSizeChange()) ); //Let the window system know the window has moved
-
- //WIN->addFrameWinID(this->winId());
+
+ WIN->addFrameWinID(this->winId());
}
NativeWindow::~NativeWindow(){
bgstack15