[Sawfish] window-position in after-move-hook returns old window position? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: "sawfish@xxxxxxxxxxxxxxxxxxx" <sawfish@xxxxxxxxxxxxxxxxxxx>
- Subject: [Sawfish] window-position in after-move-hook returns old window position?
- From: Robert 'Bobby' Zenz <Robert.Zenz@xxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2025 14:45:39 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KJ1KhuHN3F60gHRxGVTR2Sqf1nozlrueQ9W7EkK3sg0=; b=T3QyifYCBoSfV2NyUw8ZFtOGrV wA+pOBb70+GF9GjqMWx7l6murTZHPm4pxO3f2gPJWRx+SI4OAdusbSwJbHC+1QHCjUw1CWw42j5Ci nn0Cjeu/Pq2KpV0mSFIhvubf9ppwDkCbpBOCR0MLVnSL+GHlRI1AROk0FcPs0ss/rLXE=;
I'm writing a script which is supposed to change the stickiness of a
window when it enters my second monitor. However, calling
`window-position` in `after-move-hook` returns the old/previous
position of the window instead of the one it was moved to.
A simplified example would be:
(add-hook 'after-move-hook (lambda (window) (print (car (window-position window)))))
This prints (for me) always the previous location.
I feel like I've been missing some very simple thing here. Can somebody
help me out on how to get the current window position?
--
Sawfish ML