Force server-side decoration if no borders are forced by user
ClosedPublic

Authored by broulik on Mar 12 2019, 11:11 AM.

Details

Summary

Otherwise the client will start drawing its own border now.

BUG: 405385
FIXED-IN: 5.15.4

Test Plan

BorderlessMaximizedWindows works fine now (safe for an input bug but that is unrelated to this), manually removing window borders works fine 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.
broulik created this revision.Mar 12 2019, 11:11 AM
Restricted Application added a project: KWin. · View Herald TranscriptMar 12 2019, 11:11 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
broulik requested review of this revision.Mar 12 2019, 11:11 AM
zzag added a subscriber: zzag.Mar 12 2019, 11:18 AM

Could you please add a test case?

How does this affect GTK3 CSD windows?

zzag added a comment.Mar 12 2019, 1:25 PM

It doesn't. GTK doesn't support xdg-decoration. :D

Heh, great. :)

I mean, even if it did, we explicitly don't want decorations, so we tell the client we paint them so it doesn't do it, and then we just don't paint them

broulik updated this revision to Diff 53733.Mar 12 2019, 3:23 PM
  • Add unittest

GTK doesn't support xdg-decoration. :D

It does.

zzag added a comment.Mar 12 2019, 7:07 PM

It does.

Hmm, I thought it only supports KWin's server_decoration protocol.

I just read the title guessed you were talking about any server side decos.
You are correct. Sorry

zzag added a comment.Mar 13 2019, 1:05 PM

Code-wise this change looks okay to me, though after thinking for a bit I'm not sure whether this change makes sense logically. Maybe David could weigh in (we have plenty time before 5.15.4 is released).

autotests/integration/maximize_test.cpp
268

maybe you could check decorationConfiguredSpy.count() here as well. though in general it's a bit messy because kwin sends several configure events in this case.....

270–272

just ack the last one

davidedmundson accepted this revision.Mar 17 2019, 9:29 PM

Seems sensible.

autotests/integration/maximize_test.cpp
268

We should only send one, but whether we or not is somewhat unrelated to this patch.

Try checking it's one, but if it fails leave it.

This revision is now accepted and ready to land.Mar 17 2019, 9:29 PM
This revision was automatically updated to reflect the committed changes.