Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 905 Lines • ▼ Show 20 Line(s) | 905 | if (snap) | |||
---|---|---|---|---|---|
906 | cl->move(Workspace::self()->adjustClientPosition(cl, pos, true, snapAdjust)); | 906 | cl->move(Workspace::self()->adjustClientPosition(cl, pos, true, snapAdjust)); | ||
907 | else | 907 | else | ||
908 | cl->move(pos); | 908 | cl->move(pos); | ||
909 | } | 909 | } | ||
910 | 910 | | |||
911 | void EffectsHandlerImpl::windowToDesktop(EffectWindow* w, int desktop) | 911 | void EffectsHandlerImpl::windowToDesktop(EffectWindow* w, int desktop) | ||
912 | { | 912 | { | ||
913 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | 913 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | ||
914 | if (cl && !cl->isDesktop() && !cl->isDock()) | 914 | if (cl && !cl->isDesktop() && !cl->isDock()) { | ||
915 | Workspace::self()->sendClientToDesktop(cl, desktop, true); | 915 | Workspace::self()->sendClientToDesktop(cl, desktop, true); | ||
916 | } | 916 | } | ||
917 | } | ||||
917 | 918 | | |||
918 | void EffectsHandlerImpl::windowToScreen(EffectWindow* w, int screen) | 919 | void EffectsHandlerImpl::windowToScreen(EffectWindow* w, int screen) | ||
919 | { | 920 | { | ||
920 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | 921 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | ||
921 | if (cl && !cl->isDesktop() && !cl->isDock()) | 922 | if (cl && !cl->isDesktop() && !cl->isDock()) | ||
922 | Workspace::self()->sendClientToScreen(cl, screen); | 923 | Workspace::self()->sendClientToScreen(cl, screen); | ||
923 | } | 924 | } | ||
924 | 925 | | |||
▲ Show 20 Lines • Show All 849 Lines • ▼ Show 20 Line(s) | |||||
1774 | 1775 | | |||
1775 | EffectWindow* effectWindow(Toplevel* w) | 1776 | EffectWindow* effectWindow(Toplevel* w) | ||
1776 | { | 1777 | { | ||
1777 | EffectWindowImpl* ret = w->effectWindow(); | 1778 | EffectWindowImpl* ret = w->effectWindow(); | ||
1778 | return ret; | 1779 | return ret; | ||
1779 | } | 1780 | } | ||
1780 | 1781 | | |||
1781 | EffectWindow* effectWindow(Scene::Window* w) | 1782 | EffectWindow* effectWindow(Scene::Window* w) | ||
1782 | { | 1783 | { | ||
zzag: Call desks.reserve(). Also, it would be great to use std::transform. | |||||
1783 | EffectWindowImpl* ret = w->window()->effectWindow(); | 1784 | EffectWindowImpl* ret = w->window()->effectWindow(); | ||
1784 | ret->setSceneWindow(w); | 1785 | ret->setSceneWindow(w); | ||
1785 | return ret; | 1786 | return ret; | ||
1786 | } | 1787 | } | ||
1787 | 1788 | | |||
1788 | void EffectWindowImpl::elevate(bool elevate) | 1789 | void EffectWindowImpl::elevate(bool elevate) | ||
1789 | { | 1790 | { | ||
1790 | effects->setElevatedWindow(this, elevate); | 1791 | effects->setElevatedWindow(this, elevate); | ||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |
Call desks.reserve(). Also, it would be great to use std::transform.