From unknown Sat Jun 21 03:04:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16517 <16517@debbugs.gnu.org> To: bug#16517 <16517@debbugs.gnu.org> Subject: Status: Emacs and display resolution change Reply-To: bug#16517 <16517@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:04:46 +0000 retitle 16517 Emacs and display resolution change reassign 16517 emacs submitter 16517 Fabrice Popineau severity 16517 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 02:33:08 2014 Received: (at submit) by debbugs.gnu.org; 22 Jan 2014 07:33:08 +0000 Received: from localhost ([127.0.0.1]:60165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5sJ8-0001YL-El for submit@debbugs.gnu.org; Wed, 22 Jan 2014 02:33:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56992) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5sJ5-0001YD-MD for submit@debbugs.gnu.org; Wed, 22 Jan 2014 02:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5sJ4-0003NA-8k for submit@debbugs.gnu.org; Wed, 22 Jan 2014 02:33:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5sJ4-0003N6-5m for submit@debbugs.gnu.org; Wed, 22 Jan 2014 02:33:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5sIz-0004wD-Qt for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 02:33:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5sIu-0003Lq-FE for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 02:32:57 -0500 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:52020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5sIu-0003Ll-7E for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 02:32:52 -0500 Received: by mail-ea0-f176.google.com with SMTP id h14so4302069eaj.7 for ; Tue, 21 Jan 2014 23:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=mlLjTAKVetisdISeIFarX/8yB4Caw/IL5uaJzqDWXFw=; b=eWzBSVvBav7HXfru1xtql13ji8WjHanSNjfZFxVMLYTZcP3aV4cPkaJ2zzwsyQ8Fw3 C5wwU91wokMbfyLHqBqS4UOwhUxN2sRcAZEpNExGMLQpapLcJABi5G/pv4P8ZR7h/kxH W51AITk2je0BcKFBap4uUHnF4Xye+j0iyw+XQVbYsl2xUUhHH4OfyPQi7PoisXzgaxUV EP8pkpSwvqqG+mq1bbgY1m847K/iqByp8edUa5VizSVg/tn/ICNFLcSLYzbx9MSOnZnl wQ5O6NOphZs12gfMSKhL0abbq5iR3UT59rw4D8/K9Is/2gZEr32Vkz8mAAMB0gjJVwz2 czKw== X-Received: by 10.14.182.199 with SMTP id o47mr28160581eem.7.1390375971141; Tue, 21 Jan 2014 23:32:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.8.196 with HTTP; Tue, 21 Jan 2014 23:32:31 -0800 (PST) From: Fabrice Popineau Date: Wed, 22 Jan 2014 08:32:31 +0100 Message-ID: Subject: Emacs and display resolution change To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7b343b4edd3cff04f08a210a X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7b343b4edd3cff04f08a210a Content-Type: text/plain; charset=ISO-8859-1 Hi, The current Emacs trunk does not seem to honour display resolution change under Windows. There is one case where it is annoying: when the frame is fullsized. I have a laptop. I run `emacs -Q' , then `M-x toggle-frame-fullscreen'. Next I connect an external display with a higher resolution. The frame displays undecorated, but with a size of the previous screen resolution. I need to call `M-x toggle-frame-fullscreen' twice to get back a fullsized frame. I think that for handling at least this case, the following patch could be applied: === modified file 'src/w32term.c' --- src/w32term.c 2014-01-06 17:22:52 +0000 +++ src/w32term.c 2014-01-22 05:49:45 +0000 @@ -4841,6 +4844,7 @@ if (f) { dpyinfo->n_cbits = msg.msg.wParam; + x_check_fullscreen(f); DebPrint (("display change: %d %d\n", (short) LOWORD (msg.msg.lParam), (short) HIWORD (msg.msg.lParam))); However I'm not sure of any possibly harmful side effects. One thing I have observed is that if you start with a normal frame, lower the resolution to some point where the y resolution is less than the height of the frame, then the frame will become height-maximized. So if you raise the resolution again, it will stay height-maximized. I'm fine with that, but I'm not sure what users would expect. Memorizing the frame geometry so that it will be restored in case of several resolution change maybe more complex. Apologies if I missed obvious points or ways to handle that. Regards, Fabrice Popineau --047d7b343b4edd3cff04f08a210a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

