From kde-devel Wed May 31 19:31:43 2000 From: Rik Hemsley Date: Wed, 31 May 2000 19:31:43 +0000 To: kde-devel Subject: Re: Feature idea/app-starting X-MARC-Message: https://marc.info/?l=kde-devel&m=95980502812642 #if Bill Soudan > I spent some more time browsing through the code. Here's the best > solution I can come up with, which should work for all X apps: > > 1. In addition to setting the LD_PRELOAD env variable, KRun::run also > sets a KWIN_INITIAL_DESKTOP env variable, or something to that effect. Sounds ok. > 2. Rik's libkmapnotify code reads this env variable, and sets some sort > of property on the initial window which indicates the correct desktop. Yep, should be possible. > 3. KWin's Client::manage method reads this property to determine the > initial desktop, instead of the current method: > > // initial desktop placement > if ( info ) { > desk = info->desktop; > } else { > // assume window wants to be visible on the current desktop > desk = workspace()->currentDesktop(); > > // KDE 1.x compatibility > desk = KWM::desktop( win ); > } Yep. > Sounds straightforward to me, provided it's okay for me to call > KWM::currentDesktop in KRun? Would I be horribly violating any sort of > modularity? KRun already depends on kdecore. No, that's OK. kwm.h is in kdecore and kio depends on that. > If someone more experienced than I can give this a thumbs up, I'll get a > patch out ASAP (or even just commit the code :) Yep, if you can do either that would be great - saves me work ;) > Another question - does any other desktop environment/window manager out > there do this? I'm so KDE biased, I have no idea :) I'm not sure - I don't use multiple desktops :) Rik >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<