mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
implement Raise and Focus actions
This commit is contained in:
parent
3a3b484898
commit
fc0c06d4c4
1 changed files with 12 additions and 0 deletions
12
src/action.c
12
src/action.c
|
|
@ -67,6 +67,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
|
||||||
if (view) {
|
if (view) {
|
||||||
view_toggle_decorations(view);
|
view_toggle_decorations(view);
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(action, "Focus")) {
|
||||||
|
struct view *view = desktop_view_at_cursor(server);
|
||||||
|
if (view) {
|
||||||
|
desktop_focus_and_activate_view(&server->seat, view);
|
||||||
|
damage_all_outputs(server);
|
||||||
|
}
|
||||||
} else if (!strcasecmp(action, "Iconify")) {
|
} else if (!strcasecmp(action, "Iconify")) {
|
||||||
struct view *view = desktop_focused_view(server);
|
struct view *view = desktop_focused_view(server);
|
||||||
if (view) {
|
if (view) {
|
||||||
|
|
@ -77,6 +83,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
|
||||||
if (view) {
|
if (view) {
|
||||||
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
|
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(action, "Raise")) {
|
||||||
|
struct view *view = desktop_focused_view(server);
|
||||||
|
if (view) {
|
||||||
|
desktop_raise_view(view);
|
||||||
|
damage_all_outputs(server);
|
||||||
|
}
|
||||||
} else if (!strcasecmp(action, "Resize")) {
|
} else if (!strcasecmp(action, "Resize")) {
|
||||||
struct view *view = desktop_view_at_cursor(server);
|
struct view *view = desktop_view_at_cursor(server);
|
||||||
if (view) {
|
if (view) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue