x11 fixes for invalid windows

--when a window is stacked back to its parent window
for example the firefox case (dragging a tab to create
a new firefox window and redrag it afterwards to the
main window) the wm::windows array had inconsistent
window records.
--This is fixed and also any X11 transient changed signals
are not blocked for windowChanged signals
pull/7/head
Michail Vourlakos 6 years ago
parent 8fe5f8f843
commit f64c7809ef

@ -797,12 +797,12 @@ void Windows::updateHints(Latte::View *view)
//! PASS 2 //! PASS 2
if (foundActiveInCurScreen && !foundActiveTouchInCurScreen) { if (foundActiveInCurScreen && !foundActiveTouchInCurScreen) {
//! Second Pass to track also Child windows if needed //! Second Pass to track also Child windows if needed
/*qDebug() << "Windows Array...";
for (const auto &winfo : m_windows) { //qDebug() << "Windows Array...";
qDebug() << " - " << winfo.wid() << " - " << winfo.display() << " parent : " << winfo.parentId(); //for (const auto &winfo : m_windows) {
} // qDebug() << " - " << winfo.wid() << " - " << winfo.isValid() << " - " << winfo.display() << " - " << winfo.geometry() << " parent : " << winfo.parentId();
qDebug() << " - - - - - "; //}
*/ //qDebug() << " - - - - - ";
WindowInfoWrap activeInfo = m_windows[activeWinId]; WindowInfoWrap activeInfo = m_windows[activeWinId];
WindowId mainWindowId = activeInfo.isChildWindow() ? activeInfo.parentId() : activeWinId; WindowId mainWindowId = activeInfo.isChildWindow() ? activeInfo.parentId() : activeWinId;

@ -453,7 +453,7 @@ WindowInfoWrap WaylandInterface::requestInfo(WindowId wid) const
winfoWrap.setActivities(QStringList()); winfoWrap.setActivities(QStringList());
} }
} else { } else {
return {}; winfoWrap.setIsValid(false);
} }
return winfoWrap; return winfoWrap;

@ -321,7 +321,9 @@ WindowInfoWrap XWindowInterface::requestInfo(WindowId wid) const
WindowInfoWrap winfoWrap; WindowInfoWrap winfoWrap;
if (isValidWindow(winfo) && !isPlasmaDesktop) { if (!winfo.valid()) {
winfoWrap.setIsValid(false);
} else if (isValidWindow(winfo) && !isPlasmaDesktop) {
winfoWrap.setIsValid(true); winfoWrap.setIsValid(true);
winfoWrap.setWid(wid); winfoWrap.setWid(wid);
winfoWrap.setParentId(winfo.transientFor()); winfoWrap.setParentId(winfo.transientFor());
@ -645,7 +647,7 @@ void XWindowInterface::windowChangedProxy(WId wid, NET::Properties prop1, NET::P
//! ignore when the user presses a key, or a window is sending X events etc. //! ignore when the user presses a key, or a window is sending X events etc.
//! without needing to (e.g. Firefox, https://bugzilla.mozilla.org/show_bug.cgi?id=1389953) //! without needing to (e.g. Firefox, https://bugzilla.mozilla.org/show_bug.cgi?id=1389953)
//! NET::WM2UserTime, NET::WM2IconPixmap etc.... //! NET::WM2UserTime, NET::WM2IconPixmap etc....
if (prop1 == 0 && !(prop2 & NET::WM2Activities)) { if (prop1 == 0 && !(prop2 & (NET::WM2Activities | NET::WM2TransientFor))) {
return; return;
} }

Loading…
Cancel
Save