aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-10 13:21:18 -0400
committerGitHub <noreply@github.com>2017-10-10 13:21:18 -0400
commit2af261fe404839ebd4b81879f36448068a026a15 (patch)
treeab59377961c4e2941945c4a799c6fe0d2284e571 /rootston/output.c
parentfbddc81b59bdc7ce392fa0ed3ec3733067c8bafe (diff)
parent0a6f54384ceca7f639bcaa3dc27c2c407e3e5843 (diff)
Merge pull request #246 from acrisci/feature/wl-shell-fixes
wl-shell fixes (QT support)
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/rootston/output.c b/rootston/output.c
index d1b2c7de..2c061739 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -97,13 +97,39 @@ static void render_xdg_v6_popups(struct wlr_xdg_surface_v6 *surface,
}
}
+static void render_wl_shell_surface(struct wlr_wl_shell_surface *surface, struct roots_desktop *desktop,
+ struct wlr_output *wlr_output, struct timespec *when, double lx,
+ double ly, float rotation, bool is_child) {
+ if (is_child || surface->state != WLR_WL_SHELL_SURFACE_STATE_POPUP) {
+ render_surface(surface->surface, desktop, wlr_output, when,
+ lx, ly, rotation);
+ struct wlr_wl_shell_surface *popup;
+ wl_list_for_each(popup, &surface->popups, popup_link) {
+ render_wl_shell_surface(popup, desktop, wlr_output, when,
+ lx + popup->transient_state->x,
+ ly + popup->transient_state->y,
+ rotation, true);
+ }
+ }
+}
+
static void render_view(struct roots_view *view, struct roots_desktop *desktop,
struct wlr_output *wlr_output, struct timespec *when) {
- render_surface(view->wlr_surface, desktop, wlr_output, when,
- view->x, view->y, view->rotation);
- if (view->type == ROOTS_XDG_SHELL_V6_VIEW) {
+ switch (view->type) {
+ case ROOTS_XDG_SHELL_V6_VIEW:
+ render_surface(view->wlr_surface, desktop, wlr_output, when,
+ view->x, view->y, view->rotation);
render_xdg_v6_popups(view->xdg_surface_v6, desktop, wlr_output,
when, view->x, view->y, view->rotation);
+ break;
+ case ROOTS_WL_SHELL_VIEW:
+ render_wl_shell_surface(view->wl_shell_surface, desktop, wlr_output,
+ when, view->x, view->y, view->rotation, false);
+ break;
+ case ROOTS_XWAYLAND_VIEW:
+ render_surface(view->wlr_surface, desktop, wlr_output, when,
+ view->x, view->y, view->rotation);
+ break;
}
}