aboutsummaryrefslogtreecommitdiff
path: root/rootston/layer_shell.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-02 18:51:40 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-02 18:54:16 -0400
commit9ae861c416e84feda2ffb577b97c43d6222560af (patch)
tree9f6941a35b580f00462d0d928674881d35d2ffc1 /rootston/layer_shell.c
parent37036df822fb339d790be24abbaa09253f889d25 (diff)
Address review feedback
Diffstat (limited to 'rootston/layer_shell.c')
-rw-r--r--rootston/layer_shell.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c
index 749da40d..1cd93b3c 100644
--- a/rootston/layer_shell.c
+++ b/rootston/layer_shell.c
@@ -198,13 +198,11 @@ void arrange_layers(struct roots_output *output) {
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
};
+ size_t nlayers = sizeof(layers_above_shell) / sizeof(layers_above_shell[0]);
struct roots_layer_surface *layer, *topmost = NULL;
- for (size_t i = 0;
- i < sizeof(layers_above_shell) / sizeof(layers_above_shell[0]);
- ++i) {
+ for (size_t i = 0; i < nlayers; ++i) {
wl_list_for_each_reverse(layer,
- &output->layers[layers_above_shell[i]],
- link) {
+ &output->layers[layers_above_shell[i]], link) {
if (layer->layer_surface->current.keyboard_interactive) {
topmost = layer;
break;