Drop Workspace::windowHidden
Its name is misleading. Use activateNextWindow(), it's more readable.
This commit is contained in:
parent
2ed54ee10f
commit
5a32f012c3
6 changed files with 5 additions and 19 deletions
|
@ -425,19 +425,6 @@ bool Workspace::takeActivity(Window *window, ActivityFlags flags)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs the workspace that the window \a window has been hidden. If it
|
||||
* was the active window (or to-become the active window),
|
||||
* the workspace activates another one.
|
||||
*
|
||||
* @note @p c may already be destroyed.
|
||||
*/
|
||||
void Workspace::windowHidden(Window *window)
|
||||
{
|
||||
Q_ASSERT(!window->isShown() || !window->isOnCurrentDesktop() || !window->isOnCurrentActivity());
|
||||
activateNextWindow(window);
|
||||
}
|
||||
|
||||
Window *Workspace::windowUnderMouse(Output *output) const
|
||||
{
|
||||
auto it = stackingOrder().constEnd();
|
||||
|
|
|
@ -4289,7 +4289,7 @@ void Window::setHidden(bool hidden)
|
|||
m_hidden = hidden;
|
||||
doSetHidden();
|
||||
if (hidden) {
|
||||
workspace()->windowHidden(this);
|
||||
workspace()->activateNextWindow(this);
|
||||
Q_EMIT windowHidden(this);
|
||||
} else {
|
||||
Q_EMIT windowShown(this);
|
||||
|
|
|
@ -819,7 +819,7 @@ void Workspace::addWaylandWindow(Window *window)
|
|||
|
||||
void Workspace::removeWaylandWindow(Window *window)
|
||||
{
|
||||
windowHidden(window);
|
||||
activateNextWindow(window);
|
||||
removeWindow(window);
|
||||
}
|
||||
|
||||
|
|
|
@ -241,7 +241,6 @@ public:
|
|||
void constrain(Window *below, Window *above);
|
||||
void unconstrain(Window *below, Window *above);
|
||||
|
||||
void windowHidden(Window *);
|
||||
void windowAttentionChanged(Window *, bool set);
|
||||
|
||||
/**
|
||||
|
|
|
@ -420,7 +420,7 @@ void X11Window::releaseWindow(bool on_shutdown)
|
|||
exportMappingState(XCB_ICCCM_WM_STATE_WITHDRAWN);
|
||||
setModal(false); // Otherwise its mainwindow wouldn't get focus
|
||||
if (!on_shutdown) {
|
||||
workspace()->windowHidden(this);
|
||||
workspace()->activateNextWindow(this);
|
||||
}
|
||||
m_frame.unmap(); // Destroying decoration would cause ugly visual effect
|
||||
cleanGrouping();
|
||||
|
@ -493,7 +493,7 @@ void X11Window::destroyWindow()
|
|||
finishWindowRules();
|
||||
blockGeometryUpdates();
|
||||
setModal(false);
|
||||
workspace()->windowHidden(this);
|
||||
workspace()->activateNextWindow(this);
|
||||
cleanGrouping();
|
||||
workspace()->removeX11Window(this);
|
||||
if (WinInfo *cinfo = dynamic_cast<WinInfo *>(info)) {
|
||||
|
|
|
@ -718,7 +718,7 @@ void XdgToplevelWindow::doMinimize()
|
|||
{
|
||||
if (m_isInitialized) {
|
||||
if (isMinimized()) {
|
||||
workspace()->windowHidden(this);
|
||||
workspace()->activateNextWindow(this);
|
||||
}
|
||||
}
|
||||
workspace()->updateMinimizedOfTransients(this);
|
||||
|
|
Loading…
Reference in a new issue