mirror of
https://github.com/labwc/labwc.git
synced 2026-03-20 05:34:12 -04:00
Chase wlroots: wlr_session refactor
Chases 41b7acbab78597e2eb0724e415ed94b910d113c1 backend: return wlr_session in wlr_backend_autocreate() call
This commit is contained in:
parent
fa849cc7e8
commit
46e3e29e26
4 changed files with 5 additions and 9 deletions
|
|
@ -201,6 +201,7 @@ struct server {
|
||||||
struct wlr_renderer *renderer;
|
struct wlr_renderer *renderer;
|
||||||
struct wlr_allocator *allocator;
|
struct wlr_allocator *allocator;
|
||||||
struct wlr_backend *backend;
|
struct wlr_backend *backend;
|
||||||
|
struct wlr_session *session;
|
||||||
|
|
||||||
struct wlr_xdg_shell *xdg_shell;
|
struct wlr_xdg_shell *xdg_shell;
|
||||||
struct wlr_layer_shell_v1 *layer_shell;
|
struct wlr_layer_shell_v1 *layer_shell;
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,7 @@ static bool should_cancel_cycling_on_next_key_release;
|
||||||
static void
|
static void
|
||||||
change_vt(struct server *server, unsigned int vt)
|
change_vt(struct server *server, unsigned int vt)
|
||||||
{
|
{
|
||||||
if (!wlr_backend_is_multi(server->backend)) {
|
wlr_session_change_vt(server->session, vt);
|
||||||
return;
|
|
||||||
}
|
|
||||||
struct wlr_session *session = wlr_backend_get_session(server->backend);
|
|
||||||
if (session) {
|
|
||||||
wlr_session_change_vt(session, vt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,8 @@ server_init(struct server *server)
|
||||||
* backend based on the current environment, such as opening an x11
|
* backend based on the current environment, such as opening an x11
|
||||||
* window if an x11 server is running.
|
* window if an x11 server is running.
|
||||||
*/
|
*/
|
||||||
server->backend = wlr_backend_autocreate(server->wl_display);
|
server->backend = wlr_backend_autocreate(
|
||||||
|
server->wl_display, &server->session);
|
||||||
if (!server->backend) {
|
if (!server->backend) {
|
||||||
wlr_log(WLR_ERROR, "unable to create backend");
|
wlr_log(WLR_ERROR, "unable to create backend");
|
||||||
fprintf(stderr, helpful_seat_error_message);
|
fprintf(stderr, helpful_seat_error_message);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://gitlab.freedesktop.org/wlroots/wlroots.git
|
url = https://gitlab.freedesktop.org/wlroots/wlroots.git
|
||||||
revision = 258bf9be1e44d8a2fb953d727ff4ffcf9ebd6503
|
revision = e7c556fcf61eb3121d741cd4da526b2619862678
|
||||||
|
|
||||||
[provide]
|
[provide]
|
||||||
dependency_names = wlroots
|
dependency_names = wlroots
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue