Changeset View
Changeset View
Standalone View
Standalone View
scripting/scriptedeffect.cpp
Show First 20 Lines • Show All 600 Lines • ▼ Show 20 Line(s) | 595 | { | |||
---|---|---|---|---|---|
601 | return AnimationEffect::set(w, a, metaData, ms, to, qec, delay, from); | 601 | return AnimationEffect::set(w, a, metaData, ms, to, qec, delay, from); | ||
602 | } | 602 | } | ||
603 | 603 | | |||
604 | bool ScriptedEffect::retarget(quint64 animationId, KWin::FPx2 newTarget, int newRemainingTime) | 604 | bool ScriptedEffect::retarget(quint64 animationId, KWin::FPx2 newTarget, int newRemainingTime) | ||
605 | { | 605 | { | ||
606 | return AnimationEffect::retarget(animationId, newTarget, newRemainingTime); | 606 | return AnimationEffect::retarget(animationId, newTarget, newRemainingTime); | ||
607 | } | 607 | } | ||
608 | 608 | | |||
609 | bool ScriptedEffect::isGrabbed(EffectWindow* w, ScriptedEffect::DataRole grabRole) | | |||
610 | { | | |||
611 | void *e = w->data(static_cast<KWin::DataRole>(grabRole)).value<void*>(); | | |||
612 | if (e) { | | |||
613 | return e != this; | | |||
614 | } else { | | |||
615 | return false; | | |||
616 | } | | |||
617 | } | | |||
618 | | ||||
619 | void ScriptedEffect::reconfigure(ReconfigureFlags flags) | 609 | void ScriptedEffect::reconfigure(ReconfigureFlags flags) | ||
620 | { | 610 | { | ||
621 | AnimationEffect::reconfigure(flags); | 611 | AnimationEffect::reconfigure(flags); | ||
622 | if (m_config) { | 612 | if (m_config) { | ||
623 | m_config->read(); | 613 | m_config->read(); | ||
624 | } | 614 | } | ||
625 | emit configChanged(); | 615 | emit configChanged(); | ||
626 | } | 616 | } | ||
627 | 617 | | |||
628 | void ScriptedEffect::registerShortcut(QAction *a, QScriptValue callback) | 618 | void ScriptedEffect::registerShortcut(QAction *a, QScriptValue callback) | ||
629 | { | 619 | { | ||
630 | m_shortcutCallbacks.insert(a, callback); | 620 | m_shortcutCallbacks.insert(a, callback); | ||
631 | connect(a, SIGNAL(triggered(bool)), SLOT(globalShortcutTriggered())); | 621 | connect(a, SIGNAL(triggered(bool)), SLOT(globalShortcutTriggered())); | ||
davidedmundson: is this line the right way round? | |||||
Is it okay to grab windows unconditionally? I was thinking about force argument or something. zzag: Is it okay to grab windows unconditionally? I was thinking about `force` argument or something. | |||||
632 | } | 622 | } | ||
633 | 623 | | |||
634 | void ScriptedEffect::globalShortcutTriggered() | 624 | void ScriptedEffect::globalShortcutTriggered() | ||
635 | { | 625 | { | ||
636 | callGlobalShortcutCallback<KWin::ScriptedEffect*>(this, sender()); | 626 | callGlobalShortcutCallback<KWin::ScriptedEffect*>(this, sender()); | ||
637 | } | 627 | } | ||
638 | 628 | | |||
639 | bool ScriptedEffect::borderActivated(ElectricBorder edge) | 629 | bool ScriptedEffect::borderActivated(ElectricBorder edge) | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
is this line the right way round?