GNU bug report logs - #16517
Emacs and display resolution change

Previous Next

Package: emacs;

Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>

Date: Wed, 22 Jan 2014 07:34:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16517 in the body.
You can then email your comments to 16517 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16517; Package emacs. (Wed, 22 Jan 2014 07:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fabrice Popineau <fabrice.popineau <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Jan 2014 07:34:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs and display resolution change
Date: Wed, 22 Jan 2014 08:32:31 +0100
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 25 Jan 2014 13:07:01 GMT) Full text and rfc822 format available.

Notification sent to Fabrice Popineau <fabrice.popineau <at> gmail.com>:
bug acknowledged by developer. (Sat, 25 Jan 2014 13:07:02 GMT) Full text and rfc822 format available.

Message #10 received at 16517-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Cc: 16517-done <at> debbugs.gnu.org
Subject: Re: bug#16517: Emacs and display resolution change
Date: Sat, 25 Jan 2014 15:06:40 +0200
> From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16517; Package emacs. (Sat, 25 Jan 2014 13:19:01 GMT) Full text and rfc822 format available.

Message #13 received at 16517-done <at> debbugs.gnu.org (full text, mbox):

From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16517-done <at> debbugs.gnu.org
Subject: Re: bug#16517: Emacs and display resolution change
Date: Sat, 25 Jan 2014 14:17:51 +0100
[Message part 1 (text/plain, inline)]
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 <at> gnu.org>

> > From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> > 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.
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Feb 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 87 days ago.

Previous Next


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