From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: ***SPAM*** Re: (x-display-pixel-height) Date: Sat, 21 May 2022 10:56:48 +0300 Message-ID: <837d6f9v3z.fsf@gnu.org> References: <9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com> <87leuyl4ax.fsf@yahoo.com> <7B1F4496-3539-4C6D-8470-C08A18022F10@easesoftware.com> <87sfp5ypxl.fsf@yahoo.com> <87ilpzvfdw.fsf@yahoo.com> <87wneftvwp.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16302"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pedz@easesoftware.com, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 21 09:58:03 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsJzu-00042W-Du for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 09:58:02 +0200 Original-Received: from localhost ([::1]:59734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsJzt-0001Qm-5w for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 03:58:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsJyn-0000j7-Ru for emacs-devel@gnu.org; Sat, 21 May 2022 03:56:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsJyn-0006ws-DR; Sat, 21 May 2022 03:56:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8m+/aDXNCvqzoof/XQn03Wslv2XlzX4fzAPidFFTXuA=; b=Xs2wp/fyoGux 5UeVVIJ+j2i2LbiD8YONyHEyjxIrt/P/1VtzqhfxoLKFbQ6vdCGvw/mvMjnhj+r+T7vtzWt/dp24V zGT4VC6W8GaWYdWeP02PwJCP1dzAnEpO5fC/wEnXX2KnIqC28dumT7oAc3AjdyTU3MvbDFC1S2ILX SxANxXk8/8dGNJkWKq2w7vkL72C0Q45XwsfWyIB8W7DSJ2C94d7xJK0WjBbVUXRw7QoriB5IO57H/ D0sm2aaRx4p/RTlZpOePPx5gx5/S+ThNQopagEU3zmuTPoVfC5AyeGaO/x8qbSWpEGZ6Qr8rZ4PDu 1Qm3y8Ram+BMwMt9qTk04g==; Original-Received: from [87.69.77.57] (port=2030 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsJym-0007kL-Tw; Sat, 21 May 2022 03:56:53 -0400 In-Reply-To: <87wneftvwp.fsf@yahoo.com> (message from Po Lu on Sat, 21 May 2022 11:19:18 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290034 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sat, 21 May 2022 11:19:18 +0800 > > Po Lu writes: > > > Sounds reasonable, I'll try to work on it. Thanks. > > What you want should now be `display-monitors-changed-functions' in > Emacs 29. Thanks. However, the documentation of this hook IMO falls short of being useful to Lisp programs: +@defvar display-monitors-changed-functions +This variable is an abnormal hook run when the monitor configuration +changes, which can happen if a monitor is rotated, moved, added or +removed from a multiple-monitor setup, if the primary monitor changes, +or if the resolution of a monitor changes. It is called with a single +argument consisting of the terminal on which the monitor configuration +changed. +@end defvar This doesn't give any hints for how should a Lisp program get the information about the monitor-configuration changes that triggered the hook call, given just the terminal name. Without knowing how to access that information, this hook is not very useful. I also notice that this hook was implemented for all the supported GUI backends except w32, which is unfortunate and undocumented.