Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch
- From: Teika Kazura <teika@xxxxxxxxxxx>
- Date: Thu, 05 Apr 2012 22:21:13 +0900 (JST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=jstyLGWA2Hj0NPjCGAPKGvJyiNN46/AZRXR5AuhgsJ90OPeYxDnxeL7/0yDOJKRDPPvjYt4DAsa3JscOOedyB63dtxO+vZVZ7GC+4mpchDO/ql7KbleDN8vsqh9TorRLqxFjRCSvumXAg9EoBPsLwRZmDAL6zynUGf6J3Er2cyk=; h=Date:Message-Id:To:Subject:From:In-Reply-To:References:Mime-Version:Content-Type:Content-Transfer-Encoding;
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