On Wed, Dec 13, 2006 at 12:19:19PM +0100, Anselm R. Garbe wrote:
> One remark I forget to mention. If no WM runs, XWM don't tries
> to getInsets, because that won't make any sense obviously...

I was wondering if running the java app inside a nested X server would 
work as a hack to make it behave usably?  I presume that the app would 
see no window manager and therefore not activate the java WM-specific 
hacks. 

I have installed Xephyr (called xserver-xephyr under Debian) to try this 
out, but I've not had time to seriously play with it yet.  The oddity I 
have seen, though, is that dwm rules seem unable to match the xephyr 
window when it appears - there seems to be no class:instance:title info 
to match against (I patched tag.c to print this info to stderr (as shown 
below) - it works fine for all my other clients so far, but prints 
nothing for xephyr).  

What am I missing?  Is this likely to help with the java apps anyway?

Karl.


=============================
void
settags(Client *c, Client *trans) {
        char prop[512];
        unsigned int i, j;
        regmatch_t tmp;
        Bool matched = trans != NULL;
        XClassHint ch;

        if(matched) {
                for(i = 0; i < ntags; i++)
                        c->tags[i] = trans->tags[i];
        }
        else if(XGetClassHint(dpy, c->win, &ch)) {
                snprintf(prop, sizeof prop, "%s:%s:%s",
                                ch.res_class ? ch.res_class : "",
                                ch.res_name ? ch.res_name : "", c->name);
                fprintf(stderr, "%s\n", prop);  // KMW: print new-client info 
to stderr
                for(i = 0; i < len; i++)
                        if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 
1, &tmp, 0)) {
                                c->isfloat = rule[i].isfloat;
                                for(j = 0; rreg[i].tregex && j < ntags; j++) {
                                        if(!regexec(rreg[i].tregex, tags[j], 1, 
&tmp, 0)) {
                                                matched = True;
                                                c->tags[j] = True;
                                        }
                                }
                        }
                if(ch.res_class)
                        XFree(ch.res_class);
                if(ch.res_name)
                        XFree(ch.res_name);
        }
        if(!matched)
                for(i = 0; i < ntags; i++)
                        c->tags[i] = seltag[i];
}

Reply via email to