On Tue, Dec 11, 2012 at 09:35:12AM +0100, Antonio Quartulli wrote:
> XKeycodeToKeysym is now deprecated in favour of XkbKeycodeToKeysym
> (X11/XKBlib.h). This patch substitutes the former with  the latter in dwm.c
> 
> Signed-off-by: Antonio Quartulli <[email protected]>
> ---
>  }
> +void
> +setwmname(const char *name) {
> +     Window wincheck = XCreateSimpleWindow(dpy, root, -10, -10, 5, 5, 0, 0, 
> 0);
> +
> +     if(wincheck != None) {
> +             Atom m_net_supporting_wm_check = XInternAtom(dpy, 
> "_NET_SUPPORTING_WM_CHECK", False);
> +             Atom utf8_string = XInternAtom(dpy, "UTF8_STRING", False);
> +
> +             XChangeProperty(dpy, root, m_net_supporting_wm_check, 
> XA_WINDOW, 32, PropModeReplace, (unsigned char *)&wincheck, 1);
> +             XChangeProperty(dpy, wincheck, m_net_supporting_wm_check, 
> XA_WINDOW, 32, PropModeReplace, (unsigned char *)&wincheck, 1);
> +             XChangeProperty(dpy, wincheck, netatom[NetWMName], utf8_string, 
> 8, PropModeReplace, (unsigned char *)name, strlen(name));
> +     }
> +}
> +
>  
>  void
>  restack(Monitor *m) {
> @@ -1615,6 +1630,7 @@ setup(void) {
>       netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", 
> False);
>       netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, 
> "_NET_WM_WINDOW_TYPE_DIALOG", False);
>       netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
> +     setwmname("LG3D");
>       /* init cursors */
>       cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
>       cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
> @@ -1626,6 +1642,9 @@ setup(void) {
>       dc.sel[ColBorder] = getcolor(selbordercolor);
>       dc.sel[ColBG] = getcolor(selbgcolor);
>       dc.sel[ColFG] = getcolor(selfgcolor);
> +     dc.urg[ColBorder] = getcolor(urgbordercolor);
> +     dc.urg[ColBG] = getcolor(selbgcolor);
> +     dc.urg[ColFG] = getcolor(selfgcolor);
>       dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, 
> DefaultDepth(dpy, screen));
>       dc.gc = XCreateGC(dpy, root, 0, NULL);
>       XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
> -- 
> 1.8.0

sorry this was not intended to be committed.
Will send v2

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachment: pgpLSWB7m7Ewn.pgp
Description: PGP signature

Reply via email to