summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-05 10:22:21 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-05 10:22:21 +0000
commit59aa02a0750ebc82dbcb30897bbf427391edffa0 (patch)
tree04a4ed150f42350d345284e818f5fd9b3a459bfa /dwm.c
parentnext on TODO (diff)
downloaddwm-59aa02a0750ebc82dbcb30897bbf427391edffa0.tar.gz
dwm-59aa02a0750ebc82dbcb30897bbf427391edffa0.zip
fixed urgency hint, though Xinerama integration is still ongoing
Diffstat (limited to '')
-rw-r--r--dwm.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/dwm.c b/dwm.c
index af13a58..68a9d1d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -55,9 +55,9 @@
55 * #define BW sw 55 * #define BW sw
56 * bh is calculated automatically and should be used for the 56 * bh is calculated automatically and should be used for the
57 */ 57 */
58#ifdef XINERAMA 58//#ifdef XINERAMA
59#include <X11/extensions/Xinerama.h> 59#include <X11/extensions/Xinerama.h>
60#endif 60//#endif
61 61
62/* macros */ 62/* macros */
63#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) 63#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
@@ -1474,9 +1474,9 @@ setup(void) {
1474 int screens = 1; 1474 int screens = 1;
1475 unsigned int i; 1475 unsigned int i;
1476 XSetWindowAttributes wa; 1476 XSetWindowAttributes wa;
1477#ifdef XINERAMA 1477//#ifdef XINERAMA
1478 XineramaScreenInfo *info; 1478 XineramaScreenInfo *info;
1479#endif 1479//#endif
1480 1480
1481 /* init screen */ 1481 /* init screen */
1482 screen = DefaultScreen(dpy); 1482 screen = DefaultScreen(dpy);
@@ -1485,6 +1485,14 @@ setup(void) {
1485 sy = 0; 1485 sy = 0;
1486 sw = DisplayWidth(dpy, screen); 1486 sw = DisplayWidth(dpy, screen);
1487 sh = DisplayHeight(dpy, screen); 1487 sh = DisplayHeight(dpy, screen);
1488 if(XineramaIsActive(dpy)) {
1489 if((info = XineramaQueryScreens(dpy, &screens))) {
1490 sx = info[0].x_org;
1491 sy = info[0].y_org;
1492 sw = info[0].width;
1493 sh = info[0].height;
1494 }
1495 }
1488 1496
1489 /* init atoms */ 1497 /* init atoms */
1490 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); 1498 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
@@ -1500,10 +1508,10 @@ setup(void) {
1500 cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); 1508 cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
1501 1509
1502 ncols = 2; 1510 ncols = 2;
1503#ifdef XINERAMA 1511#if 0
1504 if(XineramaIsActive(dpy)) { 1512 if(XineramaIsActive(dpy)) {
1505 if((info = XineramaQueryScreens(dpy, &screens))) { 1513 if((info = XineramaQueryScreens(dpy, &screens))) {
1506 if(screens == 1) { 1514 if(screens >= 1) {
1507 sx = info[0].x_org; 1515 sx = info[0].x_org;
1508 sy = info[0].y_org; 1516 sy = info[0].y_org;
1509 sw = info[0].width; 1517 sw = info[0].width;
@@ -1523,14 +1531,12 @@ setup(void) {
1523 } 1531 }
1524 } 1532 }
1525 else 1533 else
1526#endif
1527 { 1534 {
1528 cols = emallocz(ncols * sizeof(Column)); 1535 cols = emallocz(ncols * sizeof(Column));
1529 cols[0].x = sx; 1536 cols[0].x = sx;
1530 cols[0].y = sy; 1537 cols[0].y = sy;
1531
1532
1533 } 1538 }
1539#endif
1534 /* init appearance */ 1540 /* init appearance */
1535 dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); 1541 dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
1536 dc.norm[ColBG] = getcolor(NORMBGCOLOR); 1542 dc.norm[ColBG] = getcolor(NORMBGCOLOR);
@@ -1864,6 +1870,8 @@ void
1864updatewmhints(Client *c) { 1870updatewmhints(Client *c) {
1865 XWMHints *wmh; 1871 XWMHints *wmh;
1866 1872
1873 if(c == sel)
1874 return;
1867 if((wmh = XGetWMHints(dpy, c->win))) { 1875 if((wmh = XGetWMHints(dpy, c->win))) {
1868 c->isurgent = (wmh->flags & XUrgencyHint) ? True : False; 1876 c->isurgent = (wmh->flags & XUrgencyHint) ? True : False;
1869 XFree(wmh); 1877 XFree(wmh);