mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
action: Add HideCursor action
This commit is contained in:
parent
4ef881bb3e
commit
d6edb8b273
2 changed files with 11 additions and 0 deletions
|
|
@ -351,6 +351,12 @@ Actions are used in menus and keyboard/mouse bindings.
|
||||||
*y* [center|value] Equivalent for the vertical warp position within the target area.
|
*y* [center|value] Equivalent for the vertical warp position within the target area.
|
||||||
Default is "center"
|
Default is "center"
|
||||||
|
|
||||||
|
*<action name="HideCursor" />*
|
||||||
|
Hide the pointer or stylus cursor. The cursor becomes visible again on following
|
||||||
|
pointer actions, stylus actions or touchpad gestures.
|
||||||
|
Use together with the WarpCursor action to not just hide the cursor but to
|
||||||
|
additionally move it away to prevent e.g. hover effects.
|
||||||
|
|
||||||
*<action name="EnableTabletMouseEmulation" />*++
|
*<action name="EnableTabletMouseEmulation" />*++
|
||||||
*<action name="DisableTabletMouseEmulation" />*++
|
*<action name="DisableTabletMouseEmulation" />*++
|
||||||
*<action name="ToggleTabletMouseEmulation">*
|
*<action name="ToggleTabletMouseEmulation">*
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ enum action_type {
|
||||||
ACTION_TYPE_ZOOM_IN,
|
ACTION_TYPE_ZOOM_IN,
|
||||||
ACTION_TYPE_ZOOM_OUT,
|
ACTION_TYPE_ZOOM_OUT,
|
||||||
ACTION_TYPE_WARP_CURSOR,
|
ACTION_TYPE_WARP_CURSOR,
|
||||||
|
ACTION_TYPE_HIDE_CURSOR,
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *action_names[] = {
|
const char *action_names[] = {
|
||||||
|
|
@ -188,6 +189,7 @@ const char *action_names[] = {
|
||||||
"ZoomIn",
|
"ZoomIn",
|
||||||
"ZoomOut",
|
"ZoomOut",
|
||||||
"WarpCursor",
|
"WarpCursor",
|
||||||
|
"HideCursor",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1335,6 +1337,9 @@ actions_run(struct view *activator, struct server *server,
|
||||||
warp_cursor(view, output, to, x, y);
|
warp_cursor(view, output, to, x, y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ACTION_TYPE_HIDE_CURSOR:
|
||||||
|
cursor_set_visible(&server->seat, false);
|
||||||
|
break;
|
||||||
case ACTION_TYPE_INVALID:
|
case ACTION_TYPE_INVALID:
|
||||||
wlr_log(WLR_ERROR, "Not executing unknown action");
|
wlr_log(WLR_ERROR, "Not executing unknown action");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue