Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 867 Lines • ▼ Show 20 Line(s) | 867 | if (snap) | |||
---|---|---|---|---|---|
868 | cl->move(Workspace::self()->adjustClientPosition(cl, pos, true, snapAdjust)); | 868 | cl->move(Workspace::self()->adjustClientPosition(cl, pos, true, snapAdjust)); | ||
869 | else | 869 | else | ||
870 | cl->move(pos); | 870 | cl->move(pos); | ||
871 | } | 871 | } | ||
872 | 872 | | |||
873 | void EffectsHandlerImpl::windowToDesktop(EffectWindow* w, int desktop) | 873 | void EffectsHandlerImpl::windowToDesktop(EffectWindow* w, int desktop) | ||
874 | { | 874 | { | ||
875 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | 875 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | ||
876 | if (cl && !cl->isDesktop() && !cl->isDock()) | 876 | if (cl && !cl->isDesktop() && !cl->isDock()) { | ||
877 | Workspace::self()->sendClientToDesktop(cl, desktop, true); | 877 | Workspace::self()->sendClientToDesktop(cl, desktop, true); | ||
878 | } | 878 | } | ||
879 | } | ||||
879 | 880 | | |||
880 | void EffectsHandlerImpl::windowToScreen(EffectWindow* w, int screen) | 881 | void EffectsHandlerImpl::windowToScreen(EffectWindow* w, int screen) | ||
881 | { | 882 | { | ||
882 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | 883 | AbstractClient* cl = dynamic_cast< AbstractClient* >(static_cast<EffectWindowImpl*>(w)->window()); | ||
883 | if (cl && !cl->isDesktop() && !cl->isDock()) | 884 | if (cl && !cl->isDesktop() && !cl->isDock()) | ||
884 | Workspace::self()->sendClientToScreen(cl, screen); | 885 | Workspace::self()->sendClientToScreen(cl, screen); | ||
885 | } | 886 | } | ||
886 | 887 | | |||
▲ Show 20 Lines • Show All 849 Lines • ▼ Show 20 Line(s) | |||||
1736 | 1737 | | |||
1737 | EffectWindow* effectWindow(Toplevel* w) | 1738 | EffectWindow* effectWindow(Toplevel* w) | ||
1738 | { | 1739 | { | ||
1739 | EffectWindowImpl* ret = w->effectWindow(); | 1740 | EffectWindowImpl* ret = w->effectWindow(); | ||
1740 | return ret; | 1741 | return ret; | ||
1741 | } | 1742 | } | ||
1742 | 1743 | | |||
1743 | EffectWindow* effectWindow(Scene::Window* w) | 1744 | EffectWindow* effectWindow(Scene::Window* w) | ||
1744 | { | 1745 | { | ||
zzag: Call desks.reserve(). Also, it would be great to use std::transform. | |||||
1745 | EffectWindowImpl* ret = w->window()->effectWindow(); | 1746 | EffectWindowImpl* ret = w->window()->effectWindow(); | ||
1746 | ret->setSceneWindow(w); | 1747 | ret->setSceneWindow(w); | ||
1747 | return ret; | 1748 | return ret; | ||
1748 | } | 1749 | } | ||
1749 | 1750 | | |||
1750 | void EffectWindowImpl::elevate(bool elevate) | 1751 | void EffectWindowImpl::elevate(bool elevate) | ||
1751 | { | 1752 | { | ||
1752 | effects->setElevatedWindow(this, elevate); | 1753 | effects->setElevatedWindow(this, elevate); | ||
▲ Show 20 Lines • Show All 310 Lines • Show Last 20 Lines |
Call desks.reserve(). Also, it would be great to use std::transform.