Deprecate MoveToCursor

Use <action name="AutoPlace" policy="cursor"/> instead.

Related-to: #1785
Suggested-by: @tokyo4j
This commit is contained in:
Johan Malm 2024-05-19 16:50:53 +01:00 committed by Consolatis
parent 941290fb4b
commit bab1be834d
2 changed files with 6 additions and 0 deletions

View file

@ -83,6 +83,9 @@ Actions are used in menus and keyboard/mouse bindings.
*<action name="MoveToCursor" />* *<action name="MoveToCursor" />*
Move to be centered on cursor. Move to be centered on cursor.
Tries to prevent any part of the window from going off-screen. Tries to prevent any part of the window from going off-screen.
This action is deprecated from v0.7.3. To ensure your config works in
future labwc releases, please use:
*<action name="AutoPlace" policy="cursor">*
*<action name="MoveRelative" x="" y="" />* *<action name="MoveRelative" x="" y="" />*
Move window relative to its current position. Positive value of x moves Move window relative to its current position. Positive value of x moves

View file

@ -904,6 +904,9 @@ actions_run(struct view *activator, struct server *server,
} }
break; break;
case ACTION_TYPE_MOVETO_CURSOR: case ACTION_TYPE_MOVETO_CURSOR:
wlr_log(WLR_ERROR,
"Action MoveToCursor is deprecated. To ensure your config works in future labwc "
"releases, please use <action name=\"AutoPlace\" policy=\"cursor\">");
if (view) { if (view) {
view_move_to_cursor(view); view_move_to_cursor(view);
} }