forge
Explore
Log in

Don't you dare go Hollow

Stub out actions when floating is active

Browse files at this commit

c2e4cfd832953a9974572e3e1805bfbe4c3375efIvan MolodetskikhParent: c008e1c
Make sure they don't go to the unfocused scrolling layout at least.
src/layout/workspace.rsmodified+84 -0
@@ -747,74 +747,140 @@ impl<W: LayoutElement> Workspace<W> {
747 }747 }
748 748
749 pub fn focus_left(&mut self) -> bool {749 pub fn focus_left(&mut self) -> bool {
750+ // TODO
751+ if self.floating_is_active {
752+ return true;
753+ }
750 self.scrolling.focus_left()754 self.scrolling.focus_left()
751 }755 }
752 756
753 pub fn focus_right(&mut self) -> bool {757 pub fn focus_right(&mut self) -> bool {
758+ // TODO
759+ if self.floating_is_active {
760+ return true;
761+ }
754 self.scrolling.focus_right()762 self.scrolling.focus_right()
755 }763 }
756 764
757 pub fn focus_column_first(&mut self) {765 pub fn focus_column_first(&mut self) {
766+ // TODO
767+ if self.floating_is_active {
768+ return;
769+ }
758 self.scrolling.focus_column_first();770 self.scrolling.focus_column_first();
759 }771 }
760 772
761 pub fn focus_column_last(&mut self) {773 pub fn focus_column_last(&mut self) {
774+ // TODO
775+ if self.floating_is_active {
776+ return;
777+ }
762 self.scrolling.focus_column_last();778 self.scrolling.focus_column_last();
763 }779 }
764 780
765 pub fn focus_column_right_or_first(&mut self) {781 pub fn focus_column_right_or_first(&mut self) {
782+ // TODO
783+ if self.floating_is_active {
784+ return;
785+ }
766 self.scrolling.focus_column_right_or_first();786 self.scrolling.focus_column_right_or_first();
767 }787 }
768 788
769 pub fn focus_column_left_or_last(&mut self) {789 pub fn focus_column_left_or_last(&mut self) {
790+ // TODO
791+ if self.floating_is_active {
792+ return;
793+ }
770 self.scrolling.focus_column_left_or_last();794 self.scrolling.focus_column_left_or_last();
771 }795 }
772 796
773 pub fn focus_down(&mut self) -> bool {797 pub fn focus_down(&mut self) -> bool {
798+ // TODO
799+ if self.floating_is_active {
800+ return true;
801+ }
774 self.scrolling.focus_down()802 self.scrolling.focus_down()
775 }803 }
776 804
777 pub fn focus_up(&mut self) -> bool {805 pub fn focus_up(&mut self) -> bool {
806+ // TODO
807+ if self.floating_is_active {
808+ return true;
809+ }
778 self.scrolling.focus_up()810 self.scrolling.focus_up()
779 }811 }
780 812
781 pub fn focus_down_or_left(&mut self) {813 pub fn focus_down_or_left(&mut self) {
814+ // TODO
815+ if self.floating_is_active {
816+ return;
817+ }
782 self.scrolling.focus_down_or_left();818 self.scrolling.focus_down_or_left();
783 }819 }
784 820
785 pub fn focus_down_or_right(&mut self) {821 pub fn focus_down_or_right(&mut self) {
822+ // TODO
823+ if self.floating_is_active {
824+ return;
825+ }
786 self.scrolling.focus_down_or_right();826 self.scrolling.focus_down_or_right();
787 }827 }
788 828
789 pub fn focus_up_or_left(&mut self) {829 pub fn focus_up_or_left(&mut self) {
830+ // TODO
831+ if self.floating_is_active {
832+ return;
833+ }
790 self.scrolling.focus_up_or_left();834 self.scrolling.focus_up_or_left();
791 }835 }
792 836
793 pub fn focus_up_or_right(&mut self) {837 pub fn focus_up_or_right(&mut self) {
838+ // TODO
839+ if self.floating_is_active {
840+ return;
841+ }
794 self.scrolling.focus_up_or_right();842 self.scrolling.focus_up_or_right();
795 }843 }
796 844
797 pub fn move_left(&mut self) -> bool {845 pub fn move_left(&mut self) -> bool {
846+ if self.floating_is_active {
847+ return true;
848+ }
798 self.scrolling.move_left()849 self.scrolling.move_left()
799 }850 }
800 851
801 pub fn move_right(&mut self) -> bool {852 pub fn move_right(&mut self) -> bool {
853+ if self.floating_is_active {
854+ return true;
855+ }
802 self.scrolling.move_right()856 self.scrolling.move_right()
803 }857 }
804 858
805 pub fn move_column_to_first(&mut self) {859 pub fn move_column_to_first(&mut self) {
860+ if self.floating_is_active {
861+ return;
862+ }
806 self.scrolling.move_column_to_first();863 self.scrolling.move_column_to_first();
807 }864 }
808 865
809 pub fn move_column_to_last(&mut self) {866 pub fn move_column_to_last(&mut self) {
867+ if self.floating_is_active {
868+ return;
869+ }
810 self.scrolling.move_column_to_last();870 self.scrolling.move_column_to_last();
811 }871 }
812 872
813 pub fn move_down(&mut self) -> bool {873 pub fn move_down(&mut self) -> bool {
874+ if self.floating_is_active {
875+ return true;
876+ }
814 self.scrolling.move_down()877 self.scrolling.move_down()
815 }878 }
816 879
817 pub fn move_up(&mut self) -> bool {880 pub fn move_up(&mut self) -> bool {
881+ if self.floating_is_active {
882+ return true;
883+ }
818 self.scrolling.move_up()884 self.scrolling.move_up()
819 }885 }
820 886
@@ -833,22 +899,40 @@ impl<W: LayoutElement> Workspace<W> {
833 }899 }
834 900
835 pub fn consume_into_column(&mut self) {901 pub fn consume_into_column(&mut self) {
902+ if self.floating_is_active {
903+ return;
904+ }
836 self.scrolling.consume_into_column();905 self.scrolling.consume_into_column();
837 }906 }
838 907
839 pub fn expel_from_column(&mut self) {908 pub fn expel_from_column(&mut self) {
909+ if self.floating_is_active {
910+ return;
911+ }
840 self.scrolling.expel_from_column();912 self.scrolling.expel_from_column();
841 }913 }
842 914
843 pub fn center_column(&mut self) {915 pub fn center_column(&mut self) {
916+ // TODO
917+ if self.floating_is_active {
918+ return;
919+ }
844 self.scrolling.center_column();920 self.scrolling.center_column();
845 }921 }
846 922
847 pub fn toggle_width(&mut self) {923 pub fn toggle_width(&mut self) {
924+ // TODO
925+ if self.floating_is_active {
926+ return;
927+ }
848 self.scrolling.toggle_width();928 self.scrolling.toggle_width();
849 }929 }
850 930
851 pub fn toggle_full_width(&mut self) {931 pub fn toggle_full_width(&mut self) {
932+ // TODO
933+ if self.floating_is_active {
934+ return;
935+ }
852 self.scrolling.toggle_full_width();936 self.scrolling.toggle_full_width();
853 }937 }
854 938