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.
This commit is contained in:
parent
979dddb4f1
commit
6982c506a5
2 changed files with 2 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue