Changeset View
Changeset View
Standalone View
Standalone View
useractions.cpp
Show First 20 Lines • Show All 1558 Lines • ▼ Show 20 Line(s) | |||||
1559 | { | 1559 | { | ||
1560 | VirtualDesktopManager *vds = VirtualDesktopManager::self(); | 1560 | VirtualDesktopManager *vds = VirtualDesktopManager::self(); | ||
1561 | Workspace *ws = Workspace::self(); | 1561 | Workspace *ws = Workspace::self(); | ||
1562 | Direction functor; | 1562 | Direction functor; | ||
1563 | // TODO: why is options->isRollOverDesktops() not honored? | 1563 | // TODO: why is options->isRollOverDesktops() not honored? | ||
1564 | const auto desktop = functor(nullptr, true); | 1564 | const auto desktop = functor(nullptr, true); | ||
1565 | if (c && !c->isDesktop() | 1565 | if (c && !c->isDesktop() | ||
1566 | && !c->isDock()) { | 1566 | && !c->isDock()) { | ||
1567 | ws->setClientIsMoving(c); | 1567 | ws->setMoveResizeClient(c); | ||
1568 | vds->setCurrent(desktop); | 1568 | vds->setCurrent(desktop); | ||
1569 | ws->setClientIsMoving(NULL); | 1569 | ws->setMoveResizeClient(nullptr); | ||
1570 | } | 1570 | } | ||
1571 | } | 1571 | } | ||
1572 | 1572 | | |||
1573 | /** | 1573 | /** | ||
1574 | * Moves the active client to the next desktop. | 1574 | * Moves the active client to the next desktop. | ||
1575 | **/ | 1575 | **/ | ||
1576 | void Workspace::slotWindowToNextDesktop() | 1576 | void Workspace::slotWindowToNextDesktop() | ||
1577 | { | 1577 | { | ||
Show All 26 Lines | 1603 | { | |||
1604 | VirtualDesktopManager *vds = VirtualDesktopManager::self(); | 1604 | VirtualDesktopManager *vds = VirtualDesktopManager::self(); | ||
1605 | Workspace *ws = Workspace::self(); | 1605 | Workspace *ws = Workspace::self(); | ||
1606 | const int current = vds->current(); | 1606 | const int current = vds->current(); | ||
1607 | Direction functor; | 1607 | Direction functor; | ||
1608 | const int d = functor(current, options->isRollOverDesktops()); | 1608 | const int d = functor(current, options->isRollOverDesktops()); | ||
1609 | if (d == current) { | 1609 | if (d == current) { | ||
1610 | return; | 1610 | return; | ||
1611 | } | 1611 | } | ||
1612 | ws->setClientIsMoving(ws->activeClient()); | 1612 | ws->setMoveResizeClient(ws->activeClient()); | ||
1613 | vds->setCurrent(d); | 1613 | vds->setCurrent(d); | ||
1614 | ws->setClientIsMoving(NULL); | 1614 | ws->setMoveResizeClient(nullptr); | ||
1615 | } | 1615 | } | ||
1616 | 1616 | | |||
1617 | void Workspace::slotWindowToDesktopRight() | 1617 | void Workspace::slotWindowToDesktopRight() | ||
1618 | { | 1618 | { | ||
1619 | if (USABLE_ACTIVE_CLIENT) { | 1619 | if (USABLE_ACTIVE_CLIENT) { | ||
1620 | activeClientToDesktop<DesktopRight>(); | 1620 | activeClientToDesktop<DesktopRight>(); | ||
1621 | } | 1621 | } | ||
1622 | } | 1622 | } | ||
▲ Show 20 Lines • Show All 302 Lines • Show Last 20 Lines |