import kwin deco and button order in l&f
ClosedPublic

Authored by mart on Dec 28 2016, 1:32 PM.

Details

Summary

support both button order and decoration theme
of kwin when applying for a lnf theme. The deco
theme is composed by library and theme entries.
c++ themes will only use library, aurorae themes will use
theme as well.

BUG:370511

Test Plan

created some lnf packages that customize this and applied

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart updated this revision to Diff 9413.Dec 28 2016, 1:32 PM
mart retitled this revision from to import kwin deco and button order in l&f.
mart updated this object.
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptDec 28 2016, 1:32 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart updated this object.

I don't think the buttons should be set by a lnf package.

mart added a comment.Dec 28 2016, 4:10 PM

I don't think the buttons should be set by a lnf package.

the user request was to make possible the l&f themes to emulate a different os (that is actually part of the design reason of l&f themes) in which button order becomes part of the target look

Lucas added a subscriber: Lucas.EditedDec 28 2016, 4:33 PM
In D3832#71865, @mart wrote:

I don't think the buttons should be set by a lnf package.

the user request was to make possible the l&f themes to emulate a different os (that is actually part of the design reason of l&f themes) in which button order becomes part of the target look

To be more precise it was my request. The reason: for plasma 5.9 I would like to upload to kde store a few look and feel packages, which are mimicking certain desktop environments/operating systems like seen in this video https://www.youtube.com/watch?v=G4InY_1UhTI It would fit nicely with our upcoming Plasma 5.9 promo video etc.

In D3832#71865, @mart wrote:

I don't think the buttons should be set by a lnf package.

the user request was to make possible the l&f themes to emulate a different os (that is actually part of the design reason of l&f themes) in which button order becomes part of the target look

the button order is global and not per theme. Given that I think it is wrong to change the global button order when changing theme. IIRC the deco can override it anyway, so not needed here.

mart updated this revision to Diff 9442.Dec 29 2016, 11:28 AM
  • drop window button order
In D3832#71865, @mart wrote:

I don't think the buttons should be set by a lnf package.

the user request was to make possible the l&f themes to emulate a different os (that is actually part of the design reason of l&f themes) in which button order becomes part of the target look

the button order is global and not per theme. Given that I think it is wrong to change the global button order when changing theme. IIRC the deco can override it anyway, so not needed here.

kcms/lookandfeel/kcm.cpp
664–668

now we have two sections which will reload KWin's config. Can we merge that? A reload of KWin's config can be really expensive and we don't want to do that twice.

mart added inline comments.Dec 29 2016, 5:21 PM
kcms/lookandfeel/kcm.cpp
664–668

maybe an even compression with a timer?

graesslin added inline comments.Dec 29 2016, 5:44 PM
kcms/lookandfeel/kcm.cpp
664–668

in KWin? eh, no, please not.

mart added inline comments.Dec 30 2016, 9:27 AM
kcms/lookandfeel/kcm.cpp
664–668

nono, i meant in the kcm :)

graesslin added inline comments.Dec 30 2016, 9:38 AM
kcms/lookandfeel/kcm.cpp
664–668

ok :-) yeah that could be neat as it also allows to unstress the system a bit.

mart updated this revision to Diff 9478.Dec 30 2016, 9:47 AM
  • call kwin config reload only once
mart updated this revision to Diff 9479.Dec 30 2016, 9:48 AM
  • add unmanaged case
graesslin added inline comments.Dec 30 2016, 6:09 PM
kcms/lookandfeel/kcm.cpp
338

what remains is that this is not the default used in KWin.

In KWin it's:

static const QString s_aurorae = QStringLiteral("org.kde.kwin.aurorae");
static const QString s_pluginName = QStringLiteral("org.kde.kdecoration2");
#if HAVE_BREEZE_DECO
static const QString s_defaultPlugin = QStringLiteral(BREEZE_KDECORATION_PLUGIN_ID);
#else
static const QString s_defaultPlugin = s_aurorae;
#endif
mart added inline comments.Jan 3 2017, 12:12 PM
kcms/lookandfeel/kcm.cpp
338

problem is that HAVE_BREEZE_DECO and BREEZE_KDECORATION_PLUGIN_ID are not things i could have access frmo plasma-desktop?

338

but does aurorae work if no theme is speacified? does it have a safe fallback hardcoded one?

mart updated this revision to Diff 9650.Jan 3 2017, 12:18 PM
  • use proper breeze plugin id if found
graesslin added inline comments.Jan 3 2017, 3:47 PM
kcms/lookandfeel/kcm.cpp
342

I think you got that part wrong. The difference is the value passed to library.

mart updated this revision to Diff 9662.Jan 3 2017, 4:15 PM
  • the ifdef should be at setWindowDecoration
kcms/lookandfeel/kcm.cpp
342

eew, sorry, that's what you get for writing that before cofee :/

graesslin accepted this revision.Jan 4 2017, 6:38 AM
graesslin added a reviewer: graesslin.
This revision is now accepted and ready to land.Jan 4 2017, 6:38 AM
This revision was automatically updated to reflect the committed changes.