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

List:       kde-devel
Subject:    Re: KWin::info.pid
From:       Nathan Gray <n8gray () caltech ! edu>
Date:       2003-06-25 22:11:22
[Download RAW message or body]

Lubos Lunak wrote:

> On Wednesday 25 of June 2003 00:52, Nathan Gray wrote:
>> Roger Larsson wrote:
> [snip]
>> Ah, now I'm noticing something interesting.  *All* nedit windows return
>> pid
>> 0 in the loop.  It must be something about NEdit not setting the window
>> property.
> 
>  Yes, it's so. NEdit doesn't have support for this property.

I understand now.  It would be nice if the documentation was a little bit
more clear about what's required of a client for it to work.  As it stands,
the only docs for pid() are in NETWinInfo and they just say "Returns the
process id for the client window."  It would be more useful if they said
"Returns the process id for the client window if it supports the
_NET_WM_PID property, 0 otherwise."

>> If anybody knows what a client needs to do to make the code
>> above work please let me know.  In the meantime I'll try to figure it out
>> for myself.
> 
>  I personally think that embedding an application that itself doesn't
>  support
> being embedded will always be an ugly hack, whichever way you do it. 

I agree.  I'm hoping there's a way to support nedit in KDevelop without
embedding it, but for the moment that's the way the kpart works.  I am an
NEdit developer, though, so if it's not too hard to make NEdit embeddable I
can try to work on that end too.

> For
> this NEdit case, you could try searching windows for NEdit's WM_CLASS
> property (xprop | grep WM_CLASS to see what I mean). The Xlib function is
> called XGetClassHint(), and you could possibly also read
> http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5 , and be aware of the
> fact that many apps have this screwed up, and set it differently than the
> specification says.

Unfortunately that will just identify *any* nedit window, and I need to be
able to identify the specific window that I launched.  I cooked up a patch
for nedit to support the _NET_WM_PID property but it looks like it's
unlikely to get in before the imminent release of nedit 5.4.

Cheers,
-n8

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->

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