Make support for move/resize operations opt-in
AbandonedPublic

Authored by zzag on Mar 2 2020, 11:12 AM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

In long term, we want to split XdgShellClient into several classes. One
for xdg-toplevel role, and the other one for xdg-popup role. Given that
interactive move/resize operations do not apply to popups, this change
makes them opt-in.

Diff Detail

Repository
R108 KWin
Lint
Lint SkippedExcuse: foo
Unit
No Unit Test Coverage
Build Status
Buildable 23138
Build 23156: arc lint + arc unit
zzag created this revision.Mar 2 2020, 11:12 AM
Restricted Application added a project: KWin. · View Herald TranscriptMar 2 2020, 11:12 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Mar 2 2020, 11:12 AM

Given that interactive move/resize operations do not apply to popups,

Then it can just implement them and returns false?

I don't understand why it needs a default implementation.

abstract_client.cpp
3273

Why are we moving API docs about?

Typical KDE tradition is to keep them in the headers. As that's what you view when you're using another class, which is when you want the docs.

zzag added a comment.Mar 2 2020, 12:00 PM

I don't understand why it needs a default implementation.

I would like to avoid adding a lot of boilerplate code.

apol added a subscriber: apol.Mar 2 2020, 12:22 PM

If this is what we're after, I suggest merging this with D27780.

And well, IMHO it's not about being opt-in, it's about letting the class have a behaviour without defining it, which allows you to define less things but it also opens the possibility to miss something.

zzag added a comment.Mar 2 2020, 12:32 PM

Yeah, perhaps I've picked a wrong title. Maybe "Provide default implementation for foobar" would be a better choice. The main problem is that AbstractClient contains a lot of stuff that internal and xdg-popup clients don't need. Some things are just poorly abstracted, e.g. window captions. So in the end, we have a lot of duplicated code as well boilerplate code.

zzag abandoned this revision.Mar 2 2020, 12:54 PM

Will rework the commit message and merge with other related changes.