aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-events
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-01-29 14:24:39 -0500
committerKen Moore <ken@ixsystems.com>2018-01-29 14:24:39 -0500
commit4cb92713a97042dadd0a2e168b78ef3a936a9442 (patch)
treeed6268f9b8fa2346edda8386a0846bc9e8752bf8 /src-qt5/core/lumina-desktop-unified/src-events
parentSome more updates for Lumina 2: (diff)
parentSome more final changes to lumina-pdf. (diff)
downloadlumina-4cb92713a97042dadd0a2e168b78ef3a936a9442.tar.gz
lumina-4cb92713a97042dadd0a2e168b78ef3a936a9442.tar.bz2
lumina-4cb92713a97042dadd0a2e168b78ef3a936a9442.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-events')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp b/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp
index 3d6b0f3e..28c223ab 100644
--- a/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp
@@ -629,9 +629,10 @@ void NativeWindowSystem::SetupNewWindow(NativeWindowObject *win){
}
QImage NativeWindowSystem::GetWindowImage(NativeWindowObject* win){
- QImage img;
//qDebug() << "Update Window Image:" << win->name();
QRect geom(QPoint(0,0), win->property(NativeWindowObject::Size).toSize());
+ QImage img; //(geom.width(), geom.height(), QImage::Format_ARGB32);
+ //img.fill(QGuiApplication::palette().window());
if(DISABLE_COMPOSITING){
QList<QScreen*> screens = static_cast<QApplication*>( QApplication::instance() )->screens();
if(!screens.isEmpty()){
@@ -788,8 +789,6 @@ void NativeWindowSystem::NewWindowDetected(WId id){
win->setProperty(NativeWindowObject::FrameExtents, QVariant::fromValue<QList<int> >( QList<int>() << 5 << 5 << 30 << 5 ));
}
qDebug() << "New Window [& associated ID's]:" << win->id() << win->property(NativeWindowObject::Name).toString();
- SetupNewWindow(win);
- CheckWindowPosition(id, true); //first time placement
//Now setup the connections with this window
connect(win, SIGNAL(RequestClose(WId)), this, SLOT(RequestClose(WId)) );
connect(win, SIGNAL(RequestKill(WId)), this, SLOT(RequestKill(WId)) );
@@ -797,6 +796,8 @@ void NativeWindowSystem::NewWindowDetected(WId id){
connect(win, SIGNAL(RequestReparent(WId, WId, QPoint)), this, SLOT(RequestReparent(WId, WId, QPoint)) );
connect(win, SIGNAL(RequestPropertiesChange(WId, QList<NativeWindowObject::Property>, QList<QVariant>)), this, SLOT(RequestPropertiesChange(WId, QList<NativeWindowObject::Property>, QList<QVariant>)) );
connect(win, SIGNAL(VerifyNewGeometry(WId)), this, SLOT(CheckWindowPosition(WId)) );
+ SetupNewWindow(win);
+ CheckWindowPosition(id, true); //first time placement
xcb_map_window(QX11Info::connection(), win->id());
emit NewWindowAvailable(win);
}
@@ -831,22 +832,22 @@ void NativeWindowSystem::NewTrayWindowDetected(WId id){
void NativeWindowSystem::WindowCloseDetected(WId id){
NativeWindowObject *win = findWindow(id, false);
+ if(win==0){ win = findWindow(id, true); }
//qDebug() << "Got Window Closed" << id << win;
//qDebug() << "Old Window List:" << NWindows.length();
if(win!=0){
NWindows.removeAll(win);
- //RequestReparent(id, QX11Info::appRootWindow(), QPoint(0,0));
win->emit WindowClosed(id);
//qDebug() << "Visible Window Closed!!!";
- //win->deleteLater();
emit WindowClosed();
+ win->deleteLater();
}else{
win = findTrayWindow(id);
if(win!=0){
TWindows.removeAll(win);
win->emit WindowClosed(id);
- win->deleteLater();
emit TrayWindowClosed();
+ win->deleteLater();
}
}
//qDebug() << " - Now:" << NWindows.length();
bgstack15