Mercurial > audlegacy-plugins
changeset 617:312bc3bb686e trunk
[svn] - aosd: added window class hints (aosd.Audacious)
author | giacomo |
---|---|
date | Wed, 07 Feb 2007 18:26:47 -0800 |
parents | 30f74d6b75cf |
children | a7a28782c1b0 |
files | ChangeLog src/aosd/ghosd.c |
diffstat | 2 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <james@develia.org> + 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 <nenolod@sacredspiral.co.uk> revision [1316] - avoid NULL dereference. closes mandriva #28603.
--- 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; }