updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / dwm-krash / dwm-5.8.2-offset_monitor.patch
blob2f6a9b12473100e2c100911cb7dd4d59378f8a26
1 diff -uNr dwm-5.8.2.orig/config.def.h dwm-5.8.2/config.def.h
2 --- dwm-5.8.2.orig/config.def.h 2010-06-04 13:39:15.000000000 +0300
3 +++ dwm-5.8.2/config.def.h 2010-09-12 02:30:36.000000000 +0300
4 @@ -13,6 +13,9 @@
5 static const Bool showbar = True; /* False means no bar */
6 static const Bool topbar = True; /* False means bottom bar */
8 +static const unsigned int offsettoppx = 0;
9 +static const unsigned int offsetbottompx = 0;
11 /* tagging */
12 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
14 diff -uNr dwm-5.8.2.orig/dwm.c dwm-5.8.2/dwm.c
15 --- dwm-5.8.2.orig/dwm.c 2010-06-04 13:39:15.000000000 +0300
16 +++ dwm-5.8.2/dwm.c 2010-09-12 02:11:54.000000000 +0300
17 @@ -1848,10 +1848,13 @@
19 if(!mons)
20 mons = createmon();
21 - if(mons->mw != sw || mons->mh != sh) {
22 + if( mons->my != offsettoppx ||
23 + mons->mw != sw ||
24 + mons->mh != sh - offsettoppx - offsetbottompx ) {
25 dirty = True;
26 + mons->my = mons->wy = offsettoppx;
27 mons->mw = mons->ww = sw;
28 - mons->mh = mons->wh = sh;
29 + mons->mh = mons->wh = sh - offsettoppx - offsetbottompx;
30 updatebarpos(mons);