aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-13 14:47:32 -0500
committerGitHub <noreply@github.com>2018-11-13 14:47:32 -0500
commit040d62de0076a349612b7c2c28c5dc5e93bb9760 (patch)
treeedc8a95751531a3d62423d1e5630ea0eb98d3ffe /rootston/output.c
parentdf7d4a71fb52d47279a93ee398220ff63d916ab7 (diff)
parent1b9ebcf6452c913603d38da2685c56e55ee13063 (diff)
Merge pull request #1366 from emersion/render-software-cursors
Render software cursors in compositor
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 01fcae98..9ca55447 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -157,10 +157,6 @@ 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);
@@ -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);
-#if 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);
}
@@ -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);