mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
action: add support for <prompt> in 'If' actions
...and allow If Action without activator view.
For example:
<action name="If">
<prompt message="Toggle maximize?"/>
<then>
<action name="ToggleMaximize" />
</then>
</action>
Also revert the change in b9c84f9 that <else> branch is always taken when
no window is focused.
Co-Authored-by: johanmalm
Co-Authored-by: tokyo4j
This commit is contained in:
parent
32e308b5d5
commit
fba73a0036
3 changed files with 135 additions and 14 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#define LABWC_ACTION_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <wayland-util.h>
|
||||
|
||||
struct view;
|
||||
|
|
@ -47,6 +48,8 @@ bool actions_contain_toggle_keybinds(struct wl_list *action_list);
|
|||
void actions_run(struct view *activator, struct server *server,
|
||||
struct wl_list *actions, struct cursor_context *ctx);
|
||||
|
||||
bool action_check_prompt_result(pid_t pid, int exit_code);
|
||||
|
||||
void action_free(struct action *action);
|
||||
void action_list_free(struct wl_list *action_list);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue