Remove no longer needed cast to Client in Workspace::sendClientToDesktop
ClosedPublic

Authored by graesslin on Dec 12 2018, 5:28 PM.

Details

Summary

This change removes a small difference between X11 and Wayland clients.
It ensures that all transients are sent to the same desktop as the main
window. A similar check is already in AbstractClient::setDesktop, so in
general it already worked. This is just a special case for
sendClientToDesktop which supports sending to the same desktop so that
all transients are sent to that desktop.

Test Plan

New test case which fails without this change

Diff Detail

Repository
R108 KWin
Branch
send-client-to-desktop-abstract-client
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5969
Build 5987: arc lint + arc unit
graesslin created this revision.Dec 12 2018, 5:28 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 12 2018, 5:28 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Dec 12 2018, 5:28 PM
zzag added a subscriber: zzag.Dec 12 2018, 5:45 PM
zzag added inline comments.
autotests/integration/shell_client_test.cpp
1124

Wouldn't it be better to check against VirtualDesktop?

graesslin added inline comments.Dec 12 2018, 5:53 PM
autotests/integration/shell_client_test.cpp
1124

yes and no. I decided to use the old X11 numbering here as the slotWindowToDesktop method which I want to test takes the X11 number and not a VirtualDesktop. So for readability of the test I thought it's better to use the desktop numbers.

But yes, in general using the more modern API would be better and it's something I thought about when writing the test case.

zzag accepted this revision.Dec 12 2018, 6:56 PM
This revision is now accepted and ready to land.Dec 12 2018, 6:56 PM
This revision was automatically updated to reflect the committed changes.