From 8ab77628db56aba8e9295ede63c56d9312e4262a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 19 Jan 2018 14:53:04 -0500 Subject: Get some more of Lumina 2 cleaned up: 1. Ensure window visibility is managed on the QML side 2. Have all panels (even ones pinned to a screen) get created by the root window QML (for layering purposes) 3. Change the default panel setting to include partial-transparency --- .../lumina-desktop-unified/src-events/NativeWindowSystem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src-qt5/core/lumina-desktop-unified/src-events') 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 063c1337..a3bac808 100644 --- a/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp @@ -788,8 +788,6 @@ void NativeWindowSystem::NewWindowDetected(WId id){ win->setProperty(NativeWindowObject::FrameExtents, QVariant::fromValue >( QList() << 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 +795,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, QList)), this, SLOT(RequestPropertiesChange(WId, QList, QList)) ); 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 +831,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(); -- cgit From 0f7272f3bf78e65103a6a3448ea155b28e00aad2 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 19 Jan 2018 15:29:36 -0500 Subject: a Couple more minor tweaks. Have lumina-textedit treat .qml as javascript for syntax highlighting --- src-qt5/core/lumina-desktop-unified/src-events/NativeWindowSystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-desktop-unified/src-events') 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 a3bac808..4a2e3545 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 screens = static_cast( QApplication::instance() )->screens(); if(!screens.isEmpty()){ -- cgit