On Thu, 7 Oct 2010 23:07:28 +0100
Thomas Adam <[email protected]> wrote:

> On Thu, Oct 07, 2010 at 11:17:35PM +0200, Pavel Vávra wrote:
> > Hi,
> 
> >   thank you for your fast, clear and short answer. I am going to wait next
> >   8 years ... and then ask again :-) <--just kidding. Well, I'll try to
> >   find a way with existing tools.  Just a sub-question from another point
> >   of view: is any possibility to run *anything* just before window loose
> >   its focus? I have an idea to create a window shot just before it is
> >   unfocussed and use this picture later, when expose will be required.
> 
> Not "just before", no, as the event that's triggered when there's a loss of
> focus, or the pointer leaves the window, happens at the time when the window
> can only lose focus.
> 
> What is it you're trying to do?

My idea is to collect windowshots and use it later as icons in expose function, 
i.e. run xwd as firs action when window looses its focus. To better explaining 
I'll attach my source based on existing implementation. It is not clean code, 
just early alpha developoment. Please ignore all non-english comments. When I 
try to make windowshots  now, it has some "bugs", relevant one is described 
below:

+ I PipeRead "echo Raise ; xwd <etc.>  "
    reports error for windows on non-visible page of virtual screen

+ I PipeRead "echo Focus ; echo Raise ; xwd <etc.> "
    will make windowshots for all windows, but some windows are not properly 
drawn, it needs some time to refreshing them and I do not know how to wait for 
it (and I do not like constants like "wait 2 seconds", the better way is when 
window reports "OK, I am redrawn just now")

So my idea is to display windowshot from the time when focus is going to 
another window - it is good approach (at least for me) to find this window 
later on list.

It will eliminate other 2 bugs - flickering of screen done by sequence of Raise 
functions and too looooong time to prepare all windowshots for menu.


Pavel

> 
> -- Thomas Adam
> 
> -- 
> "Deep in my heart I wish I was wrong.  But deep in my heart I know I am
> not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
> 
> 

Attachment: pgp43Cw4IWz9A.pgp
Description: PGP signature

Reply via email to