summaryrefslogtreecommitdiffstats
path: root/sway/desktop
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/desktop
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/desktop')
-rw-r--r--sway/desktop/layer_shell.c2
-rw-r--r--sway/desktop/xdg_shell.c3
-rw-r--r--sway/desktop/xdg_shell_v6.c3
-rw-r--r--sway/desktop/xwayland.c3
4 files changed, 0 insertions, 11 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index a870bb9a..de8db75d 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -354,8 +354,6 @@ struct sway_layer_surface *layer_from_wlr_layer_surface_v1(
354 354
355void handle_layer_shell_surface(struct wl_listener *listener, void *data) { 355void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
356 struct wlr_layer_surface_v1 *layer_surface = data; 356 struct wlr_layer_surface_v1 *layer_surface = data;
357 struct sway_server *server =
358 wl_container_of(listener, server, layer_shell_surface);
359 sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d " 357 sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d "
360 "size %dx%d margin %d,%d,%d,%d", 358 "size %dx%d margin %d,%d,%d,%d",
361 layer_surface->namespace, layer_surface->layer, layer_surface->layer, 359 layer_surface->namespace, layer_surface->layer, layer_surface->layer,
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index b4ac3a68..e2c614b3 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -13,7 +13,6 @@
13#include "sway/input/input-manager.h" 13#include "sway/input/input-manager.h"
14#include "sway/input/seat.h" 14#include "sway/input/seat.h"
15#include "sway/output.h" 15#include "sway/output.h"
16#include "sway/server.h"
17#include "sway/tree/arrange.h" 16#include "sway/tree/arrange.h"
18#include "sway/tree/container.h" 17#include "sway/tree/container.h"
19#include "sway/tree/view.h" 18#include "sway/tree/view.h"
@@ -480,8 +479,6 @@ struct sway_view *view_from_wlr_xdg_surface(
480} 479}
481 480
482void handle_xdg_shell_surface(struct wl_listener *listener, void *data) { 481void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
483 struct sway_server *server = wl_container_of(listener, server,
484 xdg_shell_surface);
485 struct wlr_xdg_surface *xdg_surface = data; 482 struct wlr_xdg_surface *xdg_surface = data;
486 483
487 if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) { 484 if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 553d532d..f11c00b1 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -12,7 +12,6 @@
12#include "sway/input/input-manager.h" 12#include "sway/input/input-manager.h"
13#include "sway/input/seat.h" 13#include "sway/input/seat.h"
14#include "sway/output.h" 14#include "sway/output.h"
15#include "sway/server.h"
16#include "sway/tree/arrange.h" 15#include "sway/tree/arrange.h"
17#include "sway/tree/container.h" 16#include "sway/tree/container.h"
18#include "sway/tree/view.h" 17#include "sway/tree/view.h"
@@ -464,8 +463,6 @@ struct sway_view *view_from_wlr_xdg_surface_v6(
464} 463}
465 464
466void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { 465void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
467 struct sway_server *server = wl_container_of(listener, server,
468 xdg_shell_v6_surface);
469 struct wlr_xdg_surface_v6 *xdg_surface = data; 466 struct wlr_xdg_surface_v6 *xdg_surface = data;
470 467
471 if (xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP) { 468 if (xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP) {
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 8dcf4bd6..4ea661f8 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -12,7 +12,6 @@
12#include "sway/input/input-manager.h" 12#include "sway/input/input-manager.h"
13#include "sway/input/seat.h" 13#include "sway/input/seat.h"
14#include "sway/output.h" 14#include "sway/output.h"
15#include "sway/server.h"
16#include "sway/tree/arrange.h" 15#include "sway/tree/arrange.h"
17#include "sway/tree/container.h" 16#include "sway/tree/container.h"
18#include "sway/tree/view.h" 17#include "sway/tree/view.h"
@@ -573,8 +572,6 @@ struct sway_view *view_from_wlr_xwayland_surface(
573} 572}
574 573
575void handle_xwayland_surface(struct wl_listener *listener, void *data) { 574void handle_xwayland_surface(struct wl_listener *listener, void *data) {
576 struct sway_server *server = wl_container_of(listener, server,
577 xwayland_surface);
578 struct wlr_xwayland_surface *xsurface = data; 575 struct wlr_xwayland_surface *xsurface = data;
579 576
580 if (xsurface->override_redirect) { 577 if (xsurface->override_redirect) {