On 4/15/07, Christian Garbs <mitch_AT_cgarbs.de> wrote:
> Hi!
>
> I've release dwm-mitch 2.7 which contains Xrandr support (it's based
> on a Xrandr pull request for wmii). Perhaps someone will find this useful.
well i've already wrote an xrandr pull request which is much simplisticr
note that you have to resize the barwin! (= free + createpixmap + resize)
so your XConfigureWindow() is not enough if you want to make the
barwin wider (also XResizeWindow is better since we do not want to
move it)
my screen resize func:
void
screenresize() {
int w, h;
w = DisplayWidth(dpy, screen);
h = DisplayHeight(dpy, screen);
if(w == sw && h == sh)
return;
sw = w;
sh = h;
wax = sx;
way = sy + bh;
wah = sh - bh;
waw = sw;
mh = (MASTERH * wah) / 1024;
mw = (MASTERW * waw) / 1024;
XFreePixmap(dpy, dc.drawable);
dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
XResizeWindow(dpy, barwin, sw, bh);
arrange();
}
Received on Sun Apr 15 2007 - 19:11:33 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:40:44 UTC