mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 03:11:27 +00:00
Update for wlroots!3814
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3814
This commit is contained in:
parent
717e9ef581
commit
7623292734
|
@ -34,6 +34,7 @@ struct sway_server {
|
||||||
const char *socket;
|
const char *socket;
|
||||||
|
|
||||||
struct wlr_backend *backend;
|
struct wlr_backend *backend;
|
||||||
|
struct wlr_session *session;
|
||||||
// secondary headless backend used for creating virtual outputs on-the-fly
|
// secondary headless backend used for creating virtual outputs on-the-fly
|
||||||
struct wlr_backend *headless_backend;
|
struct wlr_backend *headless_backend;
|
||||||
struct wlr_renderer *renderer;
|
struct wlr_renderer *renderer;
|
||||||
|
|
|
@ -264,13 +264,9 @@ static bool keyboard_execute_compositor_binding(struct sway_keyboard *keyboard,
|
||||||
xkb_keysym_t keysym = pressed_keysyms[i];
|
xkb_keysym_t keysym = pressed_keysyms[i];
|
||||||
if (keysym >= XKB_KEY_XF86Switch_VT_1 &&
|
if (keysym >= XKB_KEY_XF86Switch_VT_1 &&
|
||||||
keysym <= XKB_KEY_XF86Switch_VT_12) {
|
keysym <= XKB_KEY_XF86Switch_VT_12) {
|
||||||
if (wlr_backend_is_multi(server.backend)) {
|
if (server.session) {
|
||||||
struct wlr_session *session =
|
unsigned vt = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
|
||||||
wlr_backend_get_session(server.backend);
|
wlr_session_change_vt(server.session, vt);
|
||||||
if (session) {
|
|
||||||
unsigned vt = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
|
|
||||||
wlr_session_change_vt(session, vt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ bool server_init(struct sway_server *server) {
|
||||||
sway_log(SWAY_DEBUG, "Initializing Wayland server");
|
sway_log(SWAY_DEBUG, "Initializing Wayland server");
|
||||||
server->wl_display = wl_display_create();
|
server->wl_display = wl_display_create();
|
||||||
server->wl_event_loop = wl_display_get_event_loop(server->wl_display);
|
server->wl_event_loop = wl_display_get_event_loop(server->wl_display);
|
||||||
server->backend = wlr_backend_autocreate(server->wl_display);
|
|
||||||
|
|
||||||
|
server->backend = wlr_backend_autocreate(server->wl_display, &server->session);
|
||||||
if (!server->backend) {
|
if (!server->backend) {
|
||||||
sway_log(SWAY_ERROR, "Unable to create backend");
|
sway_log(SWAY_ERROR, "Unable to create backend");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue