hide-behind-monocle: rebase against d1c2f434983562bd7d2ace15ab0c05155be603bc

This commit is contained in:
Leonardo Hernández Hernández 2025-01-19 18:10:03 -06:00
parent e85e1a7af7
commit 078d201431
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
2 changed files with 35 additions and 35 deletions

View File

@ -3,7 +3,7 @@ Hide all clients behind the focused one in the monocle layout
### Download
- [git branch](https://codeberg.org/sevz/dwl/src/branch/hide-behind-monocle)
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch)
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch)
- [hide-behind-monocle-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle-0.7.patch)
### Authors

View File

@ -1,4 +1,4 @@
From b6eb491465e7d7023c0fd127a20507855f985731 Mon Sep 17 00:00:00 2001
From 8022376ee59d616831271dbc9f289a8bfd4fedda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
<leohdz172@proton.me>
Date: Sat, 8 Jul 2023 17:25:16 -0600
@ -13,10 +13,10 @@ Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
1 file changed, 55 insertions(+), 32 deletions(-)
diff --git a/dwl.c b/dwl.c
index 9021e442..d44f97de 100644
index ad21e1ba..cad3b0b2 100644
--- a/dwl.c
+++ b/dwl.c
@@ -289,10 +289,11 @@ static Monitor *dirtomon(enum wlr_direction dir);
@@ -285,10 +285,11 @@ static Monitor *dirtomon(enum wlr_direction dir);
static void focusclient(Client *c, int lift);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
@ -29,7 +29,7 @@ index 9021e442..d44f97de 100644
static void incnmaster(const Arg *arg);
static void inputdevice(struct wl_listener *listener, void *data);
static int keybinding(uint32_t mods, xkb_keysym_t sym);
@@ -493,7 +494,7 @@ arrange(Monitor *m)
@@ -518,7 +519,7 @@ arrange(Monitor *m)
}
wlr_scene_node_set_enabled(&m->fullscreen_bg->node,
@ -38,7 +38,7 @@ index 9021e442..d44f97de 100644
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
@@ -744,7 +745,7 @@ closemon(Monitor *m)
@@ -807,7 +808,7 @@ closemon(Monitor *m)
if (c->mon == m)
setmon(c, selmon, c->tags);
}
@ -47,16 +47,16 @@ index 9021e442..d44f97de 100644
printstatus();
}
@@ -1181,7 +1182,7 @@ void
@@ -1243,7 +1244,7 @@ void
destroydragicon(struct wl_listener *listener, void *data)
{
/* Focus enter isn't sent during drag, so refocus the focused node. */
- focusclient(focustop(selmon), 1);
+ focusclient(focustop(selmon, 0), 1);
motionnotify(0, NULL, 0, 0, 0, 0);
wl_list_remove(&listener->link);
}
@@ -1216,7 +1217,7 @@ destroylock(SessionLock *lock, int unlock)
@@ -1280,7 +1281,7 @@ destroylock(SessionLock *lock, int unlock)
wlr_scene_node_set_enabled(&locked_bg->node, 0);
@ -65,7 +65,7 @@ index 9021e442..d44f97de 100644
motionnotify(0, NULL, 0, 0, 0, 0);
destroy:
@@ -1245,7 +1246,7 @@ destroylocksurface(struct wl_listener *listener, void *data)
@@ -1309,7 +1310,7 @@ destroylocksurface(struct wl_listener *listener, void *data)
surface = wl_container_of(cur_lock->surfaces.next, surface, link);
client_notify_enter(surface->surface, wlr_seat_get_keyboard(seat));
} else if (!locked) {
@ -74,7 +74,7 @@ index 9021e442..d44f97de 100644
} else {
wlr_seat_keyboard_clear_focus(seat);
}
@@ -1363,6 +1364,7 @@ focusclient(Client *c, int lift)
@@ -1420,6 +1421,7 @@ focusclient(Client *c, int lift)
wl_list_insert(&fstack, &c->flink);
selmon = c->mon;
c->isurgent = 0;
@ -82,7 +82,7 @@ index 9021e442..d44f97de 100644
/* Don't change border color if there is an exclusive focus or we are
* handling a drag operation */
@@ -1416,14 +1418,14 @@ focusmon(const Arg *arg)
@@ -1473,14 +1475,14 @@ focusmon(const Arg *arg)
selmon = dirtomon(arg->i);
while (!selmon->wlr_output->enabled && i++ < nmons);
}
@ -99,7 +99,7 @@ index 9021e442..d44f97de 100644
if (!sel || (sel->isfullscreen && !client_has_children(sel)))
return;
if (arg->i > 0) {
@@ -1449,12 +1451,15 @@ focusstack(const Arg *arg)
@@ -1506,12 +1508,15 @@ focusstack(const Arg *arg)
* will focus the topmost client of this mon, when actually will
* only return that client */
Client *
@ -117,8 +117,8 @@ index 9021e442..d44f97de 100644
}
return NULL;
}
@@ -1511,6 +1516,25 @@ handlesig(int signo)
}
@@ -1557,6 +1562,25 @@ handlesig(int signo)
quit(NULL);
}
+void
@ -143,7 +143,7 @@ index 9021e442..d44f97de 100644
void
incnmaster(const Arg *arg)
{
@@ -1649,7 +1673,7 @@ keyrepeat(void *data)
@@ -1695,7 +1719,7 @@ keyrepeat(void *data)
void
killclient(const Arg *arg)
{
@ -152,7 +152,7 @@ index 9021e442..d44f97de 100644
if (sel)
client_send_close(sel);
}
@@ -1778,8 +1802,7 @@ monocle(Monitor *m)
@@ -1824,8 +1848,7 @@ monocle(Monitor *m)
}
if (n)
snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "[%d]", n);
@ -162,7 +162,7 @@ index 9021e442..d44f97de 100644
}
void
@@ -2046,7 +2069,7 @@ printstatus(void)
@@ -2092,7 +2115,7 @@ printstatus(void)
if (c->isurgent)
urg |= c->tags;
}
@ -171,7 +171,7 @@ index 9021e442..d44f97de 100644
printf("%s title %s\n", m->wlr_output->name, client_get_title(c));
printf("%s appid %s\n", m->wlr_output->name, client_get_appid(c));
printf("%s fullscreen %d\n", m->wlr_output->name, c->isfullscreen);
@@ -2359,7 +2382,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
@@ -2406,7 +2429,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
setfloating(c, c->isfloating);
}
@ -180,7 +180,7 @@ index 9021e442..d44f97de 100644
}
void
@@ -2630,12 +2653,12 @@ startdrag(struct wl_listener *listener, void *data)
@@ -2680,12 +2703,12 @@ startdrag(struct wl_listener *listener, void *data)
void
tag(const Arg *arg)
{
@ -195,7 +195,7 @@ index 9021e442..d44f97de 100644
arrange(selmon);
printstatus();
}
@@ -2643,7 +2666,7 @@ tag(const Arg *arg)
@@ -2693,7 +2716,7 @@ tag(const Arg *arg)
void
tagmon(const Arg *arg)
{
@ -204,7 +204,7 @@ index 9021e442..d44f97de 100644
if (sel)
setmon(sel, dirtomon(arg->i), 0);
}
@@ -2685,7 +2708,7 @@ tile(Monitor *m)
@@ -2735,7 +2758,7 @@ tile(Monitor *m)
void
togglefloating(const Arg *arg)
{
@ -213,7 +213,7 @@ index 9021e442..d44f97de 100644
/* return if fullscreen */
if (sel && !sel->isfullscreen)
setfloating(sel, !sel->isfloating);
@@ -2694,7 +2717,7 @@ togglefloating(const Arg *arg)
@@ -2744,7 +2767,7 @@ togglefloating(const Arg *arg)
void
togglefullscreen(const Arg *arg)
{
@ -222,7 +222,7 @@ index 9021e442..d44f97de 100644
if (sel)
setfullscreen(sel, !sel->isfullscreen);
}
@@ -2703,12 +2726,12 @@ void
@@ -2753,12 +2776,12 @@ void
toggletag(const Arg *arg)
{
uint32_t newtags;
@ -237,7 +237,7 @@ index 9021e442..d44f97de 100644
arrange(selmon);
printstatus();
}
@@ -2721,7 +2744,7 @@ toggleview(const Arg *arg)
@@ -2771,7 +2794,7 @@ toggleview(const Arg *arg)
return;
selmon->tagset[selmon->seltags] = newtagset;
@ -246,7 +246,7 @@ index 9021e442..d44f97de 100644
arrange(selmon);
printstatus();
}
@@ -2745,7 +2768,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data)
@@ -2795,7 +2818,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data)
if (l->layer_surface->output && (l->mon = l->layer_surface->output->data))
arrangelayers(l->mon);
if (l->layer_surface->surface == seat->keyboard_state.focused_surface)
@ -255,7 +255,7 @@ index 9021e442..d44f97de 100644
motionnotify(0, NULL, 0, 0, 0, 0);
}
@@ -2762,7 +2785,7 @@ unmapnotify(struct wl_listener *listener, void *data)
@@ -2812,7 +2835,7 @@ unmapnotify(struct wl_listener *listener, void *data)
if (client_is_unmanaged(c)) {
if (c == exclusive_focus) {
exclusive_focus = NULL;
@ -264,7 +264,7 @@ index 9021e442..d44f97de 100644
}
} else {
wl_list_remove(&c->link);
@@ -2843,7 +2866,7 @@ updatemons(struct wl_listener *listener, void *data)
@@ -2893,7 +2916,7 @@ updatemons(struct wl_listener *listener, void *data)
/* Don't move clients to the left output when plugging monitors */
arrange(m);
/* make sure fullscreen clients have the right size */
@ -273,7 +273,7 @@ index 9021e442..d44f97de 100644
resize(c, m->m, 0);
/* Try to re-set the gamma LUT when updating monitors,
@@ -2863,7 +2886,7 @@ updatemons(struct wl_listener *listener, void *data)
@@ -2913,7 +2936,7 @@ updatemons(struct wl_listener *listener, void *data)
if (!c->mon && client_surface(c)->mapped)
setmon(c, selmon, c->tags);
}
@ -282,7 +282,7 @@ index 9021e442..d44f97de 100644
if (selmon->lock_surface) {
client_notify_enter(selmon->lock_surface->surface,
wlr_seat_get_keyboard(seat));
@@ -2885,7 +2908,7 @@ void
@@ -2935,7 +2958,7 @@ void
updatetitle(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, set_title);
@ -291,7 +291,7 @@ index 9021e442..d44f97de 100644
printstatus();
}
@@ -2895,7 +2918,7 @@ urgent(struct wl_listener *listener, void *data)
@@ -2945,7 +2968,7 @@ urgent(struct wl_listener *listener, void *data)
struct wlr_xdg_activation_v1_request_activate_event *event = data;
Client *c = NULL;
toplevel_from_wlr_surface(event->surface, &c, NULL);
@ -300,7 +300,7 @@ index 9021e442..d44f97de 100644
return;
c->isurgent = 1;
@@ -2913,7 +2936,7 @@ view(const Arg *arg)
@@ -2963,7 +2986,7 @@ view(const Arg *arg)
selmon->seltags ^= 1; /* toggle sel tagset */
if (arg->ui & TAGMASK)
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
@ -309,7 +309,7 @@ index 9021e442..d44f97de 100644
arrange(selmon);
printstatus();
}
@@ -2984,7 +3007,7 @@ xytonode(double x, double y, struct wlr_surface **psurface,
@@ -3034,7 +3057,7 @@ xytonode(double x, double y, struct wlr_surface **psurface,
void
zoom(const Arg *arg)
{
@ -318,7 +318,7 @@ index 9021e442..d44f97de 100644
if (!sel || !selmon || !selmon->lt[selmon->sellt]->arrange || sel->isfloating)
return;
@@ -3108,7 +3131,7 @@ sethints(struct wl_listener *listener, void *data)
@@ -3145,7 +3168,7 @@ sethints(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, set_hints);
struct wlr_surface *surface = client_surface(c);
@ -328,5 +328,5 @@ index 9021e442..d44f97de 100644
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
--
2.46.0
2.48.0