Ensure that WaylandServer::shellClientAdded only gets emitted once
ClosedPublic

Authored by graesslin on Jun 7 2016, 9:46 AM.

Details

Summary

When a shell client got mapped, unmapped and mapped again we emitted
the shellClientAdded signal in WaylandServer again. This resulted in
e.g. Workspace, EffectsHandler, etc. to start managing the window again.
This can be a reason for problems we see with such windows like the
Plasma panel dialog when opened the second time.

Test Plan

Needs extensive testing on real world system as that changes
behavior now.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 4265.Jun 7 2016, 9:46 AM
graesslin retitled this revision from to Ensure that WaylandServer::shellClientAdded only gets emitted once.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
sebas added a subscriber: sebas.Jun 7 2016, 9:55 AM

a few questions and suggestions, feedback welcome...

autotests/wayland/shell_client_test.cpp
130

aren't you going overboard here? I don't think this makes the backtrace a lot easier to read...

181

I wonder if this should be the default arg in the API. What do you think?

191

Also check windowShownSpy.count()?

203

Check count here?

wayland_server.cpp
251

worth warning here, or is this a valid case? (Looks like an application bug if this return is hit)

graesslin added inline comments.Jun 7 2016, 10:25 AM
autotests/wayland/shell_client_test.cpp
130

backtraces here? This is an autotest. If that code crashes at that place we have a bigger problem than the readability. It's also a pattern I started to use in many tests as some tests showed to do the cleanup in a wrong way.

181

What do you think?

Not ABI compatible to change. And no, it should not. The idea is to limit the rendering of a client with a frame callback. That can only work if we set the frame callback. So the default should be with a frame callback.

graesslin marked 3 inline comments as done.Jun 7 2016, 10:34 AM
graesslin updated this revision to Diff 4272.Jun 7 2016, 10:34 AM

Adressed sebas comments

sebas accepted this revision.Jun 13 2016, 9:00 PM
sebas added a reviewer: sebas.

Looks good. :)

This revision is now accepted and ready to land.Jun 13 2016, 9:00 PM
This revision was automatically updated to reflect the committed changes.