mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-23 05:57:29 +03:00
consider as isMaximized state only full screen case
--window manager provides two more states isMaxHorizontally, isMaxVertically. These states can be ignored and be considered as isMaximized only when both of these states are valid FIXED-IN:0.9.6
This commit is contained in:
parent
4c3774ff52
commit
7c77270f0b
@ -306,7 +306,7 @@ void LastActiveWindow::setInformation(const WindowInfoWrap &info)
|
||||
setIsValid(true);
|
||||
setActive(info.isActive());
|
||||
setIsMinimized(info.isMinimized());
|
||||
setIsMaximized(info.isMaxVert() || info.isMaxHoriz());
|
||||
setIsMaximized(info.isMaximized());
|
||||
setIsOnAllDesktops(info.isOnAllDesktops());
|
||||
|
||||
setAppName(info.appName());
|
||||
|
@ -673,7 +673,7 @@ bool Windows::isActiveInViewScreen(Latte::View *view, const WindowInfoWrap &winf
|
||||
|
||||
bool Windows::isMaximizedInViewScreen(Latte::View *view, const WindowInfoWrap &winfo)
|
||||
{
|
||||
auto viewIntersectsMaxVert = [&]() noexcept -> bool {
|
||||
/* auto viewIntersectsMaxVert = [&]() noexcept -> bool {
|
||||
return ((winfo.isMaxVert()
|
||||
|| (view->screen() && view->screen()->availableSize().height() <= winfo.geometry().height()))
|
||||
&& intersects(view, winfo));
|
||||
@ -683,12 +683,13 @@ bool Windows::isMaximizedInViewScreen(Latte::View *view, const WindowInfoWrap &w
|
||||
return ((winfo.isMaxHoriz()
|
||||
|| (view->screen() && view->screen()->availableSize().width() <= winfo.geometry().width()))
|
||||
&& intersects(view, 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
|
||||
return (winfo.isValid() && !winfo.isPlasmaDesktop() && !winfo.isMinimized()
|
||||
&& (winfo.isMaximized() || viewIntersectsMaxVert() || viewIntersectsMaxHoriz())
|
||||
&& winfo.isMaximized()
|
||||
&& intersects(view, winfo)
|
||||
&& m_views[view]->availableScreenGeometry().contains(winfo.geometry().center()));
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ inline void WindowInfoWrap::setIsMinimized(bool isMinimized) noexcept
|
||||
|
||||
inline bool WindowInfoWrap::isMaximized() const noexcept
|
||||
{
|
||||
return m_isMaxVert || m_isMaxHoriz;
|
||||
return m_isMaxVert && m_isMaxHoriz;
|
||||
}
|
||||
|
||||
inline bool WindowInfoWrap::isMaxVert() const noexcept
|
||||
|
Loading…
x
Reference in New Issue
Block a user