sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-multimon-7-focus_on_active-6.4.patch (1851B)


      1 From ef123521987ec72df95a05542f6558999b673863 Mon Sep 17 00:00:00 2001
      2 From: "Gary B. Genett" <me@garybgenett.net>
      3 Date: Sun, 19 Feb 2023 09:09:23 -0800
      4 Subject: patches/focusonnetactive: dwm-focusonnetactive-6.2.diff
      5 MIME-Version: 1.0
      6 Content-Type: multipart/mixed; boundary="------------2.37.4"
      7 
      8 This is a multi-part message in MIME format.
      9 --------------2.37.4
     10 Content-Type: text/plain; charset=UTF-8; format=fixed
     11 Content-Transfer-Encoding: 8bit
     12 
     13 
     14 	modified from sites: 38b351cf3689ff3fa4845d35ce9894fd9253dbb8
     15 	used old dwm code instead: bb3bd6fec37174e8d4bb9457ca815c00609e5157
     16 ---
     17  dwm.c | 7 +++++--
     18  1 file changed, 5 insertions(+), 2 deletions(-)
     19 
     20 
     21 --------------2.37.4
     22 Content-Type: text/x-patch; name="0007-patches-focusonnetactive-dwm-focusonnetactive-6.2.di.patch"
     23 Content-Transfer-Encoding: 8bit
     24 Content-Disposition: attachment; filename="0007-patches-focusonnetactive-dwm-focusonnetactive-6.2.di.patch"
     25 
     26 diff --git a/dwm.c b/dwm.c
     27 index ac52b8c25991a073db15b55fae774e9c47a05708..3294c2fe53785473397b6e978c79a704cb7e8f25 100644
     28 --- a/dwm.c
     29 +++ b/dwm.c
     30 @@ -530,22 +530,25 @@ clientmessage(XEvent *e)
     31  	Client *c = wintoclient(cme->window);
     32  
     33  	if (!c)
     34  		return;
     35  	if (cme->message_type == netatom[NetWMState]) {
     36  		if (cme->data.l[1] == netatom[NetWMFullscreen]
     37  		|| cme->data.l[2] == netatom[NetWMFullscreen])
     38  			setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD    */
     39  				|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
     40  	} else if (cme->message_type == netatom[NetActiveWindow]) {
     41 -		if (c != selmon->sel && !c->isurgent)
     42 -			seturgent(c, 1);
     43 +		if (!ISVISIBLE(c)) {
     44 +			c->mon->seltags ^= 1;
     45 +			c->mon->tagset[c->mon->seltags] = c->tags;
     46 +		}
     47 +		pop(c);
     48  	}
     49  }
     50  
     51  void
     52  configure(Client *c)
     53  {
     54  	XConfigureEvent ce;
     55  
     56  	ce.type = ConfigureNotify;
     57  	ce.display = dpy;
     58 
     59 --------------2.37.4--
     60 
     61