Changeset View
Changeset View
Standalone View
Standalone View
placement.cpp
Show First 20 Lines • Show All 833 Lines • ▼ Show 20 Line(s) | 833 | if (geom.height() <= 1) | |||
---|---|---|---|---|---|
834 | return; | 834 | return; | ||
835 | geom.setSize(adjustedSize(geom.size(), SizemodeFixedH)); | 835 | geom.setSize(adjustedSize(geom.size(), SizemodeFixedH)); | ||
836 | if (geom.height() > 20) { | 836 | if (geom.height() > 20) { | ||
837 | workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event; | 837 | workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event; | ||
838 | setGeometry(geom); | 838 | setGeometry(geom); | ||
839 | } | 839 | } | ||
840 | } | 840 | } | ||
841 | 841 | | |||
842 | 842 | void Workspace::quickTileWindow(QuickTileMode mode) | |||
843 | void Workspace::slotWindowQuickTileLeft() | | |||
844 | { | | |||
845 | if (!active_client) | | |||
846 | return; | | |||
847 | | ||||
848 | active_client->setQuickTileMode(Client::QuickTileLeft, true); | | |||
849 | } | | |||
850 | | ||||
851 | void Workspace::slotWindowQuickTileRight() | | |||
852 | { | | |||
853 | if (!active_client) | | |||
854 | return; | | |||
855 | | ||||
856 | active_client->setQuickTileMode(Client::QuickTileRight, true); | | |||
857 | } | | |||
858 | | ||||
859 | void Workspace::slotWindowQuickTileTop() | | |||
860 | { | | |||
861 | if (!active_client) | | |||
862 | return; | | |||
863 | | ||||
864 | active_client->setQuickTileMode(Client::QuickTileTop, true); | | |||
865 | } | | |||
866 | | ||||
867 | void Workspace::slotWindowQuickTileBottom() | | |||
868 | { | | |||
869 | if (!active_client) | | |||
870 | return; | | |||
871 | | ||||
872 | active_client->setQuickTileMode(Client::QuickTileBottom, true); | | |||
873 | } | | |||
874 | | ||||
875 | void Workspace::slotWindowQuickTileTopLeft() | | |||
876 | { | | |||
877 | if (!active_client) { | | |||
878 | return; | | |||
879 | } | | |||
880 | active_client->setQuickTileMode(Client::QuickTileTop|Client::QuickTileLeft, true); | | |||
881 | } | | |||
882 | | ||||
883 | void Workspace::slotWindowQuickTileTopRight() | | |||
884 | { | 843 | { | ||
885 | if (!active_client) { | 844 | if (!active_client) { | ||
886 | return; | 845 | return; | ||
887 | } | 846 | } | ||
888 | active_client->setQuickTileMode(Client::QuickTileTop|Client::QuickTileRight, true); | | |||
889 | } | | |||
890 | 847 | | |||
891 | void Workspace::slotWindowQuickTileBottomLeft() | 848 | active_client->setQuickTileMode(mode, true); | ||
892 | { | | |||
893 | if (!active_client) { | | |||
894 | return; | | |||
895 | } | | |||
896 | active_client->setQuickTileMode(Client::QuickTileBottom|Client::QuickTileLeft, true); | | |||
897 | } | | |||
898 | | ||||
899 | void Workspace::slotWindowQuickTileBottomRight() | | |||
900 | { | | |||
901 | if (!active_client) { | | |||
902 | return; | | |||
903 | } | | |||
904 | active_client->setQuickTileMode(Client::QuickTileBottom|Client::QuickTileRight, true); | | |||
905 | } | 849 | } | ||
906 | 850 | | |||
907 | int Workspace::packPositionLeft(const AbstractClient* cl, int oldx, bool left_edge) const | 851 | int Workspace::packPositionLeft(const AbstractClient* cl, int oldx, bool left_edge) const | ||
908 | { | 852 | { | ||
909 | int newx = clientArea(MaximizeArea, cl).left(); | 853 | int newx = clientArea(MaximizeArea, cl).left(); | ||
910 | if (oldx <= newx) // try another Xinerama screen | 854 | if (oldx <= newx) // try another Xinerama screen | ||
911 | newx = clientArea(MaximizeArea, | 855 | newx = clientArea(MaximizeArea, | ||
912 | QPoint(cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left(); | 856 | QPoint(cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left(); | ||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |