Make present windows effect not preserve space for windows from other activities
REVIEW:101180 CCBUG:242555
This commit is contained in:
parent
65237d9c8c
commit
2407b0fbc4
5 changed files with 35 additions and 0 deletions
14
effects.cpp
14
effects.cpp
|
@ -596,6 +596,10 @@ void EffectsHandlerImpl::setShowingDesktop(bool showing)
|
|||
Workspace::self()->setShowingDesktop(showing);
|
||||
}
|
||||
|
||||
QString EffectsHandlerImpl::currentActivity() const
|
||||
{
|
||||
return Workspace::self()->currentActivity();
|
||||
}
|
||||
|
||||
int EffectsHandlerImpl::currentDesktop() const
|
||||
{
|
||||
|
@ -1209,6 +1213,16 @@ int EffectWindowImpl::desktop() const
|
|||
return toplevel->desktop();
|
||||
}
|
||||
|
||||
bool EffectWindowImpl::isOnActivity(QString activity) const
|
||||
{
|
||||
return toplevel->isOnActivity(activity);
|
||||
}
|
||||
|
||||
bool EffectWindowImpl::isOnAllActivities() const
|
||||
{
|
||||
return toplevel->isOnAllActivities();
|
||||
}
|
||||
|
||||
bool EffectWindowImpl::isOnAllDesktops() const
|
||||
{
|
||||
return desktop() == NET::OnAllDesktops;
|
||||
|
|
|
@ -68,6 +68,7 @@ public:
|
|||
virtual void windowToScreen(EffectWindow* w, int screen);
|
||||
virtual void setShowingDesktop(bool showing);
|
||||
|
||||
virtual QString currentActivity() const;
|
||||
virtual int currentDesktop() const;
|
||||
virtual int numberOfDesktops() const;
|
||||
virtual void setCurrentDesktop(int desktop);
|
||||
|
@ -225,6 +226,9 @@ public:
|
|||
virtual void unrefWindow();
|
||||
virtual bool isDeleted() const;
|
||||
|
||||
virtual bool isOnActivity(QString id) const;
|
||||
virtual bool isOnAllActivities() const;
|
||||
|
||||
virtual bool isOnAllDesktops() const;
|
||||
virtual int desktop() const; // prefer isOnXXX()
|
||||
virtual bool isMinimized() const;
|
||||
|
|
2
effects/presentwindows/presentwindows.cpp
Normal file → Executable file
2
effects/presentwindows/presentwindows.cpp
Normal file → Executable file
|
@ -1615,6 +1615,8 @@ void PresentWindowsEffect::updateFilterFrame()
|
|||
|
||||
bool PresentWindowsEffect::isSelectableWindow(EffectWindow *w)
|
||||
{
|
||||
if (!w->isOnCurrentActivity())
|
||||
return false;
|
||||
if (w->isSpecialWindow() || w->isUtility())
|
||||
return false;
|
||||
if (w->isDeleted())
|
||||
|
|
|
@ -304,6 +304,11 @@ EffectWindow::~EffectWindow()
|
|||
{
|
||||
}
|
||||
|
||||
bool EffectWindow::isOnCurrentActivity() const
|
||||
{
|
||||
return isOnActivity(effects->currentActivity());
|
||||
}
|
||||
|
||||
bool EffectWindow::isOnCurrentDesktop() const
|
||||
{
|
||||
return isOnDesktop(effects->currentDesktop());
|
||||
|
|
|
@ -593,6 +593,12 @@ public:
|
|||
virtual void windowToScreen(EffectWindow* w, int screen) = 0;
|
||||
virtual void setShowingDesktop(bool showing) = 0;
|
||||
|
||||
|
||||
// Activities
|
||||
/**
|
||||
* @returns The ID of the current activity.
|
||||
*/
|
||||
virtual QString currentActivity() const = 0;
|
||||
// Desktops
|
||||
/**
|
||||
* @returns The ID of the current desktop.
|
||||
|
@ -1031,6 +1037,10 @@ public:
|
|||
virtual double opacity() const = 0;
|
||||
virtual bool hasAlpha() const = 0;
|
||||
|
||||
virtual bool isOnCurrentActivity() const;
|
||||
virtual bool isOnActivity(QString id) const = 0;
|
||||
virtual bool isOnAllActivities() const = 0;
|
||||
|
||||
virtual bool isOnDesktop(int d) const;
|
||||
virtual bool isOnCurrentDesktop() const;
|
||||
virtual bool isOnAllDesktops() const = 0;
|
||||
|
|
Loading…
Reference in a new issue