Commit 6982c506 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Setup window management when starting to manage X11 window

We don't need to wait until the window is ready for painting in order to
create a plasma window, in fact, quite the opposite is desired. It's
better if the plasma window is created in manage() so the task manager
displays the corresponding item even if the window is not showing up for
whatever reason.
parent 979dddb4
Pipeline #216685 passed with stage
in 14 minutes and 13 seconds
......@@ -962,6 +962,8 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
setBlockingCompositing(info->isBlockingCompositing());
readShowOnScreenEdge(showOnScreenEdgeCookie);
setupWindowManagementInterface();
// Forward all opacity values to the frame in case there'll be other CM running.
connect(Compositor::self(), &Compositor::compositingToggled, this, [this](bool active) {
if (active) {
......@@ -2348,7 +2350,6 @@ void X11Window::sendSyncRequest()
if (!ready_for_painting) {
// failed on initial pre-show request
setReadyForPainting();
setupWindowManagementInterface();
return;
}
// failed during resize
......@@ -2844,7 +2845,6 @@ void X11Window::checkApplicationMenuObjectPath()
void X11Window::handleSync()
{
setReadyForPainting();
setupWindowManagementInterface();
m_syncRequest.isPending = false;
if (m_syncRequest.failsafeTimeout) {
m_syncRequest.failsafeTimeout->stop();
......@@ -4874,7 +4874,6 @@ void X11Window::damageNotifyEvent()
if (!readyForPainting()) { // avoid "setReadyForPainting()" function calling overhead
if (m_syncRequest.counter == XCB_NONE) { // cannot detect complete redraw, consider done now
setReadyForPainting();
setupWindowManagementInterface();
}
}
......
......@@ -37,7 +37,6 @@ void XwaylandWindow::initialize()
if (!readyForPainting()) { // avoid "setReadyForPainting()" function calling overhead
if (syncRequest().counter == XCB_NONE) { // cannot detect complete redraw, consider done now
setReadyForPainting();
setupWindowManagementInterface();
}
}
}
......
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