The current Emacs trunk does not se= em to honour display resolution change under Windows.
There is on= e case where it is annoying: when the frame is fullsized.
I have = a laptop. I run `emacs -Q' , then `M-x toggle-frame-fullscreen'.
Next I connect an external display with a higher resolution.
The frame displays undecorated, but with a size of the previous screen res= olution.
I need to call `M-x toggle-frame-fullscreen' twice t= o get back a fullsized frame.

I think that for handling at least this case, the follo= wing patch could be applied:

=3D=3D=3D modifi= ed file 'src/w32term.c'
--- src/w32term.c =A0 =A0 =A0 201= 4-01-06 17:22:52 +0000
+++ src/w32term.c =A0 =A0 =A0 2014-01-22 05:49:45 +0000
@@ -= 4841,6 +4844,7 @@
=A0 =A0 =A0 =A0 =A0 if (f)
=A0 = =A0 =A0 =A0 =A0 =A0 {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 dpyinfo->n_c= bits =3D msg.msg.wParam;
+ =A0 =A0 =A0 =A0 =A0 =A0 x_check_fullsc= reen(f);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 DebPrint (("display change: %d %d\n&q= uot;,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(short) = LOWORD (msg.msg.lParam),
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0(short) HIWORD (msg.msg.lParam)));

However I'm not sure of any possibly harmful side effect= s.

One thing I have observed is that if you start = with a normal frame, lower the resolution to some point where the y resolut= ion is less than the height of the frame, then the frame will become height= -maximized. So if you raise the resolution again, it will stay height-maxim= ized.
I'm fine with that, but I'm not sure what users would expect. = Memorizing the frame geometry so that it will be restored in case of severa= l resolution change maybe more complex.

Apologies = if I missed obvious points or ways to handle that.=A0

Regards,

Fabrice Popineau
--047d7b343b4edd3cff04f08a210a-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 08:06:58 2014 Received: (at 16517-done) by debbugs.gnu.org; 25 Jan 2014 13:06:58 +0000 Received: from localhost ([127.0.0.1]:35181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W72ws-0008Us-1G for submit@debbugs.gnu.org; Sat, 25 Jan 2014 08:06:58 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:43987) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W72wo-0008Ug-Hm for 16517-done@debbugs.gnu.org; Sat, 25 Jan 2014 08:06:55 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0MZY00800JZI5J00@mtaout24.012.net.il> for 16517-done@debbugs.gnu.org; Sat, 25 Jan 2014 15:06:36 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY009LFKF0KO00@mtaout24.012.net.il>; Sat, 25 Jan 2014 15:06:36 +0200 (IST) Date: Sat, 25 Jan 2014 15:06:40 +0200 From: Eli Zaretskii Subject: Re: bug#16517: Emacs and display resolution change In-reply-to: X-012-Sender: halo1@inter.net.il To: Fabrice Popineau Message-id: <831tzwcisf.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16517-done Cc: 16517-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Fabrice Popineau > Date: Wed, 22 Jan 2014 08:32:31 +0100 > > The current Emacs trunk does not seem to honour display resolution change > under Windows. > There is one case where it is annoying: when the frame is fullsized. > I have a laptop. I run `emacs -Q' , then `M-x toggle-frame-fullscreen'. > Next I connect an external display with a higher resolution. > The frame displays undecorated, but with a size of the previous screen > resolution. > I need to call `M-x toggle-frame-fullscreen' twice to get back a fullsized > frame. > > I think that for handling at least this case, the following patch could be > applied: No comments, so I applied your patch. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 08:18:15 2014 Received: (at 16517-done) by debbugs.gnu.org; 25 Jan 2014 13:18:15 +0000 Received: from localhost ([127.0.0.1]:35198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W737n-0000NI-Cn for submit@debbugs.gnu.org; Sat, 25 Jan 2014 08:18:15 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:57694) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W737k-0000N9-Oa for 16517-done@debbugs.gnu.org; Sat, 25 Jan 2014 08:18:13 -0500 Received: by mail-ee0-f44.google.com with SMTP id c13so1422625eek.31 for <16517-done@debbugs.gnu.org>; Sat, 25 Jan 2014 05:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=AY0ZPQZLORZChb+AJeVaJza9RH42M8zWtphEgw7OZiA=; b=jgEPJKm8fCTJPGtsWKCu4QUcTxNgpZ3ClxlavOwz7BW8pCebUo9vtGpw0qBjPWBFSh jLR2fpYQDeii4Vt87XEx0zqpd66dk0uWQ8SXtawnZm6UNap54luIJzaSOmTHwkg0Z2/X 2Bqj2CGqYro8WvpB07nz/9vnjNlJwcJU5Rmz0V2b90A/Ei/rk7INNOYvKbJB5VGcSw2y wXfQjvoWB3kDIojsmmoHkEbcOnAgiFWSv9SRA7a0g5FURGoTeQ5nb+CE7AeRiP2nKEFk GCgGLZprnQ8F4HOaxPIF3o0u7egaVY4Ed30nb3NHK6jCBABz11q6/dbo/1xw8VscJwNd OPhw== X-Received: by 10.14.148.138 with SMTP id v10mr17456362eej.37.1390655891996; Sat, 25 Jan 2014 05:18:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.8.196 with HTTP; Sat, 25 Jan 2014 05:17:51 -0800 (PST) In-Reply-To: <831tzwcisf.fsf@gnu.org> References: <831tzwcisf.fsf@gnu.org> From: Fabrice Popineau Date: Sat, 25 Jan 2014 14:17:51 +0100 Message-ID: Subject: Re: bug#16517: Emacs and display resolution change To: Eli Zaretskii Content-Type: multipart/alternative; boundary=089e0160cdb472833a04f0cb4ea8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16517-done Cc: 16517-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e0160cdb472833a04f0cb4ea8 Content-Type: text/plain; charset=ISO-8859-1 Thanks. It seems harmless for those who don't need it and helps a lot the others (like me!). Fabrice 2014-01-25 Eli Zaretskii > > From: Fabrice Popineau > > Date: Wed, 22 Jan 2014 08:32:31 +0100 > > > > The current Emacs trunk does not seem to honour display resolution change > > under Windows. > > There is one case where it is annoying: when the frame is fullsized. > > I have a laptop. I run `emacs -Q' , then `M-x toggle-frame-fullscreen'. > > Next I connect an external display with a higher resolution. > > The frame displays undecorated, but with a size of the previous screen > > resolution. > > I need to call `M-x toggle-frame-fullscreen' twice to get back a > fullsized > > frame. > > > > I think that for handling at least this case, the following patch could > be > > applied: > > No comments, so I applied your patch. Thanks. > --089e0160cdb472833a04f0cb4ea8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks. It seems harmless for those who don't need it = and helps a lot the others (like me!).

Fabrice


2014-01-25 = Eli Zaretskii <eliz@gnu.org>
> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Wed, 22 Jan 2014 08:32:31 +0100
>
> The current Emacs trunk does not seem to honour display resolution cha= nge
> under Windows.
> There is one case where it is annoying: when the frame is fullsized. > I have a laptop. I run `emacs -Q' , then `M-x toggle-frame-fullscr= een'.
> Next I connect an external display with a higher resolution.
> The frame displays undecorated, but with a size of the previous screen=
> resolution.
> I need to call `M-x toggle-frame-fullscreen' twice to get back a f= ullsized
> frame.
>
> I think that for handling at least this case, the following patch coul= d be
> applied:

No comments, so I applied your patch. =A0Thanks.

--089e0160cdb472833a04f0cb4ea8-- From unknown Sat Jun 21 03:04:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Feb 2014 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator