* TODO: Idea:
* I intend to not provide real Xinerama support, but instead having a Column
* tilecols[] array which is used by tile(), and a Column maxcols[] arrays which is used by
- * maximise(). Those arrays should be initialized in config.h. For simplicity
+ * monocle(). Those arrays should be initialized in config.h. For simplicity
* reasons mwfact should be replaced with a more advanced method which
* implements the same, but using the boundary between tilecols[0] and
* tilecols[1] instead. Besides this, get rid of BARPOS and use instead the
* #define BW sw
* bh is calculated automatically and should be used for the
*/
-#ifdef XINERAMA
+//#ifdef XINERAMA
#include <X11/extensions/Xinerama.h>
-#endif
+//#endif
/* macros */
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
void manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
-void maximise(void);
+void monocle(void);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
}
void
-maximise(void) {
+monocle(void) {
Client *c;
domwfact = dozoom = False;
int screens = 1;
unsigned int i;
XSetWindowAttributes wa;
-#ifdef XINERAMA
+//#ifdef XINERAMA
XineramaScreenInfo *info;
-#endif
+//#endif
/* init screen */
screen = DefaultScreen(dpy);
sy = 0;
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
+ if(XineramaIsActive(dpy)) {
+ if((info = XineramaQueryScreens(dpy, &screens))) {
+ sx = info[0].x_org;
+ sy = info[0].y_org;
+ sw = info[0].width;
+ sh = info[0].height;
+ }
+ }
/* init atoms */
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
ncols = 2;
-#ifdef XINERAMA
+#if 0
if(XineramaIsActive(dpy)) {
if((info = XineramaQueryScreens(dpy, &screens))) {
- if(screens == 1) {
+ if(screens >= 1) {
sx = info[0].x_org;
sy = info[0].y_org;
sw = info[0].width;
}
}
else
-#endif
{
cols = emallocz(ncols * sizeof(Column));
cols[0].x = sx;
cols[0].y = sy;
-
-
}
+#endif
/* init appearance */
dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
dc.norm[ColBG] = getcolor(NORMBGCOLOR);
XWMHints *wmh;
if((wmh = XGetWMHints(dpy, c->win))) {
- c->isurgent = (wmh->flags & XUrgencyHint) ? True : False;
+ if(c == sel)
+ sel->isurgent = False;
+ else
+ c->isurgent = (wmh->flags & XUrgencyHint) ? True : False;
XFree(wmh);
}
}