fixed urgency hint, though Xinerama integration is still ongoing
59aa02a0
1 file(s) · +17 −9
| 55 | 55 | * #define BW sw |
|
| 56 | 56 | * bh is calculated automatically and should be used for the |
|
| 57 | 57 | */ |
|
| 58 | - | #ifdef XINERAMA |
|
| 58 | + | //#ifdef XINERAMA |
|
| 59 | 59 | #include <X11/extensions/Xinerama.h> |
|
| 60 | - | #endif |
|
| 60 | + | //#endif |
|
| 61 | 61 | ||
| 62 | 62 | /* macros */ |
|
| 63 | 63 | #define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) |
|
| 1474 | 1474 | int screens = 1; |
|
| 1475 | 1475 | unsigned int i; |
|
| 1476 | 1476 | XSetWindowAttributes wa; |
|
| 1477 | - | #ifdef XINERAMA |
|
| 1477 | + | //#ifdef XINERAMA |
|
| 1478 | 1478 | XineramaScreenInfo *info; |
|
| 1479 | - | #endif |
|
| 1479 | + | //#endif |
|
| 1480 | 1480 | ||
| 1481 | 1481 | /* init screen */ |
|
| 1482 | 1482 | screen = DefaultScreen(dpy); |
|
| 1485 | 1485 | sy = 0; |
|
| 1486 | 1486 | sw = DisplayWidth(dpy, screen); |
|
| 1487 | 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 | 1497 | /* init atoms */ |
|
| 1490 | 1498 | wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); |
|
| 1500 | 1508 | cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); |
|
| 1501 | 1509 | ||
| 1502 | 1510 | ncols = 2; |
|
| 1503 | - | #ifdef XINERAMA |
|
| 1511 | + | #if 0 |
|
| 1504 | 1512 | if(XineramaIsActive(dpy)) { |
|
| 1505 | 1513 | if((info = XineramaQueryScreens(dpy, &screens))) { |
|
| 1506 | - | if(screens == 1) { |
|
| 1514 | + | if(screens >= 1) { |
|
| 1507 | 1515 | sx = info[0].x_org; |
|
| 1508 | 1516 | sy = info[0].y_org; |
|
| 1509 | 1517 | sw = info[0].width; |
|
| 1523 | 1531 | } |
|
| 1524 | 1532 | } |
|
| 1525 | 1533 | else |
|
| 1526 | - | #endif |
|
| 1527 | 1534 | { |
|
| 1528 | 1535 | cols = emallocz(ncols * sizeof(Column)); |
|
| 1529 | 1536 | cols[0].x = sx; |
|
| 1530 | 1537 | cols[0].y = sy; |
|
| 1531 | - | ||
| 1532 | - | ||
| 1533 | 1538 | } |
|
| 1539 | + | #endif |
|
| 1534 | 1540 | /* init appearance */ |
|
| 1535 | 1541 | dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); |
|
| 1536 | 1542 | dc.norm[ColBG] = getcolor(NORMBGCOLOR); |
|
| 1864 | 1870 | updatewmhints(Client *c) { |
|
| 1865 | 1871 | XWMHints *wmh; |
|
| 1866 | 1872 | ||
| 1873 | + | if(c == sel) |
|
| 1874 | + | return; |
|
| 1867 | 1875 | if((wmh = XGetWMHints(dpy, c->win))) { |
|
| 1868 | 1876 | c->isurgent = (wmh->flags & XUrgencyHint) ? True : False; |
|
| 1869 | 1877 | XFree(wmh); |
|