# HG changeset patch # User giacomo # Date 1170901607 28800 # Node ID 312bc3bb686e8d616761f1ce4d55ed5da0efed68 # Parent 30f74d6b75cfc4432fa1a3193e2c29df86e60cf4 [svn] - aosd: added window class hints (aosd.Audacious) diff -r 30f74d6b75cf -r 312bc3bb686e ChangeLog --- a/ChangeLog Wed Feb 07 17:46:12 2007 -0800 +++ b/ChangeLog Wed Feb 07 18:26:47 2007 -0800 @@ -1,3 +1,10 @@ +2007-02-08 01:46:12 +0000 Giacomo Lozito + revision [1318] + - aosd: added _NET_WM_WINDOW_TYPE_DOCK to osd window hints + trunk/src/aosd/ghosd.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + + 2007-02-07 18:35:13 +0000 William Pitcock revision [1316] - avoid NULL dereference. closes mandriva #28603. diff -r 30f74d6b75cf -r 312bc3bb686e src/aosd/ghosd.c --- a/src/aosd/ghosd.c Wed Feb 07 17:46:12 2007 -0800 +++ b/src/aosd/ghosd.c Wed Feb 07 18:26:47 2007 -0800 @@ -113,6 +113,11 @@ static void set_hints(Display *dpy, Window win) { + XSizeHints *sizehints; + XClassHint *classhints; + char *res_class = "Audacious"; + char *res_name = "aosd"; + /* we're almost a _NET_WM_WINDOW_TYPE_SPLASH, but we don't want * to be centered on the screen. instead, manually request the * behavior we want. */ @@ -120,7 +125,6 @@ /* turn off window decorations. * we could pull this in from a motif header, but it's easier to * use this snippet i found on a mailing list. */ - XSizeHints *sizehints; Atom mwm_hints = XInternAtom(dpy, "_MOTIF_WM_HINTS", False); #define MWM_HINTS_DECORATIONS (1<<1) struct { @@ -161,6 +165,12 @@ sizehints->height = 1; XSetWMNormalHints(dpy, win, sizehints); XFree( sizehints ); + + classhints = XAllocClassHint(); + classhints->res_name = res_name; + classhints->res_class = res_class; + XSetClassHint(dpy, win, classhints); + XFree( classhints ); } static Window @@ -168,8 +178,6 @@ Window win; XSetWindowAttributes att; - /* XXX I don't understand X well enough to know if these are the correct - * settings. */ att.backing_store = WhenMapped; att.background_pixel = None; att.border_pixel = 0; @@ -187,8 +195,6 @@ set_hints(dpy, win); - /* XXX: XSetClassHint? */ - return win; }