view: forbid mode change if cursor target
Making a floating view tiled during a resize breaks things badly.
This commit is contained in:
@ -36,6 +36,9 @@ pub fn toggleFloat(
|
||||
// Don't float fullscreen views
|
||||
if (view.pending.fullscreen) return;
|
||||
|
||||
// Don't modify views which are the target of a cursor action
|
||||
if (seat.input_manager.isCursorActionTarget(view)) return;
|
||||
|
||||
if (!view.pending.float) view.pending.box = view.float_box;
|
||||
view.pending.float = !view.pending.float;
|
||||
view.output.root.arrange();
|
||||
|
@ -30,7 +30,12 @@ pub fn toggleFullscreen(
|
||||
if (args.len > 1) return Error.TooManyArguments;
|
||||
|
||||
if (seat.focused == .view) {
|
||||
seat.focused.view.setFullscreen(!seat.focused.view.pending.fullscreen);
|
||||
seat.focused.view.output.root.arrange();
|
||||
const view = seat.focused.view;
|
||||
|
||||
// Don't modify views which are the target of a cursor action
|
||||
if (seat.input_manager.isCursorActionTarget(view)) return;
|
||||
|
||||
view.setFullscreen(!seat.focused.view.pending.fullscreen);
|
||||
view.output.root.arrange();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user