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

List:       kde-devel
Subject:    Re: Detecting Application Windows (was Re: Re:)
From:       l.lunak () suse ! cz
Date:       2004-01-10 23:34:23
Message-ID: 200401102330.50559.
[Download RAW message or body]

Dne Saturday 10 of January 2004 14:33 Kevin Krammer napsal(a):
> On Saturday 10 January 2004 12:49, Jon Black wrote:
> > The problem with that is that it lists all applications, even those
> > without windows. I'm sure if that would be practical. Plus, that does
> > raise the issue of how to do it programtically, as you said. I just want
> > to be able to detect an executed application that has a window.
> >
> > I was told in IRC that KDE does this via X11. When an application is
> > started, it registers with X11, which then gives it a window. I think
> > this is correct anyway. I can't find any information on this. I was
> > hoping to somehow receive a signal about a window being created, grab the
> > windows ID or something to that effect, so that I can then use it to move
> > it across different desktops.
> >
> > I suppose another question is to ask if anyone knows how multiple
> > desktops work, and the pager?
>
> Maybe you should consider adding that functionality to the WindowManager.
> It is the one which is notified about new windows and then decides where to
> place them.
> Your idea seems to be another placement strategy.

 If you just want certain windows to be always placed on certain virtual 
desktops, maybe 'Store window settings' in the Alt+F3 menu could do. The 
functionality provided by this function is currently not that great though, 
so it possibly won't work sufficiently for your needs (planned to be 
noticeably improved for 3.3).

 If youl want to code it yourself, use either kdebase/kicker/taskmanager or 
the KWinModule class (and KWin::windowInfo() to get details about a window), 
as already said by Rich. To find out to which kind of application a window 
belongs (i.e. konqueror, kmail,...), use Task::classClass() with the 
taskmanager API; if using KWin(Module), you'll have to use X11 call 
XGetClassHint() I'm afraid. On the other hand, the taskmanager API is not 
public :-/.

-- 
 Lubos Lunak
 KDE Developer
 
>> Visit http://mail.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