mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 11:44:51 +00:00
smartborders: rebase against d1c2f434983562bd7d2ace15ab0c05155be603bc
This commit is contained in:
parent
a87342897a
commit
e92e2ebbe0
@ -4,7 +4,7 @@ in its tag OR if the window is in a monocle layout.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/smartborders)
|
||||
- [main 2024-09-02](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders.patch)
|
||||
- [smartborders-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e9ae9a7da8638f6562cddee91eeb4d4d9d9545f5 Mon Sep 17 00:00:00 2001
|
||||
From 38010bdecf63bdb8acfc584825b398838310eed1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@protonmail.com>
|
||||
Date: Tue, 16 Aug 2022 15:28:00 -0500
|
||||
@ -28,10 +28,10 @@ index 22d2171d..632f151f 100644
|
||||
static const float rootcolor[] = COLOR(0x222222ff);
|
||||
static const float bordercolor[] = COLOR(0x444444ff);
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..67714759 100644
|
||||
index ad21e1ba..0c56431a 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -321,7 +321,7 @@ static void rendermon(struct wl_listener *listener, void *data);
|
||||
@@ -317,7 +317,7 @@ static void rendermon(struct wl_listener *listener, void *data);
|
||||
static void requestdecorationmode(struct wl_listener *listener, void *data);
|
||||
static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||
static void requestmonstate(struct wl_listener *listener, void *data);
|
||||
@ -40,7 +40,7 @@ index 9021e442..67714759 100644
|
||||
static void run(char *startup_cmd);
|
||||
static void setcursor(struct wl_listener *listener, void *data);
|
||||
static void setcursorshape(struct wl_listener *listener, void *data);
|
||||
@@ -740,7 +740,7 @@ closemon(Monitor *m)
|
||||
@@ -803,7 +803,7 @@ closemon(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->isfloating && c->geom.x > m->m.width)
|
||||
resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
|
||||
@ -49,7 +49,7 @@ index 9021e442..67714759 100644
|
||||
if (c->mon == m)
|
||||
setmon(c, selmon, c->tags);
|
||||
}
|
||||
@@ -809,7 +809,11 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
@@ -872,7 +872,11 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ index 9021e442..67714759 100644
|
||||
|
||||
/* mark a pending resize as completed */
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
|
||||
@@ -1773,7 +1777,7 @@ monocle(Monitor *m)
|
||||
@@ -1819,7 +1823,7 @@ monocle(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
continue;
|
||||
@ -71,7 +71,7 @@ index 9021e442..67714759 100644
|
||||
n++;
|
||||
}
|
||||
if (n)
|
||||
@@ -1865,11 +1869,11 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d
|
||||
@@ -1911,11 +1915,11 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d
|
||||
if (cursor_mode == CurMove) {
|
||||
/* Move the grabbed client to the new position. */
|
||||
resize(grabc, (struct wlr_box){.x = (int)round(cursor->x) - grabcx, .y = (int)round(cursor->y) - grabcy,
|
||||
@ -85,7 +85,7 @@ index 9021e442..67714759 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2147,7 +2151,7 @@ requestmonstate(struct wl_listener *listener, void *data)
|
||||
@@ -2194,7 +2198,7 @@ requestmonstate(struct wl_listener *listener, void *data)
|
||||
}
|
||||
|
||||
void
|
||||
@ -94,7 +94,7 @@ index 9021e442..67714759 100644
|
||||
{
|
||||
struct wlr_box *bbox;
|
||||
struct wlr_box clip;
|
||||
@@ -2159,6 +2163,7 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
@@ -2206,6 +2210,7 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
|
||||
client_set_bounds(c, geo.width, geo.height);
|
||||
c->geom = geo;
|
||||
@ -102,7 +102,7 @@ index 9021e442..67714759 100644
|
||||
applybounds(c, bbox);
|
||||
|
||||
/* Update scene-graph, including borders */
|
||||
@@ -2283,6 +2288,8 @@ setfloating(Client *c, int floating)
|
||||
@@ -2330,6 +2335,8 @@ setfloating(Client *c, int floating)
|
||||
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
|
||||
(p && p->isfullscreen) ? LyrFS
|
||||
: c->isfloating ? LyrFloat : LyrTile]);
|
||||
@ -111,7 +111,7 @@ index 9021e442..67714759 100644
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2300,11 +2307,11 @@ setfullscreen(Client *c, int fullscreen)
|
||||
@@ -2347,11 +2354,11 @@ setfullscreen(Client *c, int fullscreen)
|
||||
|
||||
if (fullscreen) {
|
||||
c->prev = c->geom;
|
||||
@ -125,7 +125,7 @@ index 9021e442..67714759 100644
|
||||
}
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
@@ -2320,6 +2327,12 @@ setlayout(const Arg *arg)
|
||||
@@ -2367,6 +2374,12 @@ setlayout(const Arg *arg)
|
||||
if (arg && arg->v)
|
||||
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
||||
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol));
|
||||
@ -138,7 +138,7 @@ index 9021e442..67714759 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2354,7 +2367,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
@@ -2401,7 +2414,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
arrange(oldmon);
|
||||
if (m) {
|
||||
/* Make sure window actually overlaps with the monitor */
|
||||
@ -147,7 +147,7 @@ index 9021e442..67714759 100644
|
||||
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||
setfloating(c, c->isfloating);
|
||||
@@ -2651,7 +2664,7 @@ tagmon(const Arg *arg)
|
||||
@@ -2701,7 +2714,7 @@ tagmon(const Arg *arg)
|
||||
void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
@ -156,7 +156,7 @@ index 9021e442..67714759 100644
|
||||
int i, n = 0;
|
||||
Client *c;
|
||||
|
||||
@@ -2661,6 +2674,9 @@ tile(Monitor *m)
|
||||
@@ -2711,6 +2724,9 @@ tile(Monitor *m)
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
@ -166,7 +166,7 @@ index 9021e442..67714759 100644
|
||||
if (n > m->nmaster)
|
||||
mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0;
|
||||
else
|
||||
@@ -2671,11 +2687,11 @@ tile(Monitor *m)
|
||||
@@ -2721,11 +2737,11 @@ tile(Monitor *m)
|
||||
continue;
|
||||
if (i < m->nmaster) {
|
||||
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||
@ -180,7 +180,7 @@ index 9021e442..67714759 100644
|
||||
ty += c->geom.height;
|
||||
}
|
||||
i++;
|
||||
@@ -2844,7 +2860,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
@@ -2894,7 +2910,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
arrange(m);
|
||||
/* make sure fullscreen clients have the right size */
|
||||
if ((c = focustop(m)) && c->isfullscreen)
|
||||
@ -189,7 +189,7 @@ index 9021e442..67714759 100644
|
||||
|
||||
/* Try to re-set the gamma LUT when updating monitors,
|
||||
* it's only really needed when enabling a disabled output, but meh. */
|
||||
@@ -3053,7 +3069,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||
@@ -3103,7 +3119,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||
if ((c->isfloating && c != grabc) || !c->mon->lt[c->mon->sellt]->arrange) {
|
||||
resize(c, (struct wlr_box){.x = event->x - c->bw,
|
||||
.y = event->y - c->bw, .width = event->width + c->bw * 2,
|
||||
@ -199,5 +199,5 @@ index 9021e442..67714759 100644
|
||||
arrange(c->mon);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user