dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: 671105d635489f85ad16a6117fdb4861d0ca53a2
Parent: 87d3e7d296e944c0d21684a3c221e5cdda06ee70
Author: 0x766F6964
Date:   Sat, 16 Nov 2019 00:28:10 -0700

update dwm fake fullscreen patch. it doesn't need to touch so much code

Diffstat:
Metc/portage/patches/x11-wm/dwm/fakefullscreen.patch | 86++++++++++++++++++-------------------------------------------------------------
1 file changed, 19 insertions(+), 67 deletions(-)

diff --git a/etc/portage/patches/x11-wm/dwm/fakefullscreen.patch b/etc/portage/patches/x11-wm/dwm/fakefullscreen.patch @@ -19,7 +19,7 @@ index 1c0b587..1db5e32 100644 /* button definitions */ diff --git a/dwm.c b/dwm.c -index 4465af1..72fefd1 100644 +index 4465af1..30a2b7b 100644 --- a/dwm.c +++ b/dwm.c @@ -187,6 +187,7 @@ static Client *nexttiled(Client *c); @@ -30,15 +30,6 @@ index 4465af1..72fefd1 100644 static Monitor *recttomon(int x, int y, int w, int h); static void resize(Client *c, int x, int y, int w, int h, int interact); static void resizeclient(Client *c, int x, int y, int w, int h); -@@ -521,7 +522,7 @@ clientmessage(XEvent *e) - if (cme->data.l[1] == netatom[NetWMFullscreen] - || cme->data.l[2] == netatom[NetWMFullscreen]) - setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */ -- || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen))); -+ || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen && !realfullscreen))); - } else if (cme->message_type == netatom[NetActiveWindow]) { - if (c != selmon->sel && !c->isurgent) - seturgent(c, 1); @@ -564,9 +565,10 @@ configurenotify(XEvent *e) drw_resize(drw, sw, bh); updatebars(); @@ -53,59 +44,29 @@ index 4465af1..72fefd1 100644 XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); } focus(NULL); -@@ -1143,7 +1145,7 @@ movemouse(const Arg *arg) - - if (!(c = selmon->sel)) - return; -- if (c->isfullscreen) /* no support moving fullscreen windows by mouse */ -+ if (realfullscreen && c->isfullscreen) /* no support moving fullscreen windows by mouse */ - return; - restack(selmon); - ocx = c->x; -@@ -1476,24 +1478,28 @@ setfullscreen(Client *c, int fullscreen) +@@ -1476,6 +1478,10 @@ setfullscreen(Client *c, int fullscreen) XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1); c->isfullscreen = 1; -- c->oldstate = c->isfloating; -- c->oldbw = c->bw; -- c->bw = 0; -- c->isfloating = 1; -- resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); -- XRaiseWindow(dpy, c->win); -+ if (realfullscreen) { -+ c->oldstate = c->isfloating; -+ c->oldbw = c->bw; -+ c->bw = 0; -+ c->isfloating = 1; -+ resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); -+ XRaiseWindow(dpy, c->win); -+ } - } else if (!fullscreen && c->isfullscreen){ ++ ++ if (!realfullscreen) ++ return; ++ + c->oldstate = c->isfloating; + c->oldbw = c->bw; + c->bw = 0; +@@ -1486,6 +1492,10 @@ setfullscreen(Client *c, int fullscreen) XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, PropModeReplace, (unsigned char*)0, 0); c->isfullscreen = 0; -- c->isfloating = c->oldstate; -- c->bw = c->oldbw; -- c->x = c->oldx; -- c->y = c->oldy; -- c->w = c->oldw; -- c->h = c->oldh; -- resizeclient(c, c->x, c->y, c->w, c->h); -- arrange(c->mon); -+ if (realfullscreen) { -+ c->isfloating = c->oldstate; -+ c->bw = c->oldbw; -+ c->x = c->oldx; -+ c->y = c->oldy; -+ c->w = c->oldw; -+ c->h = c->oldh; -+ resizeclient(c, c->x, c->y, c->w, c->h); -+ arrange(c->mon); -+ } - } - } - -@@ -1618,7 +1624,7 @@ showhide(Client *c) ++ ++ if (!realfullscreen) ++ return; ++ + c->isfloating = c->oldstate; + c->bw = c->oldbw; + c->x = c->oldx; +@@ -1618,7 +1628,7 @@ showhide(Client *c) if (ISVISIBLE(c)) { /* show clients top down */ XMoveWindow(dpy, c->win, c->x, c->y); @@ -114,16 +75,7 @@ index 4465af1..72fefd1 100644 resize(c, c->x, c->y, c->w, c->h, 0); showhide(c->snext); } else { -@@ -1710,7 +1716,7 @@ togglefloating(const Arg *arg) - { - if (!selmon->sel) - return; -- if (selmon->sel->isfullscreen) /* no support for fullscreen windows */ -+ if (realfullscreen && selmon->sel->isfullscreen) /* no support for fullscreen windows */ - return; - selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; - if (selmon->sel->isfloating) -@@ -1719,6 +1725,12 @@ togglefloating(const Arg *arg) +@@ -1719,6 +1729,12 @@ togglefloating(const Arg *arg) arrange(selmon); }