mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
workspaces: Switch workspace when activating via panel
This commit is contained in:
parent
282620589d
commit
c77ccb8903
1 changed files with 4 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
#include "labwc.h"
|
#include "labwc.h"
|
||||||
|
#include "workspaces.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_toplevel_handle_request_minimize(struct wl_listener *listener, void *data)
|
handle_toplevel_handle_request_minimize(struct wl_listener *listener, void *data)
|
||||||
|
|
@ -42,6 +43,9 @@ handle_toplevel_handle_request_activate(struct wl_listener *listener, void *data
|
||||||
// struct wlr_foreign_toplevel_handle_v1_activated_event *event = data;
|
// struct wlr_foreign_toplevel_handle_v1_activated_event *event = data;
|
||||||
/* In a multi-seat world we would select seat based on event->seat here. */
|
/* In a multi-seat world we would select seat based on event->seat here. */
|
||||||
if (view) {
|
if (view) {
|
||||||
|
if (view->workspace != view->server->workspace_current) {
|
||||||
|
workspaces_switch_to(view->workspace);
|
||||||
|
}
|
||||||
desktop_focus_and_activate_view(&view->server->seat, view);
|
desktop_focus_and_activate_view(&view->server->seat, view);
|
||||||
desktop_move_to_front(view);
|
desktop_move_to_front(view);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue