forge
Explore
Log in

Don't you dare go Hollow

Make right click during move toggle floating

Browse files at this commit

1aa60f0da3e7f1a0bf50d6b88d59db6ba094d4f0Ivan MolodetskikhParent: bd1fd83
src/input/move_grab.rsmodified+10 -0
@@ -123,6 +123,16 @@ impl PointerGrab<State> for MoveGrab {
123123 }
124124 }
125125
126+ // When moving with the left button, right toggles floating, and vice versa.
127+ let toggle_floating_button = if self.start_data.button == 0x110 {
128+ 0x111
129+ } else {
130+ 0x110
131+ };
132+ if event.button == toggle_floating_button && event.state == ButtonState::Pressed {
133+ data.niri.layout.toggle_window_floating(Some(&self.window));
134+ }
135+
126136 if !handle.current_pressed().contains(&self.start_data.button) {
127137 // The button that initiated the grab was released.
128138 handle.unset_grab(self, data, event.serial, event.time, true);