aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar M Stoeckl <code@mstoeckl.com>2019-01-22 10:07:38 -0500
committerLibravatar M Stoeckl <code@mstoeckl.com>2019-01-22 10:12:04 -0500
commit0af5b26e41c5141d4094652133c230d76bf82e56 (patch)
tree75c61907f094838e23899231ec5ec955c530f692 /sway/tree/view.c
parentMerge pull request #3494 from ianyfan/commands (diff)
downloadsway-0af5b26e41c5141d4094652133c230d76bf82e56.tar.gz
sway-0af5b26e41c5141d4094652133c230d76bf82e56.tar.zst
sway-0af5b26e41c5141d4094652133c230d76bf82e56.zip
Fix dead stores found by scan-build
In addition to removing unused code, two minor problems are fixed: (1) `resize set` and `resize adjust` did not error when given too many arguments. (2) `orientation` was incorrectly overridden to be 'U' for scroll events in the swaybar tray `handle_click` function.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index edbfca97..8795e04f 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -236,8 +236,6 @@ void view_autoconfigure(struct sway_view *view) {
236 con->border_bottom = bottom_y != ws->y + ws->height; 236 con->border_bottom = bottom_y != ws->y + ws->height;
237 } 237 }
238 238
239 double x, y, width, height;
240 x = y = width = height = 0;
241 double y_offset = 0; 239 double y_offset = 0;
242 240
243 // In a tabbed or stacked container, the container's y is the top of the 241 // In a tabbed or stacked container, the container's y is the top of the
@@ -253,7 +251,9 @@ void view_autoconfigure(struct sway_view *view) {
253 con->border_top = false; 251 con->border_top = false;
254 } 252 }
255 253
254 double x, y, width, height;
256 switch (con->border) { 255 switch (con->border) {
256 default:
257 case B_CSD: 257 case B_CSD:
258 case B_NONE: 258 case B_NONE:
259 x = con->x; 259 x = con->x;