[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 David Edmundson changed: What|Removed |Added Status|REPORTED|RESOLVED Latest Commit||https://commits.kde.org/kwi ||n/99b33e7428d14d9b24689e8cf ||b23092bf18820c8 Resolution|--- |FIXED --- Comment #6 from David Edmundson --- Git commit 99b33e7428d14d9b24689e8cfb23092bf18820c8 by David Edmundson. Committed on 03/10/2018 at 21:57. Pushed by davidedmundson into branch 'master'. [libkwineffects] Expose getting/setting activeFullScript to scripted effects Summary: Getter is exposed as a property on scripted effect in a way that hides pointers from the scripting side. Setter is implicitly handled as a property of newly created animations and holds the activeFullScreenEffect whilst any of them are active. Like existing effects it remains up to the effect author to avoid the problems of multiple full screen effects. The RAII lock pattern is somewhat overkill currently, but it's the direction I hope we can take EffectsHandler in next API break. -- This patch is against the QJSEngine port, though it's not conceptually a requirement. Test Plan: Unit test Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14688 M +70 -0autotests/integration/effects/scripted_effects_test.cpp A +8-0autotests/integration/effects/scripts/fullScreenEffectTest.js A +22 -0 autotests/integration/effects/scripts/fullScreenEffectTestMulti.js M +3-0autotests/mock_effectshandler.h M +9-0effects.cpp M +1-0effects.h M +3-1libkwineffects/anidata.cpp M +2-1libkwineffects/anidata_p.h M +24 -4libkwineffects/kwinanimationeffect.cpp M +21 -6libkwineffects/kwinanimationeffect.h M +16 -0libkwineffects/kwineffects.h M +32 -6scripting/scriptedeffect.cpp M +10 -2scripting/scriptedeffect.h https://commits.kde.org/kwin/99b33e7428d14d9b24689e8cfb23092bf18820c8 -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 --- Comment #5 from David Edmundson --- Something like that. We can add a shorthand for setting data on all windows if we need it. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 --- Comment #4 from Vlad Zagorodniy --- (In reply to David Edmundson from comment #3) > Edit. I came to a decision on this. > > Explicit getter, implicit setter. > > property: fullScreenEffectState -> enum of {No-one, Someone Else, Us} > effect.animate(., someFlagForFullScreen) > > best of both worlds. +1 What about WindowForceBackgroundContrastRole and WindowForceBlurRole? As far as I understand, effects have to force those roles and "unforce" them in effect.fullScreenEffectStateChanged.connect(function () { // Check if we no longer full screen var windows = effects.stackingOrder(); for (var i = 0; i < windows.length; ++i) { var w = windows[i]; w.setData(WindowForceBackgroundContrastRole, null); w.setData(WindowForceBlurRole, null); } }); right? -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 --- Comment #3 from David Edmundson --- Edit. I came to a decision on this. Explicit getter, implicit setter. property: fullScreenEffectState -> enum of {No-one, Someone Else, Us} effect.animate(., someFlagForFullScreen) best of both worlds. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 --- Comment #2 from David Edmundson --- >(IIRC, in JavaScript, == doesn't work for objects). for dynamic "Objects" maybe not, but that's for web people. QtScript/QtJS is a very different world. Wrapped QObjects work just as one would expect with the conventional direct pointer comparison underneath. (QV4ObjectWrapper::isEqualTo) -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 396790] ScriptedEffects cannot call setActiveFullScreenEffect
https://bugs.kde.org/show_bug.cgi?id=396790 Vlad Zagorodniy changed: What|Removed |Added CC||vladz...@gmail.com --- Comment #1 from Vlad Zagorodniy --- > This is needed for eg. the fade desktop effect to not clash with others. It would also fix, in some sense, the Fade effect. Please notice that desktopChanged(uint, uint) (or int?) is deprecated. The preferred signal is the one with the 'with' argument. Keep in mind, that we also need to compare EffectWindows (IIRC, in JavaScript, == doesn't work for objects). -- You are receiving this mail because: You are watching all bug changes.