diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-04 22:12:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 22:12:32 -0400 |
commit | 21aedf15052df4e7f8ee72922fa0e214d690facc (patch) | |
tree | 42039b2d318ab944dd148990329b4a2cf94fd9a3 /sway/desktop | |
parent | 5a646221815f6793f844412b82b185b415b32157 (diff) | |
parent | 44b8d30f5254628f8e6d5a12010f6e5f810d756e (diff) |
Merge pull request #1732 from emersion/view-children
Update for wlroots#824
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 11 | ||||
-rw-r--r-- | sway/desktop/wl_shell.c | 4 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 4 |
4 files changed, 10 insertions, 13 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6cf5da48..0e8a9485 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -188,7 +188,7 @@ static void render_view(struct sway_container *view, void *data) { } switch (sway_view->type) { - case SWAY_XDG_SHELL_V6_VIEW: { + case SWAY_VIEW_XDG_SHELL_V6: { int window_offset_x = view->sway_view->wlr_xdg_surface_v6->geometry.x; int window_offset_y = view->sway_view->wlr_xdg_surface_v6->geometry.y; render_surface(surface, wlr_output, when, @@ -197,15 +197,12 @@ static void render_view(struct sway_container *view, void *data) { when, view->x - window_offset_x, view->y - window_offset_y, 0, alpha); break; } - case SWAY_WL_SHELL_VIEW: + case SWAY_VIEW_WL_SHELL: render_wl_shell_surface(sway_view->wlr_wl_shell_surface, wlr_output, when, view->x, view->y, 0, alpha, false); break; - case SWAY_XWAYLAND_VIEW: - render_surface(surface, wlr_output, when, view->x, view->y, - 0, alpha); - break; - default: + case SWAY_VIEW_XWAYLAND: + render_surface(surface, wlr_output, when, view->x, view->y, 0, alpha); break; } } diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c index 6528a397..a470674d 100644 --- a/sway/desktop/wl_shell.c +++ b/sway/desktop/wl_shell.c @@ -12,7 +12,7 @@ #include "log.h" static bool assert_wl_shell(struct sway_view *view) { - return sway_assert(view->type == SWAY_WL_SHELL_VIEW, + return sway_assert(view->type == SWAY_VIEW_WL_SHELL, "Expecting wl_shell view!"); } @@ -97,7 +97,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { return; } - struct sway_view *view = view_create(SWAY_WL_SHELL_VIEW, &view_impl); + struct sway_view *view = view_create(SWAY_VIEW_WL_SHELL, &view_impl); if (!sway_assert(view, "Failed to allocate view")) { return; } diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 49305b39..5cdb8f9f 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -12,7 +12,7 @@ #include "log.h" static bool assert_xdg(struct sway_view *view) { - return sway_assert(view->type == SWAY_XDG_SHELL_V6_VIEW, + return sway_assert(view->type == SWAY_VIEW_XDG_SHELL_V6, "Expected xdg shell v6 view!"); } @@ -126,7 +126,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { return; } - struct sway_view *view = view_create(SWAY_XDG_SHELL_V6_VIEW, &view_impl); + struct sway_view *view = view_create(SWAY_VIEW_XDG_SHELL_V6, &view_impl); if (!sway_assert(view, "Failed to allocate view")) { return; } diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index bfef68cf..a793928c 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -42,7 +42,7 @@ static void create_unmanaged(struct wlr_xwayland_surface *xsurface) { static bool assert_xwayland(struct sway_view *view) { - return sway_assert(view->type == SWAY_XWAYLAND_VIEW, + return sway_assert(view->type == SWAY_VIEW_XWAYLAND, "Expected xwayland view!"); } @@ -185,7 +185,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { return; } - struct sway_view *view = view_create(SWAY_XWAYLAND_VIEW, &view_impl); + struct sway_view *view = view_create(SWAY_VIEW_XWAYLAND, &view_impl); if (!sway_assert(view, "Failed to allocate view")) { return; } |