[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Feature idea/app-starting
From:       Bill Soudan <wes0472 () rit ! edu>
Date:       2000-05-31 1:52:02
[Download RAW message or body]


On Tue, 30 May 2000, Waldo Bastian wrote:

> On Tue, 30 May 2000, Bill Soudan wrote:
> >
> > How about 'remembering' the desktop that is currently selected when an
> > application is started, and then making sure that the application's first
> > window is mapped onto this desktop?  This has always bugged me about KDE1.
> > I'll often take a pass through my desktops when I first log in, and start
> > up the applications that I like to have running on each one.
> > Unfortunately, I need to wait until the applications maps its window
> > before I can change.
> >
> > Anyone else think this would be a good idea?  It seems intuitive to me to
> > make sure the application actually pops up on the desktop you start it on.
> 
> Very good idea.. this annoys me as well... maybe Rik can add support for this 
> with his app-starting notification.

Yes, exactly what I was thinking!

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.

2.  Rik's libkmapnotify code reads this env variable, and sets some sort
of property on the initial window which indicates the correct desktop.

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 );
    }  

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.

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 :)

Another question - does any other desktop environment/window manager out
there do this?  I'm so KDE biased, I have no idea :)

Bill

 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic