all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 25542@debbugs.gnu.org
Subject: bug#25542: 25.1; Restoring the frame from fullscreen to maximized
Date: Fri, 27 Jan 2017 14:47:40 +0100	[thread overview]
Message-ID: <588B4F7C.40909@gmx.at> (raw)
In-Reply-To: <CAH8Pv0h4LSdNVQzLU7oxjZs_ceEDJ7CVT5qz0DgPQpfKHp886Q@mail.gmail.com>

 > ** Before step 2 (i.e. just after maximizing the frame with the mouse):
 >
 > ((outer-position 54 . -8) (outer-size 1554 . 916)

54 because the frame's left outer edge is by external-border-size
pixels left of the taskbar's right end which according to

 > LEFT:
 > (((geometry 0 0 1600 900) (workarea 62 0 1538 900) (mm-size 443 249)
 > (name . "\\\\.\\DISPLAY1") (frames #<frame emacs@CPX-L6Q03C31DOX
 > 0x10100bc30>)))

is at 62.  -8 because the frame's top edge is by external-border-size
pixels above the display.

 > (external-border-size 8 . 8) (title-bar-size 1516 . 23)
 > (menu-bar-external . t) (menu-bar-size 1538 . 20) (tool-bar-external)
 > (tool-bar-position . top) (tool-bar-size 1554 . 36)
 > (internal-border-width . 0))
 >
 > ** After step 3 (i.e. just after pressing F11 a second time)
 >
 > ((outer-position 192 . 130) (outer-size 689 . 671)
 > (external-border-size 8 . 8) (title-bar-size 651 . 23)
 > (menu-bar-external . t) (menu-bar-size 673 . 20) (tool-bar-external)
 > (tool-bar-position . top) (tool-bar-size 689 . 36)
 > (internal-border-width . 0))

All these values are consistent now and indicate that the frame has
returned to its normal state after step 3.

 > These values (after final step) are the same I get at the very
 > beginning (just after "emacs -Q").

Everything seems clear - the bug is all mine.  Windows just told us that
the frame was maximized but the simple hack in w32.term.c

		case SIZE_MAXIMIZED:
		  ...
		  /* Windows can send us a SIZE_MAXIMIZED message even
		     when fullscreen is fullboth.  The following is a
		     simple hack to check that based on the fact that
		     only a maximized fullscreen frame should have both
		     top/left outside the screen.  */
		  if (EQ (fullscreen, Qfullwidth) || EQ (fullscreen, Qfullheight)
		      || NILP (fullscreen))
		      {
			int x, y;

			x_real_positions (f, &x, &y);
			if (x < 0 && y < 0)
			  store_frame_param (f, Qfullscreen, Qmaximized);
		      }

fails becaue either x (in your case) or y (in the taskbar at top case)
are greater zero.  (I boldly assume that NILP (fullscreen) held, maybe
Noam can verify - I never move my taskbar.)  I could replace

			if (x < 0 && y < 0)
			
with

			if (x < 0 || y < 0)

to handle the two cases but that check appears downright silly and will
fail anyway for border-less, maximized frames.  I must devise something
better.

Thanks for all the information you sent, martin





  reply	other threads:[~2017-01-27 13:47 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  8:15 bug#25542: 25.1; Restoring the frame from fullscreen to maximized Dani Moncayo
2017-01-26  9:51 ` martin rudalics
2017-01-26 10:20   ` Dani Moncayo
2017-01-26 10:54     ` Dani Moncayo
2017-01-26 17:49       ` Dani Moncayo
2017-01-26 18:02         ` Noam Postavsky
2017-01-26 19:06         ` martin rudalics
2017-01-27  7:54           ` Dani Moncayo
2017-01-27  9:18             ` martin rudalics
2017-01-26 14:00     ` martin rudalics
2017-01-26 15:43       ` Noam Postavsky
2017-01-26 16:10         ` Eli Zaretskii
2017-01-27  8:03       ` Dani Moncayo
2017-01-27  8:16         ` Eli Zaretskii
2017-01-27  8:22           ` Dani Moncayo
2017-01-27  9:19         ` martin rudalics
2017-01-27  9:25           ` Dani Moncayo
2017-01-27  9:31             ` Dani Moncayo
2017-01-27  9:50               ` martin rudalics
2017-01-27 10:22                 ` Dani Moncayo
2017-01-27 10:27                   ` Dani Moncayo
2017-01-27  9:34             ` martin rudalics
2017-01-27 10:01               ` Dani Moncayo
2017-01-27 13:47                 ` martin rudalics [this message]
2017-01-27 18:50                   ` Noam Postavsky
2017-01-28  8:02                     ` martin rudalics
2020-09-04 12:32                       ` Lars Ingebrigtsen
2020-09-04 17:50                         ` Dani Moncayo
2020-09-05  6:46                           ` Eli Zaretskii
2020-09-05 11:59                             ` Dani Moncayo
2020-09-05 12:17                               ` Eli Zaretskii
2020-09-05 12:19                                 ` Dani Moncayo
2020-09-05 12:30                                   ` Eli Zaretskii
2020-09-05 12:32                                     ` Dani Moncayo
2020-09-05 12:48                                       ` Eli Zaretskii
2020-09-05 15:10                                       ` Ken Brown
2020-09-05 16:07                                         ` Eli Zaretskii
2020-09-05 16:10                                           ` Ken Brown
2020-09-05 16:41                                             ` Eli Zaretskii
2020-09-09  8:44                               ` martin rudalics
2020-09-09 16:46                                 ` Dani Moncayo
2020-09-09 18:19                                 ` Ken Brown
2020-09-09 20:24                                   ` Ken Brown
2020-09-10  7:16                                     ` martin rudalics
2020-09-10 15:05                                       ` Ken Brown
2020-09-10 18:16                                         ` martin rudalics
2020-09-10 19:04                                           ` Ken Brown
2020-09-11  7:53                                             ` martin rudalics
2020-09-11 20:16                                               ` Ken Brown
2020-09-11 20:33                                                 ` Achim Gratz
2020-09-11 21:18                                                   ` Ken Brown
2020-09-12  6:54                                                     ` martin rudalics
2020-09-12 11:37                                                       ` Ken Brown
2020-09-12  6:54                                                   ` martin rudalics
2020-09-12  6:06                                                 ` Eli Zaretskii
2020-09-12  6:54                                                 ` martin rudalics
2017-01-26 16:08   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=588B4F7C.40909@gmx.at \
    --to=rudalics@gmx.at \
    --cc=25542@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.