diff options
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 8 | ||||
-rw-r--r-- | rootston/input.c | 2 | ||||
-rw-r--r-- | rootston/main.c | 4 | ||||
-rw-r--r-- | rootston/meson.build | 2 | ||||
-rw-r--r-- | rootston/output.c | 49 | ||||
-rw-r--r-- | rootston/seat.c | 4 |
6 files changed, 16 insertions, 53 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 7da64ef8..e49d61a1 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -619,7 +619,7 @@ static bool view_at(struct roots_view *view, double lx, double ly, _surface = wlr_wl_shell_surface_surface_at(view->wl_shell_surface, view_sx, view_sy, &_sx, &_sy); break; -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND case ROOTS_XWAYLAND_VIEW: _surface = wlr_surface_surface_at(view->wlr_surface, view_sx, view_sy, &_sx, &_sy); @@ -890,14 +890,14 @@ struct roots_desktop *desktop_create(struct roots_server *server, desktop->tablet_v2 = wlr_tablet_v2_create(server->wl_display); const char *cursor_theme = NULL; -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND const char *cursor_default = ROOTS_XCURSOR_DEFAULT; #endif struct roots_cursor_config *cc = roots_config_get_cursor(config, ROOTS_CONFIG_DEFAULT_SEAT_NAME); if (cc != NULL) { cursor_theme = cc->theme; -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (cc->default_image != NULL) { cursor_default = cc->default_image; } @@ -912,7 +912,7 @@ struct roots_desktop *desktop_create(struct roots_server *server, setenv("XCURSOR_THEME", cursor_theme, 1); } -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND desktop->xcursor_manager = wlr_xcursor_manager_create(cursor_theme, ROOTS_XCURSOR_SIZE); if (desktop->xcursor_manager == NULL) { diff --git a/rootston/input.c b/rootston/input.c index b7a5f1ba..7b4001b3 100644 --- a/rootston/input.c +++ b/rootston/input.c @@ -8,7 +8,7 @@ #include <wlr/types/wlr_cursor.h> #include <wlr/util/log.h> #include <wlr/xcursor.h> -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND #include <wlr/xwayland.h> #endif #include "rootston/config.h" diff --git a/rootston/main.c b/rootston/main.c index cc3ffd3e..7e25dab1 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -53,7 +53,7 @@ int main(int argc, char **argv) { } setenv("WAYLAND_DISPLAY", socket, true); -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (server.desktop->xwayland != NULL) { struct roots_seat *xwayland_seat = input_get_seat(server.input, ROOTS_CONFIG_DEFAULT_SEAT_NAME); @@ -72,7 +72,7 @@ int main(int argc, char **argv) { } wl_display_run(server.wl_display); -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND wlr_xwayland_destroy(server.desktop->xwayland); #endif wl_display_destroy_clients(server.wl_display); diff --git a/rootston/meson.build b/rootston/meson.build index d650dc51..d41e00b0 100644 --- a/rootston/meson.build +++ b/rootston/meson.build @@ -16,7 +16,7 @@ sources = [ 'xdg_shell_v6.c', ] -if conf_data.get('WLR_HAS_XWAYLAND', false) +if conf_data.get('WLR_HAS_XWAYLAND', 0) == 1 sources += 'xwayland.c' endif diff --git a/rootston/output.c b/rootston/output.c index 9aa7de65..9ca55447 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -86,7 +86,7 @@ static void view_for_each_surface(struct roots_view *view, wlr_wl_shell_surface_for_each_surface(view->wl_shell_surface, iterator, user_data); break; -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND case ROOTS_XWAYLAND_VIEW: wlr_surface_for_each_surface(view->wlr_surface, iterator, user_data); break; @@ -94,7 +94,7 @@ static void view_for_each_surface(struct roots_view *view, } } -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND static void xwayland_children_for_each_surface( struct wlr_xwayland_surface *surface, wlr_surface_iterator_func_t iterator, struct layout_data *layout_data, @@ -157,14 +157,10 @@ static void output_for_each_surface(struct roots_output *output, if (output->fullscreen_view != NULL) { struct roots_view *view = output->fullscreen_view; - if (wlr_output->fullscreen_surface == view->wlr_surface) { - // The surface is managed by the wlr_output - return; - } view_for_each_surface(view, layout_data, iterator, user_data); -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (view->type == ROOTS_XWAYLAND_VIEW) { xwayland_children_for_each_surface(view->xwayland_surface, iterator, layout_data, user_data); @@ -388,26 +384,6 @@ static void render_layer(struct roots_output *output, &data->layout, data); } -static bool has_standalone_surface(struct roots_view *view) { - if (!wl_list_empty(&view->wlr_surface->subsurfaces)) { - return false; - } - - switch (view->type) { - case ROOTS_XDG_SHELL_V6_VIEW: - return wl_list_empty(&view->xdg_surface_v6->popups); - case ROOTS_XDG_SHELL_VIEW: - return wl_list_empty(&view->xdg_surface->popups); - case ROOTS_WL_SHELL_VIEW: - return wl_list_empty(&view->wl_shell_surface->popups); -#ifdef WLR_HAS_XWAYLAND - case ROOTS_XWAYLAND_VIEW: - return wl_list_empty(&view->xwayland_surface->children); -#endif - } - return true; -} - static void surface_send_frame_done(struct wlr_surface *surface, int sx, int sy, void *_data) { struct render_data *data = _data; @@ -459,17 +435,8 @@ static void render_output(struct roots_output *output) { output_box->y; view_move(view, view_x, view_y); - if (has_standalone_surface(view) && - wl_list_empty(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY])) { - wlr_output_set_fullscreen_surface(wlr_output, view->wlr_surface); - } else { - wlr_output_set_fullscreen_surface(wlr_output, NULL); - } - // Fullscreen views are rendered on a black background clear_color[0] = clear_color[1] = clear_color[2] = 0; - } else { - wlr_output_set_fullscreen_surface(wlr_output, NULL); } bool needs_swap; @@ -518,11 +485,6 @@ static void render_output(struct roots_output *output) { if (output->fullscreen_view != NULL) { struct roots_view *view = output->fullscreen_view; - if (wlr_output->fullscreen_surface == view->wlr_surface) { - // The output will render the fullscreen view - goto renderer_end; - } - if (view->wlr_surface != NULL) { view_for_each_surface(view, &data.layout, render_surface, &data); } @@ -530,7 +492,7 @@ static void render_output(struct roots_output *output) { // During normal rendering the xwayland window tree isn't traversed // because all windows are rendered. Here we only want to render // the fullscreen window's children so we have to traverse the tree. -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (view->type == ROOTS_XWAYLAND_VIEW) { xwayland_children_for_each_surface(view->xwayland_surface, render_surface, &data.layout, &data); @@ -556,6 +518,7 @@ static void render_output(struct roots_output *output) { &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); renderer_end: + wlr_output_render_software_cursors(wlr_output, &damage); wlr_renderer_scissor(renderer, NULL); wlr_renderer_end(renderer); @@ -593,7 +556,7 @@ static bool view_accept_damage(struct roots_output *output, if (output->fullscreen_view == view) { return true; } -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (output->fullscreen_view->type == ROOTS_XWAYLAND_VIEW && view->type == ROOTS_XWAYLAND_VIEW) { // Special case: accept damage from children diff --git a/rootston/seat.c b/rootston/seat.c index 82444dcb..95e7d6c9 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -1131,7 +1131,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { bool unfullscreen = true; -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (view && view->type == ROOTS_XWAYLAND_VIEW && view->xwayland_surface->override_redirect) { unfullscreen = false; @@ -1160,7 +1160,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { return; } -#ifdef WLR_HAS_XWAYLAND +#if WLR_HAS_XWAYLAND if (view && view->type == ROOTS_XWAYLAND_VIEW && !wlr_xwayland_or_surface_wants_focus( view->xwayland_surface)) { |