mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 10:50:30 +03:00
simplify dodge(s) code and comment it
This commit is contained in:
parent
66817695fe
commit
cc0e0e7c47
@ -444,10 +444,6 @@ void VisibilityManagerPrivate::dodgeActive(WindowId wid)
|
||||
return;
|
||||
|
||||
if (!winfo.isActive()) {
|
||||
if (winfo.isPlasmaDesktop()) {
|
||||
raiseDock(true);
|
||||
}
|
||||
|
||||
winfo = wm->requestInfo(wm->activeWindow());
|
||||
|
||||
if (!winfo.isValid()) {
|
||||
@ -457,8 +453,9 @@ void VisibilityManagerPrivate::dodgeActive(WindowId wid)
|
||||
}
|
||||
}
|
||||
|
||||
//!don't send false raiseDock signal when containing mouse
|
||||
if (wm->isOnCurrentDesktop(wid) && wm->isOnCurrentActivity(wid)) {
|
||||
//! don't send false raiseDock signal when containing mouse, // Johan comment
|
||||
//! I dont know why that wasnt winfo.wid() //active window, but just wid//the window that made the call
|
||||
if (wm->isOnCurrentDesktop(winfo.wid()) && wm->isOnCurrentActivity(winfo.wid())) {
|
||||
raiseDock(!intersects(winfo));
|
||||
}
|
||||
}
|
||||
@ -480,9 +477,6 @@ void VisibilityManagerPrivate::dodgeMaximized(WindowId wid)
|
||||
return;
|
||||
|
||||
if (!winfo.isActive()) {
|
||||
if (winfo.isPlasmaDesktop())
|
||||
raiseDock(true);
|
||||
|
||||
winfo = wm->requestInfo(wm->activeWindow());
|
||||
|
||||
if (!winfo.isValid()) {
|
||||
@ -504,10 +498,12 @@ void VisibilityManagerPrivate::dodgeMaximized(WindowId wid)
|
||||
&& intersects(winfo));
|
||||
};
|
||||
|
||||
//!don't send false raiseDock signal when containing mouse
|
||||
if (wm->isOnCurrentDesktop(wid) && wm->isOnCurrentActivity(wid))
|
||||
//! don't send false raiseDock signal when containing mouse, // Johan comment
|
||||
//! I dont know why that wasnt winfo.wid() //active window, but just wid//the window that made the call
|
||||
if (wm->isOnCurrentDesktop(winfo.wid()) && wm->isOnCurrentActivity(winfo.wid())) {
|
||||
raiseDock(view->formFactor() == Plasma::Types::Vertical
|
||||
? !isMaxHoriz() : !isMaxVert());
|
||||
}
|
||||
}
|
||||
|
||||
void VisibilityManagerPrivate::dodgeWindows(WindowId wid)
|
||||
|
@ -349,6 +349,11 @@ WindowInfoWrap WaylandInterface::requestInfo(WindowId wid) const
|
||||
|
||||
inline bool WaylandInterface::isValidWindow(const KWayland::Client::PlasmaWindow *w) const
|
||||
{
|
||||
//! because wayland does not have any way yet to identify the window type
|
||||
//! a trick is to just consider windows as valid when they can be shown in the
|
||||
//! taskbar. Of course that creates issues with plasma native dialogs
|
||||
//! e.g. widgets explorer, Activities etc. that are not used to hide
|
||||
//! the dodge docks/panels appropriately
|
||||
return w->isValid() && !w->skipTaskbar();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user