Mercurial > audlegacy-plugins
changeset 614:354389b85dce trunk
[svn] - aosd, further work on ghosd source: do not use a override_redirect=true window and give the WM information about initial pos/size of osd (prevents flickering with normal windows); now the osd won't be displayed in multiple workspaces, only in the one where it's initially triggered
author | giacomo |
---|---|
date | Wed, 07 Feb 2007 03:52:25 -0800 |
parents | 85a70ace8c02 |
children | 1fb44c12a812 |
files | ChangeLog src/aosd/ghosd.c |
diffstat | 2 files changed, 49 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Feb 07 01:10:37 2007 -0800 +++ b/ChangeLog Wed Feb 07 03:52:25 2007 -0800 @@ -1,3 +1,15 @@ +2007-02-07 09:10:37 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> + revision [1312] + - press F5 on not yet played stream no longer hangs. + - some cleanups. + + trunk/src/madplug/TODO | 4 +- + trunk/src/madplug/fileinfo.c | 5 +-- + trunk/src/madplug/input.c | 1 + trunk/src/madplug/plugin.c | 65 +++++++++++++++++++++++++++---------------- + 4 files changed, 47 insertions(+), 28 deletions(-) + + 2007-02-07 05:01:15 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [1310] - fix for audmad_is_our_fd()
--- a/src/aosd/ghosd.c Wed Feb 07 01:10:37 2007 -0800 +++ b/src/aosd/ghosd.c Wed Feb 07 03:52:25 2007 -0800 @@ -15,6 +15,30 @@ #include "ghosd.h" #include "ghosd-internal.h" +static unsigned long +get_current_workspace(Ghosd *ghosd) { + Atom cur_workspace_atom; + Atom type; + int format; + unsigned long nitems, bytes_after; + unsigned char *data; + + cur_workspace_atom = XInternAtom(ghosd->dpy, "_NET_CURRENT_DESKTOP", False); + XGetWindowProperty(ghosd->dpy, DefaultRootWindow(ghosd->dpy), cur_workspace_atom, + 0, ULONG_MAX, False, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &data); + + if ( type == XA_CARDINAL ) + { + unsigned long cur_workspace = (unsigned long)*data; + g_print("debug: %i\n", cur_workspace); + XFree( data ); + return cur_workspace; + } + + /* fall back to desktop number 0 */ + return 0; +} + static Pixmap take_snapshot(Ghosd *ghosd) { Pixmap pixmap; @@ -96,6 +120,7 @@ /* 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 { @@ -116,6 +141,17 @@ }; XChangeProperty(dpy, win, win_state, XA_ATOM, 32, PropModeReplace, (unsigned char*)&win_state_setting, 3); + + /* give initial pos/size information to window manager + about the window, this prevents flickering */ + sizehints = XAllocSizeHints(); + sizehints->flags = USPosition | USSize; + sizehints->x = -1; + sizehints->y = -1; + sizehints->width = 1; + sizehints->height = 1; + XSetWMNormalHints(dpy, win, sizehints); + XFree( sizehints ); } static Window @@ -131,7 +167,7 @@ att.background_pixmap = None; att.save_under = True; att.event_mask = ExposureMask | StructureNotifyMask | ButtonPressMask; - att.override_redirect = True; + att.override_redirect = False; win = XCreateWindow(dpy, DefaultRootWindow(dpy), -1, -1, 1, 1, 0,