fix #907,always check overlap for dodgeMaximize

--the check in order to identify if a maximized window
overlaps with the dock wasnt always been executed. That
was the case for multi-screens environments.
pull/2/head
Michail Vourlakos 7 years ago
parent 085f5b3d16
commit 11cccbf40d

@ -417,14 +417,14 @@ void VisibilityManagerPrivate::dodgeMaximized(WindowId wid)
} }
auto isMaxVert = [&]() noexcept -> bool { auto isMaxVert = [&]() noexcept -> bool {
return winfo.isMaxVert() return ((winfo.isMaxVert()
|| (view->screen() && view->screen()->availableSize().height() <= winfo.geometry().height() || (view->screen() && view->screen()->availableSize().height() <= winfo.geometry().height()))
&& intersects(winfo)); && intersects(winfo));
}; };
auto isMaxHoriz = [&]() noexcept -> bool { auto isMaxHoriz = [&]() noexcept -> bool {
return winfo.isMaxHoriz() return ((winfo.isMaxHoriz()
|| (view->screen() && view->screen()->availableSize().width() <= winfo.geometry().width() || (view->screen() && view->screen()->availableSize().width() <= winfo.geometry().width()))
&& intersects(winfo)); && intersects(winfo));
}; };

Loading…
Cancel
Save