Address review feedback

This commit is contained in:
Drew DeVault 2018-04-02 18:51:40 -04:00
parent 37036df822
commit 9ae861c416
1 changed files with 3 additions and 5 deletions

View File

@ -198,13 +198,11 @@ void arrange_layers(struct roots_output *output) {
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
ZWLR_LAYER_SHELL_V1_LAYER_TOP, 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; struct roots_layer_surface *layer, *topmost = NULL;
for (size_t i = 0; for (size_t i = 0; i < nlayers; ++i) {
i < sizeof(layers_above_shell) / sizeof(layers_above_shell[0]);
++i) {
wl_list_for_each_reverse(layer, wl_list_for_each_reverse(layer,
&output->layers[layers_above_shell[i]], &output->layers[layers_above_shell[i]], link) {
link) {
if (layer->layer_surface->current.keyboard_interactive) { if (layer->layer_surface->current.keyboard_interactive) {
topmost = layer; topmost = layer;
break; break;