From cfb7accf8851f440cbc3a932a6c3d847f158fdc4 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 5 Sep 2022 17:50:32 -0500 Subject: remove testing files --- downdate.diff | 67 -------------------------- downdate2.diff | 78 ------------------------------ update.diff | 147 --------------------------------------------------------- 3 files changed, 292 deletions(-) delete mode 100644 downdate.diff delete mode 100644 downdate2.diff delete mode 100644 update.diff diff --git a/downdate.diff b/downdate.diff deleted file mode 100644 index 7c7644e..0000000 --- a/downdate.diff +++ /dev/null @@ -1,67 +0,0 @@ -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); - -@@ -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); - } diff --git a/downdate2.diff b/downdate2.diff deleted file mode 100644 index 2dec598..0000000 --- a/downdate2.diff +++ /dev/null @@ -1,78 +0,0 @@ -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); - } diff --git a/update.diff b/update.diff deleted file mode 100644 index d38a529..0000000 --- a/update.diff +++ /dev/null @@ -1,147 +0,0 @@ -diff --git a/README.md b/README.md -index 887bf29..6b12ab0 100644 ---- a/README.md -+++ b/README.md -@@ -1,6 +1,6 @@ - # dwl - dwm for Wayland - --Join us on our [Discord server](https://discord.gg/jJxZnrGPWN)! -+Join us on our [Discord server](https://discord.gg/jJxZnrGPWN) and at [#dwl](https://web.libera.chat/?channels=#dwl) on irc.libera.chat. - - dwl is a compact, hackable compositor for Wayland based on [wlroots](https://gitlab.freedesktop.org/wlroots/wlroots/). It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is: - -@@ -85,10 +85,6 @@ Existing dwl-specific status bars and dwl-specific scripts for other status bars - - You can find a [list of Wayland applications on the sway wiki](https://github.com/swaywm/sway/wiki/i3-Migration-Guide). - --## IRC channel -- --dwl's IRC channel is #dwl on irc.libera.chat. -- - ## Acknowledgements - - dwl began by extending the TinyWL example provided (CC0) by the sway/wlroots developers. This was made possible in many cases by looking at how sway accomplished something, then trying to do the same in as suckless a way as possible. -diff --git a/config.h b/config.h -index bc08e2e..7745e7d 100644 ---- a/config.h -+++ b/config.h -@@ -49,8 +49,7 @@ static const MonitorRule monrules[] = { - { "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL }, - */ - /* defaults */ -- { "HDMI-A-1", 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL }, -- { "HDMI-A-2", 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL }, -+ { NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL }, - }; - - /* keyboard */ -diff --git a/dwl.c b/dwl.c -index 227e1c4..2533ef7 100644 ---- a/dwl.c -+++ b/dwl.c -@@ -315,7 +315,7 @@ static void swallow(Client *c, Client *w); - /* variables */ - static const char broken[] = "broken"; - static pid_t child_pid = -1; --static struct wlr_surface *exclusive_focus; -+static void *exclusive_focus; - static struct wl_display *dpy; - static struct wlr_backend *backend; - static struct wlr_scene *scene; -@@ -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 (exclusive != (state->exclusive_zone > 0)) -+ if (wlr_layer_surface->mapped && exclusive != (state->exclusive_zone > 0)) - continue; - - bounds = state->exclusive_zone == -1 ? full_area : *usable_area; -@@ -643,6 +643,8 @@ 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--) -@@ -665,8 +667,8 @@ arrangelayers(Monitor *m) - layersurface->layer_surface->mapped) { - /* Deactivate the focused client. */ - focusclient(NULL, 0); -- exclusive_focus = layersurface->layer_surface->surface; -- client_notify_enter(exclusive_focus, wlr_seat_get_keyboard(seat)); -+ exclusive_focus = layersurface; -+ client_notify_enter(layersurface->layer_surface->surface, wlr_seat_get_keyboard(seat)); - return; - } - } -@@ -801,6 +803,7 @@ 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); - -@@ -835,8 +838,9 @@ 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 (!layersurface->mon) -+ if (!wlr_output || !(layersurface->mon = wlr_output->data)) - return; - - if (layers[wlr_layer_surface->current.layer] != layersurface->scene) { -@@ -1127,8 +1131,6 @@ 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); - } - -@@ -1551,9 +1553,6 @@ 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); -@@ -2029,6 +2028,8 @@ void - setfullscreen(Client *c, int fullscreen) - { - c->isfullscreen = fullscreen; -+ if (!c->mon) -+ return; - c->bw = fullscreen ? 0 : borderpx; - client_set_fullscreen(c, fullscreen); - -@@ -2114,7 +2115,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 */ -- arrange(m); -+ setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */ - } - focusclient(focustop(selmon), 1); - } -@@ -2512,7 +2513,10 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data) - - layersurface->layer_surface->mapped = (layersurface->mapped = 0); - wlr_scene_node_set_enabled(layersurface->scene, 0); -- if (layersurface->layer_surface->surface == exclusive_focus) -+ if (layersurface->layer_surface->output -+ && (layersurface->mon = layersurface->layer_surface->output->data)) -+ arrangelayers(layersurface->mon); -+ if (layersurface == exclusive_focus) - exclusive_focus = NULL; - if (layersurface->layer_surface->surface == - seat->keyboard_state.focused_surface) -- cgit v1.2.3