|
|
|
@ -264,7 +264,7 @@ void WindowsTracker::updateFlags()
|
|
|
|
|
WindowId activeTouchWinId;
|
|
|
|
|
|
|
|
|
|
for (const auto &winfo : m_windows) {
|
|
|
|
|
if (winfo.isPlasmaDesktop()) {
|
|
|
|
|
if (winfo.isPlasmaDesktop() || !inCurrentDesktopActivity(winfo)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -341,53 +341,38 @@ void WindowsTracker::updateFlags()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowsTracker::isActive(const WindowInfoWrap &winfo)
|
|
|
|
|
bool WindowsTracker::inCurrentDesktopActivity(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
if (winfo.isValid() && winfo.isActive() && !winfo.isMinimized()
|
|
|
|
|
&& m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return (winfo.isValid() && m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
bool WindowsTracker::isActive(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
return (winfo.isValid() && winfo.isActive() && !winfo.isMinimized());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowsTracker::isActiveInCurrentScreen(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
if (winfo.isValid() && winfo.isActive() && !winfo.isMinimized()
|
|
|
|
|
&& m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid())
|
|
|
|
|
&& m_availableScreenGeometry.contains(winfo.geometry().center())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
return (winfo.isValid() && winfo.isActive() && !winfo.isMinimized()
|
|
|
|
|
&& m_availableScreenGeometry.contains(winfo.geometry().center()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowsTracker::isMaximizedInCurrentScreen(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
//! updated implementation to identify the screen that the maximized window is present
|
|
|
|
|
//! in order to avoid: https://bugs.kde.org/show_bug.cgi?id=397700
|
|
|
|
|
|
|
|
|
|
if (winfo.isValid() && !winfo.isMinimized() && m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid())) {
|
|
|
|
|
if (winfo.isMaximized() && m_availableScreenGeometry.contains(winfo.geometry().center())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
return (winfo.isValid() && !winfo.isMinimized() && winfo.isMaximized()
|
|
|
|
|
&& m_availableScreenGeometry.contains(winfo.geometry().center()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowsTracker::isTouchingView(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
if (winfo.isValid() && !winfo.isMinimized() && m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid())) {
|
|
|
|
|
return m_latteView->visibility()->intersects(winfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
return (winfo.isValid() && !winfo.isMinimized() && m_latteView->visibility()->intersects(winfo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowsTracker::isTouchingViewEdge(const WindowInfoWrap &winfo)
|
|
|
|
|
{
|
|
|
|
|
if (winfo.isValid() && !winfo.isMinimized() && m_wm->isOnCurrentDesktop(winfo.wid()) && m_wm->isOnCurrentActivity(winfo.wid())) {
|
|
|
|
|
if (winfo.isValid() && !winfo.isMinimized()) {
|
|
|
|
|
bool touchingViewEdge{false};
|
|
|
|
|
|
|
|
|
|
QRect screenGeometry = m_latteView->screenGeometry();
|
|
|
|
|