GNU bug report logs - #9366
Display geometry change hook

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: David De La Harpe Golden <david@HIDDEN>; dated Thu, 25 Aug 2011 05:20:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 22 Sep 2020 15:04:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 11:04:35 2020
Received: from localhost ([127.0.0.1]:32863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKjqM-0002x3-Vq
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:04:35 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kKjqJ-0002wm-Tp
 for 9366 <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:04:34 -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=cTFYQaRrY/0xmMcf4HUmbikI2LapEYxxU2kQljbrbCg=; b=b99PT5RHpPdS7BaHPD5qa3VW9D
 gTe9ZL2LMJXfP/q1W9J87RXpLJYuWlFjahh9kOPFsdMlvzV2kaIIkkWu+7bwzheZQ+neZPe/OxTi2
 MGG/bv04Rc5bnO78gxfNcQ1Fj7bxkhKbBIryjBZkYYRCy1wzKAM4KEp0cLUWa8JIt/30=;
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 <larsi@HIDDEN>)
 id 1kKjq9-0003t7-G6; Tue, 22 Sep 2020 17:04:24 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
 <83tuvszjs0.fsf@HIDDEN> <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN>
 <83sgbbxlbd.fsf@HIDDEN> <8515b084-fd76-20e5-7452-83cb85adce2e@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX409L89/fiucr2
 z4lVr/H///9iL0ZOAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QJFg4fHOqm5t0AAAG2SURBVDjLbZKL
 teMgDEQlpQHEugDQcQHOYxtwDv3XtCOBHZK3+BPgRiNpMFFiItyaSFnfg0oqZmTGgreKsJZYOhAi
 PAUvJQDCkgbQVNKYFAdYDqlfQP3tCuRyxdclu1QAs+JpLQAFEE7fEVQjgpHkI0cewLv4BOkGEuV6
 4RNwDhd49OGZUxWrCf1LISFznMi9Srg47jGYRCt+MirCnDP+STlsNYYxNWstEEZSTCVAGSBV1FCV
 vHcaB+GCE8BskrAWQYZaa0hFRMEUgNm9N6sZO+4KaoXF5ADXT68JwYKsLLspB9DU/vZ+nXTuLyvj
 zOnPoR3jhd1atzMZBjt4PDWIw30/NVsMOo4LvPbeATT2CzW6I3awU0PL5BP0Gxg9Ro79lgIQlzra
 MSNsB7mSEzWAbYL+fxDjAqiqtRV0lSjKVhCpRoSMiDz293BmSHGAYdaI04yvxs+hPQB87+zTSw+o
 8MojXGRbQMlG6QJ9wGniBLOsc7ukvoCuQN2r7eq6n29wHG+pFTzb8wa9OpABmoPr0F3usrc11sVF
 XcBzBXUBkTyvUjIAtLZ+p3HgQQ5agOkLmsE3muwfrVOIdBoFJq8AAAAldEVYdGRhdGU6Y3JlYXRl
 ADIwMjAtMDktMjJUMTQ6MzE6MjgrMDA6MDDbH4FOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5
 LTIyVDE0OjMxOjI4KzAwOjAwqkI58gAAAABJRU5ErkJggg==
X-Now-Playing: Hercules & Love Affair's _Hercules & Love Affair_: "Iris"
Date: Tue, 22 Sep 2020 17:04:20 +0200
In-Reply-To: <8515b084-fd76-20e5-7452-83cb85adce2e@HIDDEN> (martin rudalics's
 message of "Tue, 22 Sep 2020 09:16:58 +0200")
Message-ID: <87mu1hhmyz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: martin rudalics <rudalics@HIDDEN> writes: > But such a
 platform-independent
 method on X would boil down to using the > same special X module as the
 platform-dependent
 method. That is, we > would try running XRANDR in either case ... I don't
 k [...] Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 9366
Cc: Eli Zaretskii <eliz@HIDDEN>, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

martin rudalics <rudalics@HIDDEN> writes:

> But such a platform-independent method on X would boil down to using the
> same special X module as the platform-dependent method.  That is, we
> would try running XRANDR in either case ...  I don't know about macOS.

Does XRANDR work under Wayland?

Like I said earlier, it seems more useful to do this off of Dbus than in
a XRANDR context -- that's likely to be relevant for more systems, I think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 22 Sep 2020 14:17:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 10:17:03 2020
Received: from localhost ([127.0.0.1]:32774 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKj6M-0007XJ-Lm
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 10:17:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kKj6K-0007Rb-H1
 for 9366 <at> debbugs.gnu.org; Tue, 22 Sep 2020 10:17:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50452)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kKj6E-000675-Hi; Tue, 22 Sep 2020 10:16:54 -0400
Received: from [176.228.60.248] (port=3946 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kKj6D-0001lh-Q0; Tue, 22 Sep 2020 10:16:54 -0400
Date: Tue, 22 Sep 2020 17:16:58 +0300
Message-Id: <83v9g5x5et.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <8515b084-fd76-20e5-7452-83cb85adce2e@HIDDEN> (message from
 martin rudalics on Tue, 22 Sep 2020 09:16:58 +0200)
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
 <83tuvszjs0.fsf@HIDDEN> <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN>
 <83sgbbxlbd.fsf@HIDDEN> <8515b084-fd76-20e5-7452-83cb85adce2e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: larsi@HIDDEN, david@HIDDEN, 9366 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Tue, 22 Sep 2020 09:16:58 +0200
> 
>  > Yes, I know about WM_DISPLAYCHANGE (although we currently only handle
>  > the full-screen frames there).
> 
> Has anyone ever confirmed that it correctly handles the full-screen
> frames?

I don't know.  I don't have a system to try that.

>  > But the corresponding X feature
>  > requires the use of a special X module, and I don't know what happens
>  > on macOS.  So I thought a platform-independent method that always
>  > works, and can be implemented in just one place, is a better
>  > alternative.
> 
> But such a platform-independent method on X would boil down to using the
> same special X module as the platform-dependent method.  That is, we
> would try running XRANDR in either case ...

Do we use XRANDR to query the display geometry?

>  > Besides, adding one more special event comes with minor disadvantages
>  > of its own -- one more event to disregard in situations like
>  > while-no-input etc.
> 
> But at least on Windows we have to pay attention to such events anyway.

I didn't mean MS-Windows events (a.k.a. "messages"), I meant events in
the Emacs event queue.  A message coming from the window manager
doesn't have to be converted to an Emacs event, it can be handled
directly.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 22 Sep 2020 07:17:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 03:17:16 2020
Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKcY8-0000jQ-Eo
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 03:17:16 -0400
Received: from mout.gmx.net ([212.227.17.21]:53797)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1kKcY4-0000iu-0K
 for 9366 <at> debbugs.gnu.org; Tue, 22 Sep 2020 03:17:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1600759021;
 bh=iU7v5vGGWQbrSK0W6JzoAnZ5FTh/m5cCoPpfnAXppQ4=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=NuMu+iSpRAqrNGor0a6AtybNTWknaOEHimbxa2r/eEnQvttecwL63PUEyOgfKPW8b
 HbzBJKFNvxfifk5HP2Fsqwt6bTlbNj5vRdnQKwC33anwntrvzt63VFbqhuMob1VJPj
 yNoMKFXFugZpUbvqowqRi4q4eZkqR6F2B2dXLev4=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.27]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MYNJq-1jzE2Z25II-00VTHg; Tue, 22
 Sep 2020 09:17:01 +0200
Subject: Re: bug#9366: Display geometry change hook
To: Eli Zaretskii <eliz@HIDDEN>
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
 <83tuvszjs0.fsf@HIDDEN> <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN>
 <83sgbbxlbd.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <8515b084-fd76-20e5-7452-83cb85adce2e@HIDDEN>
Date: Tue, 22 Sep 2020 09:16:58 +0200
MIME-Version: 1.0
In-Reply-To: <83sgbbxlbd.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:y7wga9UGtDapG0SAqPZPa7W/+72NSOreQvMDlSsR3dy7TsJwLcb
 Gfx7S9tInp1d19WaPa3fLQ4VU9u8bbLJKzMm57AwIK/LPncftX5TBrHc8ZmJcN7gf46Cr7E
 toDEXXj4fmHZ9DeACnkPGrgExjkNCsgt4N6Ljuz7LzxhR6DamU8pivr63rJqyYByjvbHXMG
 Ws0NFqxyJEKAF8uvwQlwQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:x1LxMBlFxPA=:bjEr2/O1TodpJwHvqvDy+B
 iJpW8pouq0pRxrx17gn6mRntlo2NQ529eBF7JiOQPivWbiYdmy6tr2onJ5evJvCpQD00lB9A7
 X1L4PgMiMrRJn0+VJsAx+Zmvhc5cj81updF/5iQDOEjYZTnUpYZKI4n6qVsupn04qjsa1bloE
 K2HdUv0YH4l5F/R0t2y2uM+2PE//3abmmJqjeNMX63CBOo8Fcwl1lAAc+qU8PnxOCcEc6Jbvr
 RGQF+86HZotQj+Jswm9eK5mfn9fuXQI70cKeP9VHEg7B8O5etS5P9DcUDPI9cZAEadl6bae4u
 a75n6HomRLJePA11KKWt9993D2UIPRn/TV5EpoWnJ94AMBMTiUcnvHecMpCVnNxBPLq9+d/86
 VJpOn1142lEhYGUcQkw2fZCxPM1sBelGudDyeQDmaZ7N6Xi8QFiJlyTxYZbUbsNGq7Nnm4gyR
 Otvtf16woTdJ45IZhf1EcxIZKOXYL+EiaHAJm+HojaU6ye94Hm4EFxwJ8B9Q3sXC2ZVrU6vmt
 bkcT5XoCGzxCHauWeXrwNTQvmS26WMWclo1RERUi13TKKfSIC1FpYH+trPNiQdx66S0V29sAe
 gin1zIGm4L8G/i6AgR8fqaHOp2Y1DwtDU0GIFUm22g7dTLw8O+puFWeoxN6NztcHcM4bHfnHV
 DRWgqWhYNaXEJ92RPSP0qu6ZWxvFNAMh2qrv87TvtZIIXUu5r8yZAHfsKx7u13gRmhaodj1Ai
 jSnehK1Fz6UjeDyFzQqsgGO9xsD1gdypPbgfvWrjSv1wzaGqXxZ0R3jdGfp+rnuk1FucGSZs6
 jtitJ4IH1HrZsdFs/RuVwRhkaO9XpbbQjiNrRz9JMyrQBr+PrY/cDOO7E59eHfRqmrWiBCZzg
 bk8Kk3Cki/cKAzR7aLnxG9ZCaY++h58ybNJcyAVRDQJaiIyTkeNymmVO+dgpQGFtzWD0Em54e
 iDRuxXCSGtFWf3p8Yt0z0q7x6UrE5JXzT2gwhCFU64TeVP7YsRA/KFRhfXC4Sz9dJZ1cw2OGP
 wD/UKsqTJynZUba5E/4DWhOBvGRoJuFx3VYPtrvD0jpmrrTIiG+k2emzBm2Cfdumtvq+EAjXD
 XJ45xBV3Dje1c9mySe8coiZ/Cfdi3lfpLj1k305ArVRvLFf68k5xxRZRlwi4Kd1rVyKOzAQuO
 qNwNujI/ksIWA0rbHF7GDo5BMVyhdxqBfgKeUz8a6JYRXsSQkFwT0IJKUX/ctUfcFU9/8FjtC
 ZpmuvjkXkUj9Cd+W5Us6BUXjA9BgSxV71Ava4A+G4dvv3LqExfOY/V59dJHA=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > Yes, I know about WM_DISPLAYCHANGE (although we currently
 only handle > the full-screen frames there). Has anyone ever confirmed that
 it correctly handles the full-screen frames? > But the corresponding X feature
 > requires the use of a special X module, and I don't know what happens >
 on macOS. So I thought a platform-independent method that always > works,
 and can be implem [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [46.125.249.27 listed in zen.spamhaus.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [212.227.17.21 listed in wl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.21 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > Yes, I know about WM_DISPLAYCHANGE (although we currently
    only handle > the full-screen frames there). Has anyone ever confirmed that
    it correctly handles the full-screen frames? > But the corresponding X feature
    > requires the use of a special X module, and I don't know what happens >
    on macOS. So I thought a platform-independent method that always > works,
    and can be implem [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [212.227.17.21 listed in wl.mailspike.net]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [46.125.249.27 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.21 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > Yes, I know about WM_DISPLAYCHANGE (although we currently only handle
 > the full-screen frames there).

Has anyone ever confirmed that it correctly handles the full-screen
frames?

 > But the corresponding X feature
 > requires the use of a special X module, and I don't know what happens
 > on macOS.  So I thought a platform-independent method that always
 > works, and can be implemented in just one place, is a better
 > alternative.

But such a platform-independent method on X would boil down to using the
same special X module as the platform-dependent method.  That is, we
would try running XRANDR in either case ...  I don't know about macOS.

 > Besides, adding one more special event comes with minor disadvantages
 > of its own -- one more event to disregard in situations like
 > while-no-input etc.

But at least on Windows we have to pay attention to such events anyway.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 21 Sep 2020 14:21:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 21 10:21:18 2020
Received: from localhost ([127.0.0.1]:55564 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKMgv-0006Zj-BX
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 10:21:17 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kKMgt-0006ZX-CX
 for 9366 <at> debbugs.gnu.org; Mon, 21 Sep 2020 10:21:16 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57820)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kKMgn-0002RE-Fd; Mon, 21 Sep 2020 10:21:09 -0400
Received: from [176.228.60.248] (port=3384 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kKMgm-0004VZ-Es; Mon, 21 Sep 2020 10:21:09 -0400
Date: Mon, 21 Sep 2020 17:21:10 +0300
Message-Id: <83sgbbxlbd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN> (message from
 martin rudalics on Mon, 21 Sep 2020 09:26:01 +0200)
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
 <83tuvszjs0.fsf@HIDDEN> <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: larsi@HIDDEN, david@HIDDEN, 9366 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Mon, 21 Sep 2020 09:26:01 +0200
> 
>  >> To poll the geometry?  Sounds much too expensive too.
>  >
>  > Same question as above.  We currently have several timers running in
>  > every session, so a timer that ticks, say, once a second doesn't sound
>  > too expensive to me.  Especially since this will most probably be an
>  > optional feature.
> 
> You mean when the value of 'display-geometry-change-hook' is non-nil,
> for example.

Yes.

>  >> If and when the underlying windowing system informs us of display
>  >> changes, I would just react to them.  What's speaking against it?
>  >
>  > The proposed solution was only for X, and using an optional component
>  > at that.  I'd rather find a solution that would work on all supported
>  > platforms and required no special APIs.
> 
> But it would probably rely on 'display-monitor-attributes-list' and thus
> use its APIs.  And on Windows, for example, the "special" API is already
> there in WM_DISPLAYCHANGE and I suppose the other platforms should be
> able to handle fullscreen frames after a display change in a similar way
> too.

Yes, I know about WM_DISPLAYCHANGE (although we currently only handle
the full-screen frames there).  But the corresponding X feature
requires the use of a special X module, and I don't know what happens
on macOS.  So I thought a platform-independent method that always
works, and can be implemented in just one place, is a better
alternative.

Besides, adding one more special event comes with minor disadvantages
of its own -- one more event to disregard in situations like
while-no-input etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 21 Sep 2020 07:26:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 21 03:26:14 2020
Received: from localhost ([127.0.0.1]:53245 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKGDG-0008KQ-F2
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 03:26:14 -0400
Received: from mout.gmx.net ([212.227.15.15]:56537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1kKGDE-0008KD-Ds
 for 9366 <at> debbugs.gnu.org; Mon, 21 Sep 2020 03:26:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1600673163;
 bh=aHoEahucH/3elQ8KDBLiXw2+vpY+5hSGPEMO8F7UmVE=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=CH3zZb4DwYB5Qy4m7zcSE15yXXi9/NmH/U/w/dIPhf/Qt7+kYAKeaOH7Tm99ZF6sj
 hltD/z7ZOi+xAVVQSb9P2iED2MKYSo65oeVUb8kJ+VWAteJ9udwdKW96VFtj6UtLYL
 vTi7+FPKibtW9aot+hWNH44flKCTIiuaB+ET5aK0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.38]) by mail.gmx.com (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McpJg-1ku9Bx1oaA-00a0CY; Mon, 21
 Sep 2020 09:26:03 +0200
Subject: Re: bug#9366: Display geometry change hook
To: Eli Zaretskii <eliz@HIDDEN>
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
 <83tuvszjs0.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@HIDDEN>
Date: Mon, 21 Sep 2020 09:26:01 +0200
MIME-Version: 1.0
In-Reply-To: <83tuvszjs0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:vF23aUGR3lmPnXx2gguyXfH5/9xYrUySbaVic84dIorNZPWrz8n
 L/0ijt4iGIvj/z/w10ZFxuGaQz2sUMblVKGd6lmta7Ddg2J2GLyb10UCO0HZ7puiJe6mLPS
 KKohSQLL/qYxWINAXVKjn3YxciLb39q5kyDoz6mEJd+15o2bTN04C7SUpOMP/rQbevgNMYW
 eeDJYvxPuEc4edPnaIAIQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:GSbN2poy5Ts=:MmY6fyGx3Nn9LOC+uQKlc2
 pRWinW2kQINLJdNwrsXgdKyajBuaZzxbVx1jNqmiyMxIKRq90JCmSpbaNmBO2ufsvShENNr8n
 7mZzqqNARyeNRvmrOKwl+BBWIAI/3rpl+l6FPBeYxUjUX+0r+8K6SdVnwDt6OvUQhhAyZXy+K
 np4Xj7Ojn2LIuPrWUIWnQfRtxTvg0dDT8v71Q29bGuk53Mrb76oRD56q7/SxcxANpJABcSYPw
 O+hCLyES8gcmC+nRh0FN1ysYjXQHuvVYBaed4qfi1Ga/vlPjh0Xlmm2jBRrmPfTxe7J4/Kg3s
 H7wiMs39/32eAV4vAWd1AG9W/rUIXQ2D6emRyVAF7YWHVl9BQ9bzltIg4Ruo8PGN+KyAMnPm7
 AhxDinLzD1M4R6Z1AYdQShWSXRmbanKcuRYK7nGgrMlRC/GqFA4syGxm9mskDZ4oY1ae3u26J
 8JhTfI1p5kTSHSiSZMvXn9yLvEntOvKT14KkOsYrlLVeu6xLGK+tJyGxb5TDYYlOMIO0gNMU6
 eOQ4f+Ucd7UINMzQeKUR1QugWMxO9s9jHzlfHfiziuVjNyi26vtaFg2fdSMWiTb7oGmmVKkUv
 sI0wxdk4cW/DUf/48uSmAiMxDb8MIxMWAqZKJXUIEzKasfE/1d8pi990M/pM0YOEx4tlFknUh
 4PcSIaesldbOxP5oWYMwPsZqfL+zGfu+YAndinpqJBcA0+U2hL4Ui75yg7kAt1tjHHPC4ZnLv
 5lIqHtwhFpQ7X3PrhewTM8r34QyHpWgXKi1rFCWh3pR+qCvRL16TPJSS4FTTZGR614cRDntmw
 8IslINgKaOoQl3cSGzNvEktFZ8izQ1kg8waaJNScwP2hsbXo82F1Moij5YdMysiq0y51e5GoV
 F9qKwct4XCpo0yYbQBwZvBmexR0ktbrqXM8l5Xkn7TSFZMeJNxqX1q1bS6R00d92osdc2pulu
 iKurBaqNH/FltZMukOVWUGaOQa/2qRy9Li6CmyydaeKu2vaidEWAkjVvzWC075Iho9/wSBSCw
 BnBcxLff+A4wuLENBX4r9pjKY5iPbINSleBWkuuihKCq0ms+jnNHR0IHk6LSCGMZFckubYkP+
 DMiycTzbOndoB3t6MwHp8tvchNRDmqqoLFbqb5tT6decVaNvLDZpQ7VpnTZd95dgMvynrCUQp
 w9B1O3no9sw3CK16VTHdR87qVlo2NFtNJ0t8ZFGPIK5jhv6rqG39IvWe3rzAyG1D1RDy4vFPU
 Prbp8QiPi940ILYRZejDbUcK59S7RDYWPOUyLiA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >>   > Would it work to test the display geometry from focus-in-hook?
 >>
 >> Sounds expensive
 >
 > How so?  Is the API which we use to determine the display geometry
 > expensive?

I meant expensive in the sense that Emacs would poll the display
geometry in every focus event with maybe a handful of people ever making
use of it.

 > Any quantitative data about that?
 >
 >> And what about a user who currently has no frame on that display but
 >> might consider switching to it when its geometry meets certain
 >> requirements?
 >
 > Is this an important use case?

I don't know.  I never plug a monitor into a running session.

 >>   > Or
 >>   > from a timer?
 >>
 >> To poll the geometry?  Sounds much too expensive too.
 >
 > Same question as above.  We currently have several timers running in
 > every session, so a timer that ticks, say, once a second doesn't sound
 > too expensive to me.  Especially since this will most probably be an
 > optional feature.

You mean when the value of 'display-geometry-change-hook' is non-nil,
for example.

 >> If and when the underlying windowing system informs us of display
 >> changes, I would just react to them.  What's speaking against it?
 >
 > The proposed solution was only for X, and using an optional component
 > at that.  I'd rather find a solution that would work on all supported
 > platforms and required no special APIs.

But it would probably rely on 'display-monitor-attributes-list' and thus
use its APIs.  And on Windows, for example, the "special" API is already
there in WM_DISPLAYCHANGE and I suppose the other platforms should be
able to handle fullscreen frames after a display change in a similar way
too.

In either case it's no great deal.  I won't implement it because I've
sworn to never change the resolution of a running system again (once an
xfce Debian here insisted for weeks to come up with a 640x480 screen
resolution because it did not trust my monitor's repeat frequency) and
master still struggles with the (funcall eldoc-documentation-function)
issue.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 20 Sep 2020 12:59:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 08:59:23 2020
Received: from localhost ([127.0.0.1]:49130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJyw7-000616-6H
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 08:59:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51900)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kJyw4-00060s-FV
 for 9366 <at> debbugs.gnu.org; Sun, 20 Sep 2020 08:59:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34319)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJyvy-0000DT-SL; Sun, 20 Sep 2020 08:59:14 -0400
Received: from [176.228.60.248] (port=1900 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJyvx-0002Le-HT; Sun, 20 Sep 2020 08:59:14 -0400
Date: Sun, 20 Sep 2020 15:59:11 +0300
Message-Id: <83tuvszjs0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN> (message from
 martin rudalics on Sun, 20 Sep 2020 14:24:10 +0200)
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN> <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: larsi@HIDDEN, david@HIDDEN, 9366 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 20 Sep 2020 14:24:10 +0200
> 
>  > Would it work to test the display geometry from focus-in-hook?
> 
> Sounds expensive

How so?  Is the API which we use to determine the display geometry
expensive?  Any quantitative data about that?

> And what about a user who currently has no frame on that display but
> might consider switching to it when its geometry meets certain
> requirements?

Is this an important use case?

>  > Or
>  > from a timer?
> 
> To poll the geometry?  Sounds much too expensive too.

Same question as above.  We currently have several timers running in
every session, so a timer that ticks, say, once a second doesn't sound
too expensive to me.  Especially since this will most probably be an
optional feature.

> If and when the underlying windowing system informs us of display
> changes, I would just react to them.  What's speaking against it?

The proposed solution was only for X, and using an optional component
at that.  I'd rather find a solution that would work on all supported
platforms and required no special APIs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 20 Sep 2020 12:24:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 08:24:23 2020
Received: from localhost ([127.0.0.1]:49111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJyOF-00035q-5H
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 08:24:23 -0400
Received: from mout.gmx.net ([212.227.15.15]:52855)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1kJyOC-00035a-Os
 for 9366 <at> debbugs.gnu.org; Sun, 20 Sep 2020 08:24:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1600604653;
 bh=XSzKhFqxdyHB+6xf7PvQaH+vSzOBcEMarzzzBZQ6a6w=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=QHrMf4oDBVZRjFotxIuaC66DNrIk+b/8EQV1KZR7dsCeInx65wYvCsAkUCWffv9VM
 hCzg3YrAIdx9sWRKUXYv10iXhUy1s65uetcwo4hFlp8bvwPM8OFU+eYKPrRig66iUu
 1tVjQdqFELeneXO0J/QTPTc+6tRJESlP7B4lUy70=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.82]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNKm0-1k8Mis441i-00OooV; Sun, 20
 Sep 2020 14:24:13 +0200
Subject: Re: bug#9366: Display geometry change hook
To: Eli Zaretskii <eliz@HIDDEN>
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
 <837dso25el.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <1a7ac173-93b7-292a-3dc0-05c68c5be414@HIDDEN>
Date: Sun, 20 Sep 2020 14:24:10 +0200
MIME-Version: 1.0
In-Reply-To: <837dso25el.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:7OVbaLaxeI7Z76efa9GH850W6SY5x0YmPlwDcE73rSYSwdhY692
 9iG9KXJ2q/D/VdxSR9zVX7XxkxersecK9MtsFF+gdHkBcHvFoI2sIu3Rv8PeMBRsJ+5yrXH
 0OMAheqz+YrbV0z31jvOnZT0GPUOV6AL0yj4rIMWvmmmdlGgrDE7vI+/Fb5V0nZhKu4KSXI
 HcbH9gQ8DkQcI0fOSsx4g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:IAcaWYchlOs=:uFvduUQ45jggYCJWN6AdJ9
 3FByErLEV9x94NV2OY6BLm4cMnxsDizwWrHwXyn+FszcI/kJ5TH6Qox8S6ysu1wzPnGpaMWEK
 oyUWZDrhDI7ZoRxcTDbIH7mMIQOLeRpnzglF6BJ/MKBgrFURB6oLFJajf0bN1pcujajRAg9MA
 fR5pAUVtcrHVt1OnXUwFl6wWwI+uhTDYRxKjjQaYfBt5c6usM5C+Rn2ToX5HzcEXO3Ov7KQEj
 SlLkh3Sp27ixChemD+Wv5MAXWlsISMT5qCTeLjVRUJWL7wAw0HmEKhzhHU8VqTR38qIj61pPS
 BP4kMuot9Ibqamxdx0qkDCFTkpMMZWcd70bRSzMl0Wtlebnndjt62jcKD0NIbVFZtJCfV8TR1
 9gvOL96RV/uFM0tRmRfF+PuBrpCnVFlDyY4eHfotGfdPTjMV/RY9TOk7YRhJdpkP4rvGOLalW
 MRs1IAe5172ddxQ13urC3IKSQKiZjhS85rzVNewpRX7ly04tU+CIpsA0MB0qujYTeDaGJq+ij
 qZSXCKK/EfhIYV4Exxrh7/71yRdW4tQHDqmnZZ2gc6wAOV9InxNHmuS1e4xP6l+K/EoktwwAu
 buZY28iS+eqrRbMU3OdZ7gGLHxogekZegLc2tiU3BJCxWgKiM+mReye8dvq+/r/nc4dER+Zdg
 8rh7i31Ep0N9VtPMLL+6ZCfqhfiprPWaX8mO3HLu53bP+G2IHEZ2BRok4XdAj8JEJYC+ywnlH
 M21kGeAUGQuLE5w0HR9SU7SOR9lLJDY+GaLUCu0kkW3PxdmPV9f8KoOmOJE2D4Q/qHC+YCn3T
 TCUQhNJCF74HYC1GHQfilMUWVALR4vEOfj7inJ2fWpCzVdtTShIFw+gZ5pK+V9yRiPyN7X7bJ
 FKogt18HNwMFAwYKAjjfShgl2HEof6sZWY0q6yEpXukGcvlXzU1knL8lH0LsLM3ODbDXmM/E6
 xztvsSG6ldKtnBPyPztNru9loleecWFJs2ZlcrGLRdcaw93OSJksJ3aQvlZw3GGhILR9V8+ds
 saCuBFKvB7xDctEIbZoLI6AMyuJmMzCeEnGDPNOv2L67JN9jNiXOCzbQOujv60V4clpAqECz5
 7t+NZ5dRNoUy/P5ZDP9u7mV9MOX+2jId3/7F/g2Hro7AeMWa9aGd4H++9PJKICUTbSyZYjWBl
 MXxY6ItLiDXmu6bWmwwu+AJZzMQLOW72XStE5TF+xcVxjOAvyASqtNxdZV5abu9dbJmM+0mOm
 Kb6baLG3Xw82HLmaJFoWo0T+4IGck4rFOAvOw2g==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > So this is only about switching to a different display?

A different geometry but still on the same display IIUC.

 > And you are
 > saying that Emacs in general doesn't know about such display changes?

I don't know.  Are we already informed when the user plugs in a new
display?

 > Would it work to test the display geometry from focus-in-hook?

Sounds expensive (BTW 'focus-in-hook' is obsolete since 27.1).  And what
about a user who currently has no frame on that display but might
consider switching to it when its geometry meets certain requirements?

 > Or
 > from a timer?

To poll the geometry?  Sounds much too expensive too.  If and when the
underlying windowing system informs us of display changes, I would just
react to them.  What's speaking against it?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 20 Sep 2020 08:56:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 04:56:12 2020
Received: from localhost ([127.0.0.1]:48681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJv8l-0003jO-S7
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:56:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kJv8k-0003jA-1Q
 for 9366 <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:56:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60551)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJv8d-0007Xe-G7; Sun, 20 Sep 2020 04:56:03 -0400
Received: from [176.228.60.248] (port=2454 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJv8c-0008VR-Fz; Sun, 20 Sep 2020 04:56:02 -0400
Date: Sun, 20 Sep 2020 11:56:02 +0300
Message-Id: <837dso25el.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN> (message from
 martin rudalics on Sun, 20 Sep 2020 10:14:34 +0200)
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 9366
Cc: larsi@HIDDEN, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: david@HIDDEN, 9366 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 20 Sep 2020 10:14:34 +0200
> 
>  > Do we really have to do this on such a low level?  Why cannot we call
>  > such a hook from change_frame_size, which would allow us to do that in
>  > platform-independent manner?
>  >
>  > Martin, am I missing something here?
> 
> Would change_frame_size be aware of such a geometry change?  IIUC
> the original request
> 
> https://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00544.html
> 
> Edward would really just want a completely separate hook that reports to
> Emacs the identity of the changed display and maybe its new geometry and
> is only called in those, IMO very rare, occasions.  Or what am I missing
> here?

So this is only about switching to a different display?  And you are
saying that Emacs in general doesn't know about such display changes?

Would it work to test the display geometry from focus-in-hook?  Or
from a timer?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 20 Sep 2020 08:25:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 04:25:46 2020
Received: from localhost ([127.0.0.1]:48629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJufJ-0000on-Tn
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:25:46 -0400
Received: from quimby.gnus.org ([95.216.78.240]:57304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kJufH-0000oZ-Qq
 for 9366 <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:25:45 -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=HYnScWJCtUH6QKMMykRneYdanDU40diietOqBgz0QzI=; b=PpUj8BoNQ3l1CpEhLUP8cElLQw
 s1eChNc6or1mY8FfvNScJVUNndSfz9ozfdLtNm8Gh6mpcrVQwzyIOL+4Eqvkn6nkXme6lKOtz2LZW
 A5PQgc1WYoVt0I0rvEfkazT8AnOtkTua7/2rZhG/PzLPffcMae1q50gi95T4xOwcUO/4=;
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 <larsi@HIDDEN>)
 id 1kJuf6-0004zL-Ik; Sun, 20 Sep 2020 10:25:36 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN> <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEX8/P3U2t2nusuk
 ra9oaVaAiYM8OSr////hONgdAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJFAgXGIuWHPUAAAG4SURB
 VDjLnZO9dtswDIWp9gWo2Nljyu6smLLmDiDnNiE995zCeP9HKECCCtV0Ko+OBnzEz72CjNEzjqM1
 /zocd84enpxz/jp1d4aRQ3ZJAEAY54+4XHU2QRJ038CTl7h7SSRxyFpqmPJbARYI8AMM3vurc/yM
 ASJGTPA3mEJOjBJpqQr4nCHnDLCBSwMLhJRzaKXMs78piCEGyXqp4ODrtI5nJZAszfi6gcAdKEDQ
 jC/vCiBwfe79UDC0DJYWWF+EPXibRFvxpHml017YV3EEkmaYSQFiLGgDz1fni3BpgICplTo0R6Ci
 NB9ViAonVDSTCqngTiJczqJgKPHTIo4UtCowJW5LDwZEPbCjXQQgx6mVMtNJFuteGzC4NiAjW1Nl
 RwbzfVtEu6Iv6iroFvTMgbqGHRgY8HbGIpD6DGONrC1fLkPRj27dj4n0OmGYO3CpmqUDYP+rrNhU
 /I7Yxe03aNP+OvzswRlirF/j++5Xs8XaUsmPfW+zkrbA2+s6fwZCXpcdYMdj8YQy7gA2RxBiD87U
 BD7A9wKP1Cx5xPBJefH8kWg/lTQRgBn6jMMt59s7v3I4Xc1/nD+dQrVMfWmixwAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMC0wOS0yMFQwODoyMzoyNCswMDowMFnRmSkAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjAtMDktMjBUMDg6MjM6MjQrMDA6MDAojCGVAAAAAElFTkSuQmCC
X-Now-Playing: Andrew Poppy's _On Zang Tuum Tumb (1): The Beating Of Wings_:
 "Inside the Wolf"
Date: Sun, 20 Sep 2020 10:25:31 +0200
In-Reply-To: <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN> (martin rudalics's
 message of "Sun, 20 Sep 2020 10:14:34 +0200")
Message-ID: <87tuvsua6c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: martin rudalics <rudalics@HIDDEN> writes: > Edward would
 really
 just want a completely separate hook that reports to > Emacs the identity
 of the changed display and maybe its new geometry and > is only called in
 those, IMO very rare, occasion [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 9366
Cc: Eli Zaretskii <eliz@HIDDEN>, 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

martin rudalics <rudalics@HIDDEN> writes:

> Edward would really just want a completely separate hook that reports to
> Emacs the identity of the changed display and maybe its new geometry and
> is only called in those, IMO very rare, occasions.  Or what am I missing
> here?

No, I think that's it -- it's a hook that's run when the display changes
size, not when any Emacs frame changes size.

But I wonder whether triggering this from an xrandr context makes much
sense these days.  Surely on most (any?) modern GNU/Linux systems,
plugging in a new screen will trigger a Dbus message?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 20 Sep 2020 08:14:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 04:14:48 2020
Received: from localhost ([127.0.0.1]:48625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJuUh-0000Xl-QK
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:14:48 -0400
Received: from mout.gmx.net ([212.227.17.20]:35839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1kJuUf-0000XX-EI
 for 9366 <at> debbugs.gnu.org; Sun, 20 Sep 2020 04:14:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1600589677;
 bh=bDdZKa8eacvK4Aj0tLpn8A7UlVaDprIhkMgRBYSnYhc=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=bcsqzsDTPnWWNdSfjJor2kiDG5X8I4Jhsz/tKK2Kym5bKvWRSKZv0ZmeJyXNyfIYs
 Kpl76cej3l0GcZWQvw+Y36tnPDb6XXm/Hbs07o9/7pFFsph7UbGepH9dLrRokdnPdd
 cuactYSjYzogfozdP8nsE8ija5f7mitkzadDsybY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.82]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mdvqg-1kracF0NTa-00azXt; Sun, 20
 Sep 2020 10:14:37 +0200
Subject: Re: bug#9366: Display geometry change hook
To: Eli Zaretskii <eliz@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
 <838sd53h9c.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <0984dc8a-220f-c461-3888-435c4046f803@HIDDEN>
Date: Sun, 20 Sep 2020 10:14:34 +0200
MIME-Version: 1.0
In-Reply-To: <838sd53h9c.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:LosqA6+4a+XhxlBQTJJMDTZVWPyauzvmf4BmMt+GmaIlayT86IU
 TkDmZZ1ka1Ic4GhIoXxBbMWkBgxkjLgDewgu1XHc6wNEf0g6hcmLgPbIR7boXDcwaUA7VZA
 F82DJOdc0rxOFkdzKZpdlgFzskLvU9ZL1jk1w7s1hMvlUh7sFj9paEDFzZlFWGJHWfjJJxl
 4J3+PrfzU3PNgAN5qh20w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:84WzFt3tjHY=:8brgrcTKm+EtfzGnC6waEo
 GEFdT7fVsKFQqigoL2w3bcSO513RPygDFJp+rccxC4feUg22lHPW7Zqvl4xkKwoxm4xa4rzu+
 aurP+zD/o/Rw93RVbAxqRvunVnRk1SvY+57827j5msczGzeBkQC45Z9D5AjAE2OW2AOi2y1UX
 NY3wabD2rJjQOxcfDtq/OuSaBJ/NZ0tOP3FGXthA2ym5rIrzYr63uxzox1l4S2ZzhL/kIAGZd
 YKdfBzY7Zqd3PODxA4Natb+zQ0o+He17DCAnoTM5Gsvm6Ml4aYS4Jf0wgwIAvtlo0xFv7rGFv
 uz4UU7TO9aDQzQRSunDhl7w5x60Bt5BzFY81RSJM4Nh+tzn2qaB9UYy8zg8pItqoQ1l0Fmwzo
 Qi/exRrBqdUb5XzDYlGvdnmgGoEAXa0fzW3GnDQ/KIKd/fM4j1km5wHlwXLZAqO6bzdukAp82
 vzHn+gLjEcOFkmco8IgLXZ+MFbvOdR25fxmEMXm+Pz22eynp8Nquz/BTejKJ9qN79kg7HHmls
 +SHcL8LVP19N4TPw6MwNjA46PF7NdTHc0FAQDomWaeyFEsxtK6N5ivLFWkVqG+iefb8m2YvA4
 9rKp1XM+gwztY4CnGVSSGcQcNmqWy7Sal7X2LXThJdSKPB8mXKNHbe0/4MpMGlUk38JRG4W6g
 J8wot/vsjwGVhDHJF51/BnIMWkytwo4TNeXqtg7n6g/AOik5j+ngiPltlEfx60juKDIjTlJ/L
 0iA1Du+PBLnatYhvcklcHQJSqI8jP5rbYspABxFE+01lZUHXk6rMCIDntsHbiiPZr/vL4m68o
 U0gpLB1Ma6rqDfDOI/Fh8SF1f68bDLaVho5ZKkFLjknsvLphR/4VwsVfMHONQH5mN+qRj+IYB
 g33j+klpZtOapyCFqhjB6tU9HVtmLv4YaCTLqUEHKdwH5iPQJY84NEmk+X+L7ErxTPEqwjYq5
 Gl4Jg2pGx0l77XLF+0mMK8cIpe42sv+Ib8z6Pa2Np7QQX2UzO0tzu3scJjKXNJbk5vEwA07GY
 Fq1zloDxrdjRUQpmLeBHguKjjigUgcFTIXdPpfNtmBgl62u+BrJ/WN/jihakafIQtdyRqKITD
 5GAenar9Be2yIMb9+lwsObJzspNTAPqWn3d3sI3GmiaufojFx2KApq6z/88BK//HGzEecEcqr
 Darwhc973vsK0FcK1DcjK5Y9Kv5Po3hMyg5sTtfLF5vX3+8jnepr4XP62nBt9y5aYBlmDZMPw
 9O/2jzf+tuUbeVwjeKwkI328rR80jkjzYeATF+g==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 9366
Cc: 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Do we really have to do this on such a low level?  Why cannot we call
 > such a hook from change_frame_size, which would allow us to do that in
 > platform-independent manner?
 >
 > Martin, am I missing something here?

Would change_frame_size be aware of such a geometry change?  IIUC
the original request

https://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00544.html

Edward would really just want a completely separate hook that reports to
Emacs the identity of the changed display and maybe its new geometry and
is only called in those, IMO very rare, occasions.  Or what am I missing
here?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 19 Sep 2020 15:42:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 11:42:37 2020
Received: from localhost ([127.0.0.1]:47832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJf0W-0003DR-OV
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 11:42:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kJf0U-0003DC-GC
 for 9366 <at> debbugs.gnu.org; Sat, 19 Sep 2020 11:42:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46578)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJf0O-00056s-05; Sat, 19 Sep 2020 11:42:28 -0400
Received: from [176.228.60.248] (port=2818 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJf0M-0003WG-JE; Sat, 19 Sep 2020 11:42:27 -0400
Date: Sat, 19 Sep 2020 18:42:23 +0300
Message-Id: <838sd53h9c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>, martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87363dpyz3.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sat, 
 19 Sep 2020 17:28:48 +0200)
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <87363dpyz3.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 9366
Cc: 9366 <at> debbugs.gnu.org, david@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Sat, 19 Sep 2020 17:28:48 +0200
> Cc: 9366 <at> debbugs.gnu.org
> 
> > +#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?

Do we really have to do this on such a low level?  Why cannot we call
such a hook from change_frame_size, which would allow us to do that in
platform-independent manner?

Martin, am I missing something here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 19 Sep 2020 15:29:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 11:29:07 2020
Received: from localhost ([127.0.0.1]:47818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJenT-0000jM-Mn
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 11:29:07 -0400
Received: from quimby.gnus.org ([95.216.78.240]:42776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kJenR-0000io-IJ
 for 9366 <at> 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=;
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 <larsi@HIDDEN>)
 id 1kJenB-0006lU-69; Sat, 19 Sep 2020 17:28:58 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: David De La Harpe Golden <david@HIDDEN>
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN>
X-Now-Playing: Propaganda's _Wishful Thinking_: "Abuse"
Date: Sat, 19 Sep 2020 17:28:48 +0200
In-Reply-To: <4E55DACA.6080401@HIDDEN> (David De La Harpe Golden's
 message of "Thu, 25 Aug 2011 06:16:58 +0100")
Message-ID: <87363dpyz3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  David De La Harpe Golden <david@HIDDEN> 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. > > Fo [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 9366
Cc: 9366 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

David De La Harpe Golden <david@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 31 Aug 2011 17:52:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 31 13:52:59 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QyoyA-0002ba-Dt
	for submit <at> debbugs.gnu.org; Wed, 31 Aug 2011 13:52:59 -0400
Received: from mail-ww0-f46.google.com ([74.125.82.46])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <hober0@HIDDEN>) id 1QyosH-0002TL-60
	for 9366 <at> debbugs.gnu.org; Wed, 31 Aug 2011 13:46:53 -0400
Received: by wwg7 with SMTP id 7so1032837wwg.15
	for <9366 <at> debbugs.gnu.org>; Wed, 31 Aug 2011 10:43:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:from:date:message-id:subject:to:content-type;
	bh=NnbaHSXaVcCvpiy7kRO6BIB/ZdayGhgCYRQi7qjhzms=;
	b=KdG+hlxcY3492sfFlQQSyAAQmP459yA8H8HJjjCVe5I0NnUkHN+2SSnb2lgqPj9Q76
	Ki9k45dtj3JV2rtymN5K1HYgqb17IFHiNpgULEwUgQfh2F0QsqfAQ2O8nEXzAYKNpGOg
	QnMB8Vxz7FqoL4BXJeV7RB8Xk59VvXZhs9DK4=
Received: by 10.216.137.88 with SMTP id x66mr588854wei.101.1314812616278; Wed,
	31 Aug 2011 10:43:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.216.210.197 with HTTP; Wed, 31 Aug 2011 10:43:16 -0700 (PDT)
From: "Edward O'Connor" <hober0@HIDDEN>
Date: Wed, 31 Aug 2011 10:43:16 -0700
Message-ID: <CAME3nGJtYBkARy6qfMVWiqi0cL-RKQQ5u7hkqR3q7WyGU=uE6A@HIDDEN>
Subject: Attempting to add myself to this bug's CC list
To: 9366 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 9366
X-Mailman-Approved-At: Wed, 31 Aug 2011 13:52:57 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.6 (---)

I apologize for the noise; the normal way of CCing oneself apparently
doesn't work[1].


Ted

1. http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5439




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 25 Aug 2011 12:45:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 08:45:18 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QwZJ6-0007k2-44
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 08:45:17 -0400
Received: from harpegolden.net ([65.99.215.13])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <david@HIDDEN>) id 1QwZJ1-0007bp-5x
	for 9366 <at> debbugs.gnu.org; Thu, 25 Aug 2011 08:45:12 -0400
Received: from [87.198.47.59] (87-198-47-59.ptr.magnet.ie [87.198.47.59])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(Client CN "David De La Harpe Golden",
	Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK))
	by harpegolden.net (Postfix) with ESMTPSA id E329468474;
	Thu, 25 Aug 2011 13:42:30 +0100 (IST)
Message-ID: <4E564335.1080004@HIDDEN>
Date: Thu, 25 Aug 2011 13:42:29 +0100
From: David De La Harpe Golden <david@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#9366: Display geometry change hook
References: <4E55DACA.6080401@HIDDEN> <83fwkqghmq.fsf@HIDDEN>
In-Reply-To: <83fwkqghmq.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 9366
Cc: 9366 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On 25/08/11 06:55, Eli Zaretskii wrote:
>> Date: Thu, 25 Aug 2011 06:16:58 +0100
>> From: David De La Harpe Golden<david@HIDDEN>
>>
>> Dunno about w32 as yet, but presumably it has something similar.
>
> On MS-Windows there's the WM_DISPLAYCHANGE message sent to the message
> pump.  Emacs already accepts that message (see w32term.c), but
> currently does nothing with it except announcing the change to the
> attached debugger.
>
> However, on Windows the message also specifies the new resolution, so
> this:
>

Technically the incoming x11 event does too, but as you can re-query 
with the existing #'display-pixel-width etc. functions (and get the new 
values) anyway by the time the hook actually runs (on x11), wasn't sure 
we needed to allow for propagation of the info really.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at 9366 <at> debbugs.gnu.org:


Received: (at 9366) by debbugs.gnu.org; 25 Aug 2011 05:57:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 01:57:49 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QwSwm-0004wP-Vi
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:57:49 -0400
Received: from mtaout20.012.net.il ([80.179.55.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1QwSwk-0004wI-V7
	for 9366 <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:57:47 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0LQG00H00Z1C7R00@HIDDEN> for
	9366 <at> debbugs.gnu.org; Thu, 25 Aug 2011 08:55:08 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([84.228.21.112]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0LQG00GUBZ3TJFD0@HIDDEN>;
	Thu, 25 Aug 2011 08:55:05 +0300 (IDT)
Date: Thu, 25 Aug 2011 08:55:09 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#9366: Display geometry change hook
In-reply-to: <4E55DACA.6080401@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: David De La Harpe Golden <david@HIDDEN>
Message-id: <83fwkqghmq.fsf@HIDDEN>
References: <4E55DACA.6080401@HIDDEN>
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 9366
Cc: 9366 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

> Date: Thu, 25 Aug 2011 06:16:58 +0100
> From: David De La Harpe Golden <david@HIDDEN>
> 
> Dunno about w32 as yet, but presumably it has something similar.

On MS-Windows there's the WM_DISPLAYCHANGE message sent to the message
pump.  Emacs already accepts that message (see w32term.c), but
currently does nothing with it except announcing the change to the
attached debugger.

However, on Windows the message also specifies the new resolution, so
this:

> +        inev.ie.kind = SCREEN_CHANGE_NOTIFY_EVENT;
> +        inev.ie.frame_or_window = XCAR(dpyinfo->name_list_element);

is not general enough: there should be a way to provide the new
dimensions to the event queue.  It also means that a "normal" hook is
insufficient to handle this event, it should be a -functions style
hook.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Aug 2011 05:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 01:19:49 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QwSM0-0002ah-NK
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:19:49 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <david@HIDDEN>) id 1QwSLx-0002aZ-GA
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:19:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <david@HIDDEN>) id 1QwSJO-00043w-Lu
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:17:08 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:36061)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <david@HIDDEN>) id 1QwSJO-00043s-KB
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 01:17:06 -0400
Received: from eggs.gnu.org ([140.186.70.92]:40139)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <david@HIDDEN>) id 1QwSJM-0004re-Ss
	for bug-gnu-emacs@HIDDEN; Thu, 25 Aug 2011 01:17:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <david@HIDDEN>) id 1QwSJK-00043e-Sc
	for bug-gnu-emacs@HIDDEN; Thu, 25 Aug 2011 01:17:04 -0400
Received: from harpegolden.net ([65.99.215.13]:60661)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <david@HIDDEN>) id 1QwSJK-00043M-Lj
	for bug-gnu-emacs@HIDDEN; Thu, 25 Aug 2011 01:17:02 -0400
Received: from [87.198.47.59] (87-198-47-59.ptr.magnet.ie [87.198.47.59])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(Client CN "David De La Harpe Golden",
	Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK))
	by harpegolden.net (Postfix) with ESMTPSA id 6A834683F4
	for <bug-gnu-emacs@HIDDEN>; Thu, 25 Aug 2011 06:17:00 +0100 (IST)
Message-ID: <4E55DACA.6080401@HIDDEN>
Date: Thu, 25 Aug 2011 06:16:58 +0100
From: David De La Harpe Golden <david@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: Display geometry change hook
Content-Type: multipart/mixed; boundary="------------010807060609020203010606"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.4 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.4 (----)

This is a multi-part message in MIME format.
--------------010807060609020203010606
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Severity: wishlist

Raised by Edward O'Connor in emacs-devel thread [1], filing in 
bugtracker so it doesn't get lost over the feature freeze period.

Emacs doesn't appear to currently provide a hook that is reliably called 
when the _display_ geometry changes on graphical window systems. e.g. 
screen resolution changed by user, monitor hotplugging.

Emacs frame/window geometry might sometimes be considered to remain the 
same by the window system terms despite changing overall display 
geometry, so e.g. window-configuration-change-hook is not always run 
when the display geometry changes.

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.


[1] http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00544.html
From: "Edward O'Connor" <...>
Date: Fri, 12 Aug 2011 10:51:25 -0700
Message-ID: 
<CAME3nGLnjLXixmSY45BWFX6qtCp2_XBR4x6a281hO6Mu=rnSuQ@HIDDEN>
Subject: is there a hook run when display geometry changes?


--------------010807060609020203010606
Content-Type: text/x-patch;
 name="xrandr_monitoring_r1.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="xrandr_monitoring_r1.diff"

=== modified file 'configure.in'
--- configure.in	2011-08-04 17:04:39 +0000
+++ configure.in	2011-08-13 04:36:34 +0000
@@ -160,6 +160,8 @@
 OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
 OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
 
+OPTION_DEFAULT_ON([xrandr],[don't compile with XRandR support])
+
 OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
 OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
 OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
@@ -2590,6 +2592,21 @@
 fi
 AC_SUBST(LIBXSM)
 
+### Use xrandr (-lXrandr) if available
+HAVE_XRANDR=no
+XRANDR_LIBS=
+XRANDR_CFLAGS=
+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
+  fi
+fi
+AC_SUBST(XRANDR_LIBS)
+AC_SUBST(XRANDR_CFLAGS)
+
 ### Use libxml (-lxml2) if available
 if test "${with_xml2}" != "no"; then
   ### I'm not sure what the version number should be, so I just guessed.
@@ -3700,6 +3717,8 @@
 echo "  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}"
 echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
 
+echo "  Does Emacs use -lXrandr?                                ${HAVE_XRANDR}"
+
 echo "  Does Emacs use toolkit scroll bars?                     ${USE_TOOLKIT_SCROLL_BARS}"
 echo
 

=== modified file 'lisp/frame.el'
--- lisp/frame.el	2011-07-16 13:02:51 +0000
+++ lisp/frame.el	2011-08-13 04:04:16 +0000
@@ -1585,6 +1585,18 @@
 (define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
 
 
+;; Display geometry changes
+
+(defun handle-screen-change-notify-event (event)
+  "Handle screen-change-notify-event on the display in EVENT.
+   At present, just runs any window-configuration-changed-hook
+   for all frames on the display."
+  ; FIXME: do we want a completely separate hook instead?
+  (interactive "e")
+  (let ((display-name (nth 1 event)))
+    (mapcar #'run-window-configuration-change-hook
+            (frames-on-display-list display-name))))
+
 ;;;; Key bindings
 
 (define-key ctl-x-5-map "2" 'make-frame-command)
@@ -1592,6 +1604,9 @@
 (define-key ctl-x-5-map "0" 'delete-frame)
 (define-key ctl-x-5-map "o" 'other-frame)
 
+(define-key special-event-map [screen-change-notify-event]
+  'handle-screen-change-notify-event)
+
 (provide 'frame)
 
 ;;; frame.el ends here

=== modified file 'src/Makefile.in'
--- src/Makefile.in	2011-08-04 17:04:39 +0000
+++ src/Makefile.in	2011-08-13 05:16:52 +0000
@@ -170,6 +170,9 @@
 
 LIBXSM=@LIBXSM@
 
+XRANDR_CFLAGS = @XRANDR_CFLAGS@
+XRANDR_LIBS = @XRANDR_LIBS@
+
 LIBXTR6=@LIBXTR6@
 
 ## $(LIBXMU) -lXt $(LIBXTR6) -lXext if USE_X_TOOLKIT, else $(LIBXSM).
@@ -313,6 +316,7 @@
   $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
   $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \
   $(LIBGNUTLS_CFLAGS) \
+  $(XRANDR_CFLAGS) \
   $(C_WARNINGS_SWITCH) $(CFLAGS)
 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
@@ -388,7 +392,8 @@
    $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
    $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
-   $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(LIB_PTHREAD_SIGMASK) \
+   $(LIBGNUTLS_LIBS) $(XRANDR_LIBS) \
+   $(LIB_PTHREAD) $(LIB_PTHREAD_SIGMASK) \
    $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC)
 
 all: emacs$(EXEEXT) $(OTHER_FILES)

=== modified file 'src/keyboard.c'
--- src/keyboard.c	2011-08-04 17:04:39 +0000
+++ src/keyboard.c	2011-08-13 03:41:32 +0000
@@ -331,6 +331,8 @@
 #endif
 static Lisp_Object Qconfig_changed_event;
 
+static Lisp_Object Qscreen_change_notify_event;
+
 /* Lisp_Object Qmouse_movement; - also an event header */
 
 /* Properties of event headers.  */
@@ -4033,6 +4035,11 @@
 	  obj = make_lispy_event (event);
 	  kbd_fetch_ptr = event + 1;
 	}
+      else if (event->kind == SCREEN_CHANGE_NOTIFY_EVENT)
+	{
+	  obj = make_lispy_event (event);
+	  kbd_fetch_ptr = event + 1;
+	}
       else
 	{
 	  /* If this event is on a different frame, return a switch-frame this
@@ -5987,6 +5994,9 @@
 			       Qnil));
        }
 #endif /* HAVE_GPM */
+    case SCREEN_CHANGE_NOTIFY_EVENT:
+	return Fcons (Qscreen_change_notify_event,
+                      Fcons (event->frame_or_window, Qnil));
 
       /* The 'kind' field of the event is something we don't recognize.  */
     default:
@@ -11527,6 +11537,7 @@
   DEFSYM (Qsave_session, "save-session");
   DEFSYM (Qconfig_changed_event, "config-changed-event");
   DEFSYM (Qmenu_enable, "menu-enable");
+  DEFSYM (Qscreen_change_notify_event, "screen-change-notify-event");
 
 #if defined (WINDOWSNT)
   DEFSYM (Qlanguage_change, "language-change");
@@ -12288,6 +12299,10 @@
 
   initial_define_lispy_key (Vspecial_event_map, "config-changed-event",
 			    "ignore");
+
+  initial_define_lispy_key (Vspecial_event_map, "screen-change-notify-event",
+			    "ignore");
+
 }
 
 /* Mark the pointers in the kboard objects.

=== modified file 'src/termhooks.h'
--- src/termhooks.h	2011-06-06 19:43:39 +0000
+++ src/termhooks.h	2011-08-13 03:18:24 +0000
@@ -206,6 +206,13 @@
   , NS_NONKEY_EVENT
 #endif
 
+  /* Generated when a bitmapped display's (upon which emacs has
+     frame(s) open) geometry changes dynamically e.g. by monitor
+     hotplugging or resolution change.
+     On X, that which is handled by the X Resize and Rotate
+     Extension.  */
+  , SCREEN_CHANGE_NOTIFY_EVENT
+
 };
 
 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT

=== modified file 'src/window.c'
--- src/window.c	2011-08-05 11:04:44 +0000
+++ src/window.c	2011-08-13 04:04:18 +0000
@@ -6542,7 +6542,11 @@
 	       doc: /* Functions to call when window configuration changes.
 The buffer-local part is run once per window, with the relevant window
 selected; while the global part is run only once for the modified frame,
-with the relevant frame selected.  */);
+with the relevant frame selected.
+
+If emacs can detect them, changes to the overall geometry of a display
+upon which a frame is open will by default also run this hook via
+the function `handle-screen-change-notify-event`.  */);
   Vwindow_configuration_change_hook = Qnil;
 
   DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay,

=== modified file 'src/xterm.c'
--- src/xterm.c	2011-08-04 11:06:22 +0000
+++ src/xterm.c	2011-08-13 05:00:47 +0000
@@ -85,6 +85,10 @@
 #include <X11/Shell.h>
 #endif
 
+#ifdef HAVE_XRANDR
+#include <X11/extensions/Xrandr.h>
+#endif
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
@@ -359,7 +363,6 @@
 static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
 static void x_initialize (void);
 
-
 /* Flush display of frame F, or of all frames if F is null.  */
 
 static void
@@ -6993,6 +6996,26 @@
       break;
 
     default:
+#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+?
+           Even if it is, can/should we call it ourselves here?  */
+#if !(defined USE_X_TOOLKIT || defined USE_GTK)
+        BLOCK_INPUT;
+        XRRUpdateConfiguration(&event);
+        UNBLOCK_INPUT;
+#endif
+        /* FIXME: do we really need a separate event kind? It seems
+           conceptually similar to a CONFIG_CHANGED_EVENT */
+        inev.ie.kind = SCREEN_CHANGE_NOTIFY_EVENT;
+        inev.ie.frame_or_window = XCAR(dpyinfo->name_list_element);
+      }
+    goto OTHER;
+#endif /* HAVE_XRANDR */
     OTHER:
 #ifdef USE_X_TOOLKIT
     BLOCK_INPUT;
@@ -8169,6 +8192,25 @@
 
 #endif /* not HAVE_X11R6_XIM */
 
+
+/***********************************************************************
+			   X Resize and Rotate
+ ***********************************************************************/
+
+#ifdef HAVE_XRANDR
+
+static void
+xrandr_initialize (struct x_display_info *dpyinfo)
+{
+  dpyinfo->xrandr_present = XRRQueryExtension (dpyinfo->display,
+                                               &(dpyinfo->xrandr_event_base),
+                                               &(dpyinfo->xrandr_error_base));
+  if (dpyinfo->xrandr_present)
+    XRRSelectInput (dpyinfo->display, dpyinfo->root_window,
+                    RRScreenChangeNotifyMask);
+}
+
+#endif /* HAVE_XRANDR */
 
 
 /* Calculate the absolute position in frame F
@@ -10315,6 +10357,10 @@
   xim_initialize (dpyinfo, resource_name);
 #endif
 
+#ifdef HAVE_XRANDR
+  xrandr_initialize (dpyinfo);
+#endif
+
   xsettings_initialize (dpyinfo);
 
   /* This is only needed for distinguishing keyboard and process input.  */

=== modified file 'src/xterm.h'
--- src/xterm.h	2011-07-07 02:24:56 +0000
+++ src/xterm.h	2011-08-13 02:41:25 +0000
@@ -354,6 +354,14 @@
 
   /* SM */
   Atom Xatom_SM_CLIENT_ID;
+
+#ifdef HAVE_XRANDR
+  /* X Resize and Rotate */
+  Bool xrandr_present;
+  int xrandr_event_base;
+  int xrandr_error_base;
+#endif
+
 };
 
 #ifdef HAVE_X_I18N



--------------010807060609020203010606--




Acknowledgement sent to David De La Harpe Golden <david@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9366; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 22 Sep 2020 15:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.