GNU bug report logs - #25542
25.1; Restoring the frame from fullscreen to maximized

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Thu, 26 Jan 2017 08:16:02 UTC

Severity: normal

Found in version 25.1

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ken Brown <kbrown <at> cornell.edu>
To: martin rudalics <rudalics <at> gmx.at>, Dani Moncayo <dmoncayo <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 25542 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> users.sourceforge.net>
Subject: bug#25542: 25.1; Restoring the frame from fullscreen to maximized
Date: Fri, 11 Sep 2020 16:16:09 -0400
[Message part 1 (text/plain, inline)]
On 9/11/2020 3:53 AM, martin rudalics wrote:
>  >> ... after
>  >> maximizing the frame with the mouse, the value of
>  >>
>  >> (frame-parameter nil 'fullscreen)
>  >>
>  >> is nil.  Correct?
>  >
>  > Yes.
>  >
>  >> And what is its value if, instead, you maximize the
>  >> frame via 'toggle-frame-maximized'?
>  >
>  > maximized.
> 
> Mixing frame resizing triggered by Emacs commands and external tools is
> tricky to handle.
> 
>  >> Apparently some check _is_ needed (why?) so probably
>  >> using
>  >>
>  >>              if (x < 0 || y < 0)
>  >>                store_frame_param (f, Qfullscreen, Qmaximized);
>  >>
>  >> instead will fix it.  Can you try that (as I said elsewhere it will then
>  >> fail for borderless, maximized frames)?
>  >
>  > Yes, that does fix it.
> 
> So we'll probably have to use that.  Can you install it?

Patch attached (under your name).  Please check it and see if the commit message 
and comment change are OK.

Eli and Lars, I think this should go to master rather than the emacs-27 branch, 
since there's too much that we don't understand about the fix.  Do you agree?

>  > I haven't tried to test anything involving borderless frames.
> 
> If you
> 
> (set-frame-parameter nil 'undecorated t)
> 
> and maximize the frame via some Windows (Aero, IIRC) command, what does

Sorry, but I don't know what an Aero command is, and I'm not interested in 
learning if I don't have to.  If anyone really cares about this case and can't 
carry out the experiment themselves, I'm willing to do it, but I'll need 
explicit instructions.

> (frame-parameter nil 'fullscreen)
> 
> report?  With and without the && ~> || change.
> 
> And it would still be interesting to understand your earlier finding,
> namely that
> 
>    If I make this change and follow Dani's recipe from the original bug
>    report, the second F11 press doesn't restore the previous state.
>    Instead, the frame appears to get slightly smaller for an instant and
>    then immediately reverts to fullscreen mode.
> 
> That second F11 should set the 'fullscreen parameter to 'maximized so I
> fail to see how a subsequent action can restore it to 'fullboth.  In
> retrospect, that
> 
>            /* Windows can send us a SIZE_MAXIMIZED message even
>               when fullscreen is fullboth ....
> 
> comment apparently matches your experience now but I cannot even recall
> based on what experience I added it back then.
> 
> Thanks, martin

Ken
[0001-Fix-toggle-frame-fullscreen-on-w32-builds.patch (text/plain, attachment)]

This bug report was last modified 4 years and 258 days ago.

Previous Next


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