Re: [Sawfish] Re: window-position in after-move-hook returns old window position? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] Re: window-position in after-move-hook returns old window position?
- From: Robert 'Bobby' Zenz <Robert.Zenz@xxxxxxxxxxxxxx>
- Date: Sun, 1 Jun 2025 13:22:58 +0200
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bonsaimind.org; s=mail; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:To:From:Date:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=udJO8Pe20XFBMq5qtH2vlswsH+Lvc4ypxl1vgun2Ty4=; b=AsI18p44beunnmKHAY6GhgrIa/ 4EsB66aGwxeBWmCXh9Dog7fvszvOpPgmO21T5Hy2JKStr/293MWxuvD4td5uznYP1QVS8xHWFXiiz yzOx9cQnP7zgjn7DEoFnoj5Vqm+SY+O8oQLbQl8UYlA7rKx5/zMTSyNtHDcbc3C9LoTs=;
> Situation is a bit confusing because there is after-move-hook as you
> mentioned and tried in the other post, but also window-moved-hook,
> which I don't know if you tried too. Maybe this other is better?
Yes, I did miss `window-moved-hook`, however, it's still wrong. It
behaves like `while-moving-hook`, meaning it is called constantly while
moving the window interactively (`after-move-hook` only is called after
you "drop" the window), but `get-window-x` still reports the old
position during its callback. Easiest to test when using "Pack window
SOMEWHERE" when moving the window.
> Anyhow, if the 3 above do it, great.
Well, `while-moving-hook` is not called when using "Pack window
SOMEWHERE", but so far I could live with that, but it still would be
nice to have.
But even though `after-move-hook` and `window-moved-hook` are called on
that action, `get-window-x` reports the old position when called in
their callbacks.
> Bonus: while-moving-hook works
> with outline and opaque moves tho info pages also say it's called
> before the actual move, so maybe the toggle is lagging by one mouse
> event. As in: multiple events in one zone but single last one in the
> other zone would fail to toggle, or so I suppose.
I'm amusing such a thing, but so far I didn't really look into Sawfish
on where that could be.
--
Sawfish ML