|
From: Davy D. <dd...@ne...> - 2001-12-14 18:41:40
|
Okay, I'm still trying to figure out just how to get an event when a window is raised... I put some print statements in FXApp::dispatchEvent to see it is even getting called when a window is raised... It doesn't seem to be getting called when I click on one window to raise it above another... Is there something in X's API that you have to specifically ask for the events you want? Is there such a thing as a 'raise' event or is this simply something the window manager does? Alternativly, is there a way of seeing if one window is above another (and I don't mean window in a general since, but specifically a top level window)... If this is possible, I could just iterate over all the top level windows that my app has created (not more than a few) and see which is on top... Is this possible? Thanks, Davy Davy Durham wrote: > Okay.. In my sound editor I have several loaded sounds each with > their own window, then there's a FXMainWindow which has play controls on > it... > > The multiple sound windows were each created with the main window as > their owner (the first argument to FXTopWindow) > > Now, when the user hits the play button, I would like to know the > 'active' sound window and start that one playing..... However I say > 'active' and not focused because some people like to have the focus > follow the mouse pointer (as I do). So when I go to hit the play > button, that sound window is no longer focused.... Also, I can't use > the last-focused-sound-window because as I move the mouse, other > window's might have been focused as the mouse travels to the play button > (although they would not have not come to the top without clicking on > them) > > So what I think I need to do is use the last 'raised' sound window, > as that is the one most probably last edited on that they want to > hear. Well, I tried to get the SEL_RAISED event, but couldn't. > I added a new ID_THIS to my ID enum, then in the constructor of > CSoundWindow I setSelector(ID_THIS) and setTarget(this), and added an > entry in CSoundWindow's map array [SEL_RAISED, CSoundWindow::ID_THIS, > CSoundWindow::onRaised] > I don't seem to ever get the onRaised event... I just need to know > when this FXTopWindow was raised, then I'll set a variable of the main > window in the event handle to 'this' so it'll be the 'last raised' sound > window. > I also tryed overriding raise(), but that only happens initially at > creation > > Any ideas? > > Thanks, > Davy > > _______________________________________________ > Foxgui-users mailing list > Fox...@li... > https://lists.sourceforge.net/lists/listinfo/foxgui-users |