Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


On Tue, 3 Apr 2012 14:01:29 +0200, fuchur wrote:
>>>      (when (and (window-really-wants-input-p w)
>>> -               (window-visible-p w)
>>> +               (or (window-visible-p w)
>>> +                   (window-workspaces w))
>>>                 (or (let ((focus (input-focus)))  
>>
>>The logic is correct, but please delete this part.  window-workspaces
>>returns nil if it's WS sticky. (It should be documented.) But the
>>original goal of this function is to *focus* the mapped window. With
>>this hunk, a sticky window won't get the focus, I'm afraid.
> 
> Sticky get focus with the patch, i have check this.

Ah, yes. It's because window-visible-p is evaluted first.

> Activate workspace will only work if we remove both
> 
> (or (window-visible-p w)
> (window-workspaces w))
> 
> only remove (window-workspaces w)) can't work because if "appears"
> windows on a other workspace as select window-visible-p is nil.

Now I see you're right. Then your last patch was probably correct. I'm
sorry for the wrong reply.

> I don't know why without my patch window-visible-p is necessary so
> maybe it gives windows which not visible and also not appears on a
> workspace.

I don't either. More precisely, what's exactly meant by "visible".  If
you want to pursue it, you've got to check the code and do some
tests. (Sometimes the doc is wrong.)
 
Teika (Teika kazura)


-- 
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/