[libkwineffects] Save value of the managed property during construction of EffectWindow
ClosedPublic

Authored by zzag on Jun 23 2018, 8:54 AM.

Details

Summary

When windowClosed signal is emitted, effects can't distinguish managed
windows from unmanaged windows(e.g. combo box popups, popup menus, etc).
This leads to dirty hacks like IsXXXWindow. Also, there's a big chance
that such hack can introduce more bugs and overall this makes harder to
write/maintain effects.

This change proposes to save value of managed property during
construction of EffectWindow. So, its value is preserved with Deleted.

Test Plan

Manually.

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.
zzag created this revision.Jun 23 2018, 8:54 AM
Restricted Application added a project: KWin. · View Herald TranscriptJun 23 2018, 8:54 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jun 23 2018, 8:54 AM
graesslin requested changes to this revision.Jun 23 2018, 8:25 PM
graesslin added a subscriber: graesslin.

Except for the virtual I like the change

libkwineffects/kwineffects.h
2147

I don't see a reason to make this virtual.

This revision now requires changes to proceed.Jun 23 2018, 8:25 PM
zzag added inline comments.Jun 23 2018, 8:52 PM
libkwineffects/kwineffects.h
2147

So, I just need to save "managed" property in EffectWindow constructor (and also add PIMPL)? No changes in EffectWindowImpl, right?

graesslin added inline comments.Jun 24 2018, 6:57 AM
libkwineffects/kwineffects.h
2147

Yes

zzag updated this revision to Diff 36595.Jun 24 2018, 11:13 AM

Save managed property in EffectWindow constructor

graesslin accepted this revision.Jun 24 2018, 1:10 PM
This revision is now accepted and ready to land.Jun 24 2018, 1:10 PM
zzag retitled this revision from Save value of managed property during construction of EffectWindow to [libkwineffects] Save value of the managed property during construction of EffectWindow.Jun 24 2018, 1:53 PM
This revision was automatically updated to reflect the committed changes.