Subject: Re: bug#25542: 25.1; Restoring the frame from fullscreen to maximized

From: martin rudalics <[email-masked]>
Date: Sat, 28 Jan 2017 09:02:11 +0100

> Your assumption is correct. I added some message calls to master (as
 > in the attached diff). With the taskbar on the left I got:
 >
 > SIZE_MAXIMIZED, fullscreen = nil
 > SIZE_MAXIMIZED, x = 54, y = -8
 >
 > on the maximize, and
 >
 > SIZE_MAXIMIZED, fullscreen = fullboth
 >
 > on hitting f11 the first time. Nothing the second time (when Emacs
 > incorrectly switches to non-maximized state).
 >
 > With the taskbar on top it's the same except x = -8, y = 22 (when
 > taskbar is on the right or botton both x and y are -8 and the the
 > second f11 produces the same message as maximizing).

Thank you very much for checking.  I suppose that replacing

		  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);
		      }

with

			  store_frame_param (f, Qfullscreen, Qmaximized);

should work because I doubt that "Windows can send us a SIZE_MAXIMIZED
message even when fullscreen is fullboth" can happen but who knows ...

martin