On 2009-11-19 at 10:01:49 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > Stephan Assmus <superstippi@xxxxxx> wrote: > > On 2009-11-19 at 07:59:16 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> > > > wrote: > > > superstippi@xxxxxx wrote: > > > > + // Now tell the application roster, that we're interested > > > > + // in getting notifications of apps being launched or quit. > > > Just out of curiosity: what changes by moving this into the > > > constructor? > > When launching MediaPlayer to open a file, RefsReceived is called > > earlier > > than ReadyToRun(), so the first window is created before we check on the > > media_server and offer to start it. > > Thanks for the explanation! > One really has to know what to do when using ReadyToRun(). Unfortunately, this whole window position remembering thing became a bit complicated. Mostly because I want to distinguish between video and audio/no content. MediaPlayer wants to open a window right away, but if asked to open a file, it is not yet known whether it's video or audio. I thought about using some file name based logic to make a first choice, which hopefully leaves the false positives to a minimum. Any other ideas? At the moment, when you open a video file with MediaPlayer (only when it's not yet running), it opens at the default audio content location, and then finds out the file was a video and moves the window into view if it was out of the screen. One could of course not open in the previous location when launched with a file, but when I drop an audio album on the MediaPlayer icon, I don't want it to restore the previous playlist, but I do want it to open at the last position. This is the moment where it is unkown (yet) whether I dropped a video or audio content. So where to open the window? Delaying to show the window until the content type is known is no option, right? Best regards, -Stephan