[wayland] Finish active move-resize op when client is destroyed or unmapped
ClosedPublic

Authored by zzag on Mar 12 2019, 11:54 AM.

Details

Summary

It might happen that the moving client gets closed or crashes. In that
case, we have to manually reset Workspace::movingClient, otherwise KWin
will most likely crash later on.

BUG: 405379

Diff Detail

Repository
R108 KWin
Branch
shell-client-leave-move-resize
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9497
Build 9515: arc lint + arc unit
zzag created this revision.Mar 12 2019, 11:54 AM
Restricted Application added a project: KWin. · View Herald TranscriptMar 12 2019, 11:54 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Mar 12 2019, 11:54 AM
zzag added a comment.Mar 12 2019, 11:56 AM

I'm still not quite sure what exactly we have to do when a client is unmapped. Should we send a configure event?

zzag updated this revision to Diff 55780.Apr 8 2019, 8:54 PM

don't emit clientFinishUserMovedResized

davidedmundson accepted this revision.Apr 8 2019, 9:11 PM
davidedmundson added a subscriber: davidedmundson.

I'm still not quite sure what exactly we have to do when a client is unmapped. Should we send a configure event?

No-one actually unmaps and remaps the same shellclient IRL, so it's kinda moot.

In theory we shouldn't send anything till we get the next commit event on the wl_surface.

So arguably we should do something like

ShellClient::unmap() {
    if (xdg) {
        m_requestGeometryBlockCounter++;
        connect(s, &SurfaceInterface::committed, this, &ShellClient::finishInit);
    }
     //existing code
}

but that's true before this patch

This revision is now accepted and ready to land.Apr 8 2019, 9:11 PM
This revision was automatically updated to reflect the committed changes.