summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-08-16 20:21:39 +0300
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-08-16 20:21:39 +0300
commit812aa788fa06c9a48fb7b5f54d08c99cbb4f709c (patch)
treedf191225e3f3d9e755b06c0546668d244de539d7 /dwm.c
parent1dec076282eae69d44e5aa3168ae8ed0e7bfb94d (diff)
Fixed the attachbottom patch and pulled in some new diff files to merge.
Changes to be committed: modified: dwm.c modified: dwm.c.orig modified: dwm.c.rej new file: patches_new/dwm-fullgaps-6.4.diff new file: patches_new/dwm-noborderflicker-20211227-8657affa2a61.diff new file: patches_new/dwm-resizecorners-6.2.diff new file: patches_new/dwm-sticky-6.4.diff new file: patches_new/dwm-tag-preview-6.3.diff new file: patches_new/dwm-toggleborder-6.3.diff new file: patches_new/dwm-winicon-6.3-v2.1.diff
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index f4b2644..c5ee1d0 100644
--- a/dwm.c
+++ b/dwm.c
@@ -148,6 +148,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
static void attach(Client *c);
+static void attachbottom(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
static void checkotherwm(void);
@@ -418,6 +419,15 @@ attach(Client *c)
}
void
+attachbottom(Client *c)
+{
+ Client **tc;
+ c->next = NULL;
+ for (tc = &c->mon->clients; *tc; tc = &(*tc)->next);
+ *tc = c;
+}
+
+void
attachstack(Client *c)
{
c->snext = c->mon->stack;
@@ -1084,7 +1094,7 @@ manage(Window w, XWindowAttributes *wa)
c->isfloating = c->oldstate = trans != None || c->isfixed;
if (c->isfloating)
XRaiseWindow(dpy, c->win);
- attach(c);
+ attachbottom(c);
attachstack(c);
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
@@ -1506,7 +1516,7 @@ sendmon(Client *c, Monitor *m)
detachstack(c);
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
- attach(c);
+ attachbottom(c);
attachstack(c);
focus(NULL);
arrange(NULL);