Commit b0132022 authored by Marco Martin's avatar Marco Martin Committed by Vlad Zahorodnii
Browse files

Don't check for workspace->initializing()

the existence of Window is bound to the one of workspace so it
will always be there.
We also need to check the window sizes before workspace is done
initializing,
otherwise when KWin restarts and there are maximized windows, they won't
be resized to take panels into account and will always span the full
screen.


(cherry picked from commit e853f5fe)
parent 06937b8e
Pipeline #232888 passed with stage
in 16 minutes and 40 seconds
......@@ -3990,15 +3990,6 @@ void Window::checkWorkspacePosition(QRectF oldGeometry, const VirtualDesktop *ol
oldGeometry = newGeom;
}
// this can be true only if this window was mapped before KWin
// was started - in such case, don't adjust position to workarea,
// because the window already had its position, and if a window
// with a strut altering the workarea would be managed in initialization
// after this one, this window would be moved
if (!workspace() || workspace()->initializing()) {
return;
}
VirtualDesktop *desktop = !isOnCurrentDesktop() ? desktops().constLast() : VirtualDesktopManager::self()->currentDesktop();
if (!oldDesktop) {
oldDesktop = desktop;
......
......@@ -124,7 +124,6 @@ Workspace::Workspace()
, was_user_interaction(false)
, block_focus(0)
, m_userActionsMenu(new UserActionsMenu(this))
, workspaceInit(true)
, m_sessionManager(new SessionManager(this))
, m_focusChain(std::make_unique<FocusChain>())
, m_applicationMenu(std::make_unique<ApplicationMenu>())
......@@ -270,11 +269,6 @@ void Workspace::init()
connect(server, &WaylandServer::windowRemoved, this, &Workspace::removeWaylandWindow);
}
// SELI TODO: This won't work with unreasonable focus policies,
// and maybe in rare cases also if the selected window doesn't
// want focus
workspaceInit = false;
// broadcast that Workspace is ready, but first process all events.
QMetaObject::invokeMethod(this, "workspaceInitialized", Qt::QueuedConnection);
......
......@@ -720,8 +720,6 @@ private:
static Workspace *_self;
bool workspaceInit;
std::unique_ptr<KStartupInfo> m_startup;
std::unique_ptr<ColorMapper> m_colorMapper;
......@@ -812,11 +810,6 @@ inline QList<Output *> Workspace::outputs() const
return m_outputs;
}
inline bool Workspace::initializing() const
{
return workspaceInit;
}
inline Window *Workspace::activeWindow() const
{
return m_activeWindow;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment