Commit Graph

18 Commits (7e8facc3fde853a93683554e5fc9bfd4985e4760)

Author SHA1 Message Date
Vlad Zagorodniy 7b19fa87d0 [libkwineffects] Delete unused field in AniData
Summary: windowType is not used anywhere so delete it.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16389
2018-10-23 18:25:44 +03:00
Vlad Zagorodniy 655d8af8be [libkwineffects] Delete unused constant
Summary:
The constant is a leftover after
2569768074.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16373
2018-10-22 18:27:22 +03:00
Vlad Zagorodniy a281f2bce1 [effects/dialogparent] Fix flickering of parent windows
Summary:
If a modal window is closed and some alternative effect that animates
the disappearing of windows is enabled(e.g. the Glide effect, or the
Scale effect), the Dialog Parent effect can cause flickering of the
parent window because its animation duration doesn't match duration of
those alternative effects.

Also, if the Fade effect, the Glide effect, and the Scale effect are
disabled, the Dialog Parent will keep the parent window alive for no
good reason.

This change addresses that problem by adding keepAlive property to
`animate` function so scripted effects have more control over lifetime
of animated windows.

If both a modal window and its parent window are closed at the same time
(and there is no effect that animates the disappearing of windows), the
Dialog Parent will stop immediately(because windowDeleted will be
emitted right after windowClosed signal).

If both a modal window and its parent window are closed at the same time
(and there is effect that animates the disappearing of windows), the
Dialog Parent won't reference the latter window. Thus, it won't cause
flickering. I.e. it will "passively" animate parent windows.

BUG: 355036
FIXED-IN: 5.15.0

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14919
2018-10-10 18:34:12 +03:00
Vlad Zagorodniy 2569768074 [libkwineffects] Drop AniData constructor that receives QString
Summary:
This code has several bugs, it's untested, it's not used anywhere, it
adds unnecessary complexity -> delete it.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16099
2018-10-10 12:57:07 +03:00
Vlad Zagorodniy 5d5816be2b [libkwineffects] Don't expose the fullscreen effect lock to the public API
Summary:
The fullscreen effect lock is purely an implementation detail of the
AnimationEffect, we don't need to have it in the public API.

Test Plan: KWin still compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16075
2018-10-09 19:06:04 +03:00
David Edmundson 99b33e7428 [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.

BUG: 396790

--

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
2018-10-04 00:57:44 +03:00
David Edmundson 7b65aa9199 [libkwineffects] Remove broken copy constructor of AniData
This doesn't copy everything, it misses the ID which breaks
everything.

Given it's just a direct copy of members the auto-generated one does a
better job
2018-07-31 12:29:00 +01:00
Nick Shaforostoff 3a8d7d866a optimize string operations
-use qstringliteral only when necessary (i.e. not in concat or comparison)
-use qbytearray instead of qstring when dealing with latin1 input and output (glplatform)
-use qstringref to extract numbers from strings (glplatform)
-define qt_use_qstringbuilder to optimize all string concatenations
-anidata: use ctor init lists, add windowType member initialization

REVIEW: 125933
2015-11-05 14:14:06 +00:00
Martin Gräßlin 57c521c214 [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
Volker Krause 5db2d5a556 Make constants const, saves a few symbols in the .data section. 2014-09-27 20:30:49 +02:00
Martin Gräßlin 99bcac1cc7 Port libkwineffects away from KDebug
And with that it doesn't need kde4support anymore.
2013-09-02 10:43:55 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Jaime Torres 4ec0f64ea3 initialize a member and initialize a boolean
one less valgrind warning and one cppcheck warning less

REVIEW: 107603
2013-04-29 18:14:50 +02:00
Thomas Lübking ee1d6d568d add effect debug interface and dbus export
allows for effect specific debugging details

REVIEW: 107063
2013-03-28 20:31:02 +01:00
Thomas Lübking 39499de9cc add AnimationEffect::set() and ::cancel()
This will allow to sue the AnimationEffect class for
(temorarily) persistent changes like required by the
translucency effect

REVIEW: 109211
2013-03-05 19:24:30 +01:00
Thomas Lübking 7bc5832429 use QELapsedTimer to measure animation delay
QElapsedTimer uses a monotic clock on all relevant systems
and is thus invarant against date/time changes (while the
bug was likely caused by daybreaks)

BUG: 306186
REVIEW: 107250
FIXED-IN: 4.10

use monitc clock
2012-11-14 21:16:32 +01:00
Thomas Lübking 41a39a9928 add clipping support to AnimationEffect
REVIEW: 104898
2012-05-10 19:35:13 +02:00
Thomas Lübking 67e79ea13a Add AnimationEffect class
REVIEW: 102922
2011-10-27 21:40:14 +02:00