commit 6f467be3bfb443904b842cac4be4a975c49efe05
Author: Jaagup Repän <[email protected]>
Date:   Mon Feb 18 19:18:59 2019 +0100

    Fix ClkStatusText location calculation in systray patch

diff --git a/dwm.suckless.org/patches/systray/dwm-6.1-systray.diff 
b/dwm.suckless.org/patches/systray/dwm-6.1-systray.diff
index 58aca75d..42ef622f 100644
--- a/dwm.suckless.org/patches/systray/dwm-6.1-systray.diff
+++ b/dwm.suckless.org/patches/systray/dwm-6.1-systray.diff
@@ -1,8 +1,7 @@
-diff --git a/config.def.h b/config.def.h
-index 7054c06..8393a58 100644
---- a/config.def.h
-+++ b/config.def.h
-@@ -13,6 +13,10 @@ static const char selbgcolor[]      = "#005577";
+diff -up a/config.def.h b/config.def.h
+--- a/config.def.h     2015-11-08 23:39:37.000000000 +0100
++++ b/config.def.h     2019-02-08 16:20:00.296460181 +0100
+@@ -13,6 +13,10 @@ static const char selbgcolor[]      = "#
  static const char selfgcolor[]      = "#eeeeee";
  static const unsigned int borderpx  = 1;        /* border pixel of windows */
  static const unsigned int snap      = 32;       /* snap pixel */
@@ -13,10 +12,9 @@ index 7054c06..8393a58 100644
  static const int showbar            = 1;        /* 0 means no bar */
  static const int topbar             = 1;        /* 0 means bottom bar */
  
-diff --git a/dwm.c b/dwm.c
-index 0362114..1bbce1d 100644
---- a/dwm.c
-+++ b/dwm.c
+diff -up a/dwm.c b/dwm.c
+--- a/dwm.c    2015-11-08 23:39:37.000000000 +0100
++++ b/dwm.c    2019-02-08 16:20:00.296460181 +0100
 @@ -57,12 +57,30 @@
  #define TAGMASK                 ((1 << LENGTH(tags)) - 1)
  #define TEXTW(X)                (drw_text(drw, 0, 0, 0, 0, (X), 0) + 
drw->fonts[0]->h)
@@ -126,7 +124,7 @@ index 0362114..1bbce1d 100644
  static const char broken[] = "broken";
  static char stext[256];
  static int screen;
-@@ -256,9 +292,10 @@ static void (*handler[LASTEvent]) (XEvent *) = {
+@@ -256,9 +292,10 @@ static void (*handler[LASTEvent]) (XEven
        [MapRequest] = maprequest,
        [MotionNotify] = motionnotify,
        [PropertyNotify] = propertynotify,
@@ -138,6 +136,15 @@ index 0362114..1bbce1d 100644
  static int running = 1;
  static Cur *cursor[CurLast];
  static ClrScheme scheme[SchemeLast];
+@@ -438,7 +475,7 @@ buttonpress(XEvent *e)
+                       arg.ui = 1 << i;
+               } else if (ev->x < x + blw)
+                       click = ClkLtSymbol;
+-              else if (ev->x > selmon->ww - TEXTW(stext))
++              else if (ev->x > selmon->ww - TEXTW(stext) - getsystraywidth())
+                       click = ClkStatusText;
+               else
+                       click = ClkWinTitle;
 @@ -479,6 +516,11 @@ cleanup(void)
        XUngrabKey(dpy, AnyKey, AnyModifier, root);
        while (mons)
@@ -356,7 +363,7 @@ index 0362114..1bbce1d 100644
  resize(Client *c, int x, int y, int w, int h, int interact)
  {
        if (applysizehints(c, &x, &y, &w, &h, interact))
-@@ -1290,6 +1430,14 @@ resize(Client *c, int x, int y, int w, int h, int 
interact)
+@@ -1290,6 +1430,14 @@ resize(Client *c, int x, int y, int w, i
  }
  
  void
diff --git a/dwm.suckless.org/patches/systray/dwm-systray-20180314-3bd8466.diff 
b/dwm.suckless.org/patches/systray/dwm-systray-20190208-cb3f58a.diff
similarity index 98%
rename from dwm.suckless.org/patches/systray/dwm-systray-20180314-3bd8466.diff
rename to dwm.suckless.org/patches/systray/dwm-systray-20190208-cb3f58a.diff
index 31fcb16e..ea946fdd 100644
--- a/dwm.suckless.org/patches/systray/dwm-systray-20180314-3bd8466.diff
+++ b/dwm.suckless.org/patches/systray/dwm-systray-20190208-cb3f58a.diff
@@ -1,5 +1,5 @@
 diff --git a/config.def.h b/config.def.h
-index a9ac303..bb623f0 100644
+index 1c0b587..2d824d1 100644
 --- a/config.def.h
 +++ b/config.def.h
 @@ -3,6 +3,10 @@
@@ -14,7 +14,7 @@ index a9ac303..bb623f0 100644
  static const int topbar             = 1;        /* 0 means bottom bar */
  static const char *fonts[]          = { "monospace:size=10" };
 diff --git a/dwm.c b/dwm.c
-index c98678d..5f74da0 100644
+index 4465af1..4bccb41 100644
 --- a/dwm.c
 +++ b/dwm.c
 @@ -57,12 +57,30 @@
@@ -98,7 +98,7 @@ index c98678d..5f74da0 100644
  static void tag(const Arg *arg);
  static void tagmon(const Arg *arg);
  static void tile(Monitor *);
-@@ -223,18 +253,23 @@ static void updateclientlist(void);
+@@ -223,18 +253,23 @@ static int updategeom(void);
  static void updatenumlockmask(void);
  static void updatesizehints(Client *c);
  static void updatestatus(void);
@@ -134,6 +134,15 @@ index c98678d..5f74da0 100644
  static int running = 1;
  static Cur *cursor[CurLast];
  static Clr **scheme;
+@@ -439,7 +475,7 @@ buttonpress(XEvent *e)
+                       arg.ui = 1 << i;
+               } else if (ev->x < x + blw)
+                       click = ClkLtSymbol;
+-              else if (ev->x > selmon->ww - TEXTW(stext))
++              else if (ev->x > selmon->ww - TEXTW(stext) - getsystraywidth())
+                       click = ClkStatusText;
+               else
+                       click = ClkWinTitle;
 @@ -482,6 +518,11 @@ cleanup(void)
        XUngrabKey(dpy, AnyKey, AnyModifier, root);
        while (mons)
diff --git a/dwm.suckless.org/patches/systray/index.md 
b/dwm.suckless.org/patches/systray/index.md
index 7426582b..091f7b16 100644
--- a/dwm.suckless.org/patches/systray/index.md
+++ b/dwm.suckless.org/patches/systray/index.md
@@ -8,8 +8,8 @@ is following the selected monitor.
 
 Download
 --------
-* [dwm-systray-20180314-3bd8466.diff](dwm-systray-20180314-3bd8466.diff) (23K)
-* [dwm-6.1-systray.diff](dwm-6.1-systray.diff) (22K) (20151109)
+* [dwm-systray-20190208-cb3f58a.diff](dwm-systray-20190208-cb3f58a.diff) (24K)
+* [dwm-6.1-systray.diff](dwm-6.1-systray.diff) (24K) (20190208)
 * [dwm-git-20130119-systray.diff](dwm-git-20130119-systray.diff) (19946b)
 * [dwm-systray-6.0.diff](dwm-systray-6.0.diff) (19788b) (20130119)
 


Reply via email to