summaryrefslogtreecommitdiff
path: root/downdate2.diff
diff options
context:
space:
mode:
Diffstat (limited to 'downdate2.diff')
-rw-r--r--downdate2.diff78
1 files changed, 78 insertions, 0 deletions
diff --git a/downdate2.diff b/downdate2.diff
new file mode 100644
index 0000000..2dec598
--- /dev/null
+++ b/downdate2.diff
@@ -0,0 +1,78 @@
+diff --git a/dwl.c b/dwl.c
+index 2533ef7..227e1c4 100644
+--- a/dwl.c
++++ b/dwl.c
+@@ -574,7 +574,7 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int
+ const uint32_t both_vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
+ | ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
+
+- if (wlr_layer_surface->mapped && exclusive != (state->exclusive_zone > 0))
++ if (exclusive != (state->exclusive_zone > 0))
+ continue;
+
+ bounds = state->exclusive_zone == -1 ? full_area : *usable_area;
+@@ -643,8 +643,6 @@ arrangelayers(Monitor *m)
+ ZWLR_LAYER_SHELL_V1_LAYER_TOP,
+ };
+ LayerSurface *layersurface;
+- if (!m || !m->wlr_output->enabled)
+- return;
+
+ /* Arrange exclusive surfaces from top->bottom */
+ for (i = 3; i >= 0; i--)
+@@ -803,7 +801,6 @@ cleanupmon(struct wl_listener *listener, void *data)
+ wl_list_remove(&m->destroy.link);
+ wl_list_remove(&m->frame.link);
+ wl_list_remove(&m->link);
+- wlr_output->data = NULL;
+ wlr_output_layout_remove(output_layout, m->wlr_output);
+ wlr_scene_output_destroy(m->scene_output);
+
+@@ -838,9 +835,8 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
+ {
+ LayerSurface *layersurface = wl_container_of(listener, layersurface, surface_commit);
+ struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
+- struct wlr_output *wlr_output = wlr_layer_surface->output;
+
+- if (!wlr_output || !(layersurface->mon = wlr_output->data))
++ if (!layersurface->mon)
+ return;
+
+ if (layers[wlr_layer_surface->current.layer] != layersurface->scene) {
+@@ -1131,6 +1127,8 @@ destroylayersurfacenotify(struct wl_listener *listener, void *data)
+ wl_list_remove(&layersurface->unmap.link);
+ wl_list_remove(&layersurface->surface_commit.link);
+ wlr_scene_node_destroy(layersurface->scene);
++ if (layersurface->mon)
++ arrangelayers(layersurface->mon);
+ free(layersurface);
+ }
+
+@@ -1553,6 +1551,9 @@ mapnotify(struct wl_listener *listener, void *data)
+ }
+ printstatus();
+
++ if (c->isfullscreen)
++ setfullscreen(c, 1);
++
+ c->mon->un_map = 1;
+ if (!c->noswallow) {
+ Client *p = termforwin(c);
+@@ -2028,8 +2029,6 @@ void
+ setfullscreen(Client *c, int fullscreen)
+ {
+ c->isfullscreen = fullscreen;
+- if (!c->mon)
+- return;
+ c->bw = fullscreen ? 0 : borderpx;
+ client_set_fullscreen(c, fullscreen);
+
+@@ -2115,7 +2114,7 @@ setmon(Client *c, Monitor *m, unsigned int newtags)
+ resize(c, c->geom, 0, 1);
+ wlr_surface_send_enter(client_surface(c), m->wlr_output);
+ c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
+- setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
++ arrange(m);
+ }
+ focusclient(focustop(selmon), 1);
+ }