mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Make desktop_focus_view() always switch to the workspace containing the view being focused. It doesn't make much sense for an invisible view to have the keyboard focus. Also add an optional "raise" parameter to desktop_focus_view(). This allows the common pattern of desktop_focus_view() + view_move_to_front() to be reduced to a single function call.
31 lines
827 B
C
31 lines
827 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_WORKSPACES_H
|
|
#define LABWC_WORKSPACES_H
|
|
|
|
#include <stdbool.h>
|
|
#include <wayland-util.h>
|
|
|
|
struct seat;
|
|
struct server;
|
|
struct wlr_scene_tree;
|
|
|
|
/* Double use: as config in config/rcxml.c and as instance in workspaces.c */
|
|
struct workspace {
|
|
struct wl_list link; /*
|
|
* struct server.workspaces
|
|
* struct rcxml.workspace_config.workspaces
|
|
*/
|
|
struct server *server;
|
|
|
|
char *name;
|
|
struct wlr_scene_tree *tree;
|
|
};
|
|
|
|
void workspaces_init(struct server *server);
|
|
void workspaces_switch_to(struct workspace *target, bool update_focus);
|
|
void workspaces_destroy(struct server *server);
|
|
void workspaces_osd_hide(struct seat *seat);
|
|
struct workspace *workspaces_find(struct workspace *anchor, const char *name,
|
|
bool wrap);
|
|
|
|
#endif /* LABWC_WORKSPACES_H */
|