@ -205,11 +205,11 @@ void Workspace::init()
vds - > setCurrent ( m_initialDesktop ) ;
reconfigureTimer . setSingleShot ( true ) ;
m_updateClientArea Timer . setSingleShot ( true ) ;
m_rearrange Timer . setSingleShot ( true ) ;
updateToolWindowsTimer . setSingleShot ( true ) ;
connect ( & reconfigureTimer , & QTimer : : timeout , this , & Workspace : : slotReconfigure ) ;
connect ( & m_updateClientArea Timer , & QTimer : : timeout , this , & Workspace : : updateClientArea ) ;
connect ( & m_rearrange Timer , & QTimer : : timeout , this , & Workspace : : rearrange ) ;
connect ( & updateToolWindowsTimer , & QTimer : : timeout , this , & Workspace : : slotUpdateToolWindows ) ;
// TODO: do we really need to reconfigure everything when fonts change?
@ -380,7 +380,7 @@ void Workspace::initializeX11()
// Propagate windows, will really happen at the end of the updates blocker block
updateStackingOrder ( true ) ;
updateClientArea ( ) ;
rearrange ( ) ;
// NETWM spec says we have to set it to (0,0) if we don't support it
NETPoint * viewports = new NETPoint [ VirtualDesktopManager : : self ( ) - > count ( ) ] ;
@ -722,7 +722,7 @@ void Workspace::addX11Window(X11Window *window)
m_windows . append ( window ) ;
addToStack ( window ) ;
if ( window - > hasStrut ( ) ) {
updateClientArea ( ) ; // This cannot be in manage(), because the window got added only now
rearrange ( ) ; // This cannot be in manage(), because the window got added only now
}
window - > updateLayer ( ) ;
if ( window - > isDesktop ( ) ) {
@ -818,7 +818,7 @@ void Workspace::addWaylandWindow(Window *window)
updateStackingOrder ( true ) ;
if ( window - > hasStrut ( ) ) {
updateClientArea ( ) ;
rearrange ( ) ;
}
if ( window - > wantsInput ( ) & & ! window - > isMinimized ( ) ) {
// Never activate a window on its own in "Extreme" mode.
@ -861,7 +861,7 @@ void Workspace::removeWindow(Window *window)
setupWindowShortcutDone ( false ) ;
}
if ( window - > hasStrut ( ) ) {
updateClientArea ( ) ;
rearrange ( ) ;
}
Q_EMIT windowRemoved ( window ) ;
@ -1454,7 +1454,7 @@ void Workspace::slotDesktopAdded(VirtualDesktop *desktop)
{
m_focusChain - > addDesktop ( desktop ) ;
m_placement - > reinitCascading ( ) ;
updateClientArea ( ) ;
rearrange ( ) ;
}
void Workspace : : slotDesktopRemoved ( VirtualDesktop * desktop )
@ -1477,7 +1477,7 @@ void Workspace::slotDesktopRemoved(VirtualDesktop *desktop)
}
}
updateClientArea ( ) ;
rearrange ( ) ;
m_placement - > reinitCascading ( ) ;
m_focusChain - > removeDesktop ( desktop ) ;
}
@ -1534,7 +1534,7 @@ void Workspace::sendWindowToDesktops(Window *window, const QList<VirtualDesktop
for ( auto it = transients_stacking_order . constBegin ( ) ; it ! = transients_stacking_order . constEnd ( ) ; + + it ) {
sendWindowToDesktops ( * it , window - > desktops ( ) , dont_activate ) ;
}
updateClientArea ( ) ;
rearrange ( ) ;
}
void Workspace : : sendWindowToOutput ( Window * window , Output * output )
@ -2221,7 +2221,7 @@ void Workspace::desktopResized()
}
# endif
updateClientArea ( ) ;
rearrange ( ) ;
const auto stack = stackingOrder ( ) ;
for ( Window * window : stack ) {
@ -2244,7 +2244,7 @@ void Workspace::desktopResized()
}
}
saveOldScreenSizes ( ) ; // after updateClientArea (), so that one still uses the previous one
saveOldScreenSizes ( ) ; // after rearrange (), so that one still uses the previous one
// TODO: emit a signal instead and remove the deep function calls into edges and effects
m_screenEdges - > recreateEdges ( ) ;
@ -2349,24 +2349,15 @@ QRectF Workspace::adjustClientArea(Window *window, const QRectF &area) const
return adjustedArea ;
}
void Workspace : : scheduleUpdateClientArea ( )
void Workspace : : scheduleRearrange ( )
{
m_updateClientArea Timer . start ( 0 ) ;
m_rearrange Timer . start ( 0 ) ;
}
/**
* Updates the current client areas according to the current windows .
*
* The client area is the area that is available for windows ( that
* which is not taken by windows like panels , the top - of - screen menu
* etc ) .
*
* @ see clientArea ( )
*/
void Workspace : : updateClientArea ( )
void Workspace : : rearrange ( )
{
Q_EMIT aboutToUpdateClientArea ( ) ;
m_updateClientArea Timer . stop ( ) ;
Q_EMIT aboutToRearrange ( ) ;
m_rearrangeTimer . stop ( ) ;
const QList < VirtualDesktop * > desktops = VirtualDesktopManager : : self ( ) - > desktops ( ) ;
@ -2444,7 +2435,7 @@ void Workspace::updateClientArea()
m_workAreas = workAreas ;
m_screenAreas = screenAreas ;
m_inUpdateClientArea = true ;
m_inRearrange = true ;
m_oldRestrictedAreas = m_restrictedAreas ;
m_restrictedAreas = restrictedAreas ;
@ -2465,7 +2456,7 @@ void Workspace::updateClientArea()
}
m_oldRestrictedAreas . clear ( ) ; // reset, no longer valid or needed
m_inUpdateClientArea = false ;
m_inRearrange = false ;
}
}
@ -2542,9 +2533,9 @@ StrutRects Workspace::restrictedMoveArea(const VirtualDesktop *desktop, StrutAre
return ret ;
}
bool Workspace : : inUpdateClientArea ( ) const
bool Workspace : : inRearrange ( ) const
{
return m_inUpdateClientArea ;
return m_inRearrange ;
}
StrutRects Workspace : : previousRestrictedMoveArea ( const VirtualDesktop * desktop , StrutAreas areas ) const