Hi,
I'm developing an audio editor where the user can open multiple audio
files at once. So there is a main window and a child window for each
sound loaded (by window I mean, top level, with title bar and all)...
Now, the play control and action buttons are on the separate main
window... I would like to have the idea of the 'active' sound window so
that when the user hits the play button it plays the sound for the
'active' sound window...
The question remains: "How do I know what the 'active' sound window
is"
- Is it the last focused sound window? No, because I like the
focus to follow the mouse pointer.
- Well, I think it's the last window raised. But, alas, there
is no X event for when a window is raised.
What I thought I might be able to do is query the window stacking
order from X... If I knew the top most window (which represents a loaded
sound), then that would be the window for which I play the sound when
the play button is pressed.
Another possibility is to be able to ask X if a window is above or
below another. If I went through each sound window I could see which is
not below any other sound window, and *that* would be the one I play.
(*This is my favorite solution)
Another solution (rinky-dink as it is) would be to have a check
button in the upper-most left hand corner of each sound window and the
user has to check the one he wants to be the 'active' window and when he
checks one, it unchecks the one that was previously checked.
My last resort (at the moment) will be to raise a window when it gets
the focus, so the user is forced into arranging his windows in such a
way that he doesn't accidently focus one he doesn't want to play on the
cursor's way to the play button.
Does anyone (please) have some ideas? An on-raise event or method of
querying the stacking order would REALLY help...
Thanks,
Davy
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert