Introduce AbstractClient::createDecoration()
ClosedPublic

Authored by zzag on Mar 4 2020, 8:22 AM.

Details

Summary

We have duplicated code in InternalClient and XdgShellClient to create
decorations. In order to get rid of the code duplication, this change
introduces a method that AbstractClient subclasses can call to create
a window decoration.

Test Plan

Tests pass.

Diff Detail

Repository
R108 KWin
Lint
Lint SkippedExcuse: foobar
Unit
No Unit Test Coverage
Build Status
Buildable 23237
Build 23255: arc lint + arc unit
zzag created this revision.Mar 4 2020, 8:22 AM
Restricted Application added a project: KWin. · View Herald TranscriptMar 4 2020, 8:22 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Mar 4 2020, 8:22 AM
zzag updated this revision to Diff 76916.Mar 4 2020, 10:43 AM

Don't pass ForceGeometrySet

We know for sure that the frame geometry will change.

apol added a subscriber: apol.Mar 4 2020, 11:44 AM

+1 looks good!

abstract_client.cpp
2146

We are not capturing anything, reads like it could be a normal slot.

zzag added inline comments.Mar 4 2020, 12:23 PM
abstract_client.cpp
2146

I just copied createDecoration() from xdgshellclient.cpp and tweaked coding style a little bit. Do I need to change something?

apol accepted this revision.Mar 4 2020, 11:58 PM
This revision is now accepted and ready to land.Mar 4 2020, 11:58 PM
This revision was automatically updated to reflect the committed changes.