From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#9366: Display geometry change hook Date: Sat, 19 Sep 2020 17:28:48 +0200 Message-ID: <87363dpyz3.fsf@gnus.org> References: <4E55DACA.6080401@harpegolden.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2054"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 9366@debbugs.gnu.org To: David De La Harpe Golden Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 17:30:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kJeoU-0000OH-7p for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 17:30:10 +0200 Original-Received: from localhost ([::1]:56672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJeoT-0005nF-9I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 11:30:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJeoM-0005n5-IN for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 11:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJeoM-0002wZ-7G for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 11:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJeoM-0000kq-2X for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 11:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 15:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9366 X-GNU-PR-Package: emacs Original-Received: via spool by 9366-submit@debbugs.gnu.org id=B9366.16005293482817 (code B ref 9366); Sat, 19 Sep 2020 15:30:01 +0000 Original-Received: (at 9366) by debbugs.gnu.org; 19 Sep 2020 15:29:08 +0000 Original-Received: from localhost ([127.0.0.1]:47818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJenT-0000jM-Mn for submit@debbugs.gnu.org; Sat, 19 Sep 2020 11:29:07 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:42776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJenR-0000io-IJ for 9366@debbugs.gnu.org; Sat, 19 Sep 2020 11:29:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=OQ4wECuDtbKy8ZmA/ydLSiNp4DriW796U67Di8JU/XY=; b=ne3uAbaGyZARW3sokZfoYNPxV7 A2IXT8ixwxCaflf/+Acmqu5M07X6Rv6/2P42Bvn3qhvDc4TdlMAaQfdwHsIi9/ETGeubvR+Ubqtlp Hc3dgk40fzunB85y7vWc9K5RSO0DOv5egS/hHhchqNFvUx4V1vj35BOzmlmtK0khlXQU=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJenB-0006lU-69; Sat, 19 Sep 2020 17:28:58 +0200 X-Now-Playing: Propaganda's _Wishful Thinking_: "Abuse" In-Reply-To: <4E55DACA.6080401@harpegolden.net> (David De La Harpe Golden's message of "Thu, 25 Aug 2011 06:16:58 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188398 Archived-At: David De La Harpe Golden writes: > Attached is an initial x11-only stab at an implementation that calls > window-configuration-change-hook when display geometry changes, though > a separate hook would be another design option. > > For ns, Edward also mentioned: > > "On GNUStep and Mac OS X, applications can listen for > NSApplicationDidChangeScreenParametersNotification for this sort of > thing" > > Dunno about w32 as yet, but presumably it has something similar. This was nine years ago, but this didn't get much attention at the time. [...] > +if test "${HAVE_X11}" = "yes"; then > + if test "${with_xrandr}" != "no"; then > + PKG_CHECK_MODULES(XRANDR, xrandr > 1.0, HAVE_XRANDR=yes, HAVE_XRANDR=no) > + if test "${HAVE_XRANDR}" = "yes"; then > + AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the Xrandr library (-lXrandr).]) > + fi Emacs is now built with xrandr support by default (on the relevant systems)... [...] > +#ifdef HAVE_XRANDR > + /* xrandr extension may or may not be present on a display => > + can't check for it as a constant C "case" arg, hence "if" here */ > + if (dpyinfo->xrandr_present && > + (event.type == (dpyinfo->xrandr_event_base + RRScreenChangeNotify))) > + { > + /* FIXME: is XRRUpdateConfiguration actually called by the toolkit/gtk+? But looking through the code, it doesn't seem like Emacs has grown this capability over the years? But I may be looking in the wrong places. In any case, it sounds useful? I haven't tried applying the patch, though, so I don't know how much work that would be to bring it up to date. Anybody got any opinions here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no