aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-04 15:53:46 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-04 22:03:14 -0400
commit8eff00f72395add1881aa677e3c718c0554cb096 (patch)
tree803dc03246326c754732f3b8f635d8a67a2a3441 /sway/desktop
parentRemove unused sway_view.unmanaged_link (diff)
downloadsway-8eff00f72395add1881aa677e3c718c0554cb096.tar.gz
sway-8eff00f72395add1881aa677e3c718c0554cb096.tar.zst
sway-8eff00f72395add1881aa677e3c718c0554cb096.zip
Remove unused SWAY_VIEW_TYPES
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c9
-rw-r--r--sway/desktop/wl_shell.c4
-rw-r--r--sway/desktop/xdg_shell_v6.c4
-rw-r--r--sway/desktop/xwayland.c4
4 files changed, 10 insertions, 11 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 6cf5da48..38b52a41 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) {
188 } 188 }
189 189
190 switch (sway_view->type) { 190 switch (sway_view->type) {
191 case SWAY_XDG_SHELL_V6_VIEW: { 191 case SWAY_VIEW_XDG_SHELL_V6: {
192 int window_offset_x = view->sway_view->wlr_xdg_surface_v6->geometry.x; 192 int window_offset_x = view->sway_view->wlr_xdg_surface_v6->geometry.x;
193 int window_offset_y = view->sway_view->wlr_xdg_surface_v6->geometry.y; 193 int window_offset_y = view->sway_view->wlr_xdg_surface_v6->geometry.y;
194 render_surface(surface, wlr_output, when, 194 render_surface(surface, wlr_output, when,
@@ -197,13 +197,12 @@ static void render_view(struct sway_container *view, void *data) {
197 when, view->x - window_offset_x, view->y - window_offset_y, 0, alpha); 197 when, view->x - window_offset_x, view->y - window_offset_y, 0, alpha);
198 break; 198 break;
199 } 199 }
200 case SWAY_WL_SHELL_VIEW: 200 case SWAY_VIEW_WL_SHELL:
201 render_wl_shell_surface(sway_view->wlr_wl_shell_surface, wlr_output, 201 render_wl_shell_surface(sway_view->wlr_wl_shell_surface, wlr_output,
202 when, view->x, view->y, 0, alpha, false); 202 when, view->x, view->y, 0, alpha, false);
203 break; 203 break;
204 case SWAY_XWAYLAND_VIEW: 204 case SWAY_VIEW_XWAYLAND:
205 render_surface(surface, wlr_output, when, view->x, view->y, 205 render_surface(surface, wlr_output, when, view->x, view->y, 0, alpha);
206 0, alpha);
207 break; 206 break;
208 default: 207 default:
209 break; 208 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 @@
12#include "log.h" 12#include "log.h"
13 13
14static bool assert_wl_shell(struct sway_view *view) { 14static bool assert_wl_shell(struct sway_view *view) {
15 return sway_assert(view->type == SWAY_WL_SHELL_VIEW, 15 return sway_assert(view->type == SWAY_VIEW_WL_SHELL,
16 "Expecting wl_shell view!"); 16 "Expecting wl_shell view!");
17} 17}
18 18
@@ -97,7 +97,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
97 return; 97 return;
98 } 98 }
99 99
100 struct sway_view *view = view_create(SWAY_WL_SHELL_VIEW, &view_impl); 100 struct sway_view *view = view_create(SWAY_VIEW_WL_SHELL, &view_impl);
101 if (!sway_assert(view, "Failed to allocate view")) { 101 if (!sway_assert(view, "Failed to allocate view")) {
102 return; 102 return;
103 } 103 }
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 @@
12#include "log.h" 12#include "log.h"
13 13
14static bool assert_xdg(struct sway_view *view) { 14static bool assert_xdg(struct sway_view *view) {
15 return sway_assert(view->type == SWAY_XDG_SHELL_V6_VIEW, 15 return sway_assert(view->type == SWAY_VIEW_XDG_SHELL_V6,
16 "Expected xdg shell v6 view!"); 16 "Expected xdg shell v6 view!");
17} 17}
18 18
@@ -126,7 +126,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
126 return; 126 return;
127 } 127 }
128 128
129 struct sway_view *view = view_create(SWAY_XDG_SHELL_V6_VIEW, &view_impl); 129 struct sway_view *view = view_create(SWAY_VIEW_XDG_SHELL_V6, &view_impl);
130 if (!sway_assert(view, "Failed to allocate view")) { 130 if (!sway_assert(view, "Failed to allocate view")) {
131 return; 131 return;
132 } 132 }
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) {
42 42
43 43
44static bool assert_xwayland(struct sway_view *view) { 44static bool assert_xwayland(struct sway_view *view) {
45 return sway_assert(view->type == SWAY_XWAYLAND_VIEW, 45 return sway_assert(view->type == SWAY_VIEW_XWAYLAND,
46 "Expected xwayland view!"); 46 "Expected xwayland view!");
47} 47}
48 48
@@ -185,7 +185,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
185 return; 185 return;
186 } 186 }
187 187
188 struct sway_view *view = view_create(SWAY_XWAYLAND_VIEW, &view_impl); 188 struct sway_view *view = view_create(SWAY_VIEW_XWAYLAND, &view_impl);
189 if (!sway_assert(view, "Failed to allocate view")) { 189 if (!sway_assert(view, "Failed to allocate view")) {
190 return; 190 return;
191 } 191 }