X-Git-Url: http://pileus.org/git/?p=wmpus;a=blobdiff_plain;f=sys-x11.c;h=fa66a31d83a2fedffbb78efc65931008ad6c3dbe;hp=a0c3e8fe98c85a2b646ff98ad5c3006fac3f081f;hb=33194e81b7543a4019d71c9a8c183e3500e1e994;hpb=958cbdf3fd18f2545dcaaa33384b9ad8c16f87f2 diff --git a/sys-x11.c b/sys-x11.c index a0c3e8f..fa66a31 100644 --- a/sys-x11.c +++ b/sys-x11.c @@ -403,6 +403,8 @@ static int xerror(Display *dpy, XErrorEvent *err) (err->request_code == X_GrabKey && err->error_code == BadAccess ) || (err->request_code == X_CopyArea && err->error_code == BadDrawable)) return 0; + if (err->request_code == X_ChangeWindowAttributes && err->error_code == BadAccess) + error("Another window manager is already running"); return xerrorxlib(dpy, err); } @@ -568,7 +570,7 @@ win_t *sys_init(void) colors[CLR_FOCUS] = get_color(dpy, "#a0a0ff"); colors[CLR_UNFOCUS] = get_color(dpy, "#101066"); colors[CLR_URGENT] = get_color(dpy, "#ff0000"); - printf("colors = #%06lx #%06lx #%06lx\n", colors[0], colors[1], colors[2]); + //printf("colors = #%06lx #%06lx #%06lx\n", colors[0], colors[1], colors[2]); /* Select window management events */ XSelectInput(dpy, xid, SubstructureRedirectMask|SubstructureNotifyMask);