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_FOCUS_OUTPUT,
|
||||
ACTION_TYPE_MOVE_TO_OUTPUT,
|
||||
ACTION_TYPE_FIT_TO_OUTPUT,
|
||||
ACTION_TYPE_IF,
|
||||
ACTION_TYPE_FOR_EACH,
|
||||
ACTION_TYPE_VIRTUAL_OUTPUT_ADD,
|
||||
|
|
@ -150,6 +151,7 @@ const char *action_names[] = {
|
|||
"ToggleKeybinds",
|
||||
"FocusOutput",
|
||||
"MoveToOutput",
|
||||
"FitToOutput",
|
||||
"If",
|
||||
"ForEach",
|
||||
"VirtualOutputAdd",
|
||||
|
|
@ -930,6 +932,12 @@ actions_run(struct view *activator, struct server *server,
|
|||
}
|
||||
view_move_to_output(view, target);
|
||||
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:
|
||||
if (!view) {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue