mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
action: add FitToOutput
This commit is contained in:
parent
aa0e7523c3
commit
6391f9bcb2
1 changed files with 8 additions and 0 deletions
|
|
@ -98,6 +98,7 @@ enum action_type {
|
||||||
ACTION_TYPE_TOGGLE_KEYBINDS,
|
ACTION_TYPE_TOGGLE_KEYBINDS,
|
||||||
ACTION_TYPE_FOCUS_OUTPUT,
|
ACTION_TYPE_FOCUS_OUTPUT,
|
||||||
ACTION_TYPE_MOVE_TO_OUTPUT,
|
ACTION_TYPE_MOVE_TO_OUTPUT,
|
||||||
|
ACTION_TYPE_FIT_TO_OUTPUT,
|
||||||
ACTION_TYPE_IF,
|
ACTION_TYPE_IF,
|
||||||
ACTION_TYPE_FOR_EACH,
|
ACTION_TYPE_FOR_EACH,
|
||||||
ACTION_TYPE_VIRTUAL_OUTPUT_ADD,
|
ACTION_TYPE_VIRTUAL_OUTPUT_ADD,
|
||||||
|
|
@ -150,6 +151,7 @@ const char *action_names[] = {
|
||||||
"ToggleKeybinds",
|
"ToggleKeybinds",
|
||||||
"FocusOutput",
|
"FocusOutput",
|
||||||
"MoveToOutput",
|
"MoveToOutput",
|
||||||
|
"FitToOutput",
|
||||||
"If",
|
"If",
|
||||||
"ForEach",
|
"ForEach",
|
||||||
"VirtualOutputAdd",
|
"VirtualOutputAdd",
|
||||||
|
|
@ -930,6 +932,12 @@ actions_run(struct view *activator, struct server *server,
|
||||||
}
|
}
|
||||||
view_move_to_output(view, target);
|
view_move_to_output(view, target);
|
||||||
break;
|
break;
|
||||||
|
case ACTION_TYPE_FIT_TO_OUTPUT:
|
||||||
|
if (!view) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
view_constrain_size_to_that_of_usable_area(view);
|
||||||
|
break;
|
||||||
case ACTION_TYPE_SNAP_TO_REGION:
|
case ACTION_TYPE_SNAP_TO_REGION:
|
||||||
if (!view) {
|
if (!view) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue