From unknown Sun Aug 17 22:12:28 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#19075 <19075@debbugs.gnu.org> To: bug#19075 <19075@debbugs.gnu.org> Subject: Status: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows Reply-To: bug#19075 <19075@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:12:28 +0000 retitle 19075 `toggle-frame-maximized' and `toggle-frame-fullscreen' on Win= dows reassign 19075 emacs submitter 19075 Alexander Shukaev severity 19075 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 17 03:14:05 2014 Received: (at submit) by debbugs.gnu.org; 17 Nov 2014 08:14:05 +0000 Received: from localhost ([127.0.0.1]:35730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqHRk-000743-SD for submit@debbugs.gnu.org; Mon, 17 Nov 2014 03:14:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34059) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqHRj-00073s-4n for submit@debbugs.gnu.org; Mon, 17 Nov 2014 03:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqHRh-0005xB-Rf for submit@debbugs.gnu.org; Mon, 17 Nov 2014 03:14:02 -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]:37139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqHRh-0005x6-Pk for submit@debbugs.gnu.org; Mon, 17 Nov 2014 03:14:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqHRg-0002kv-EG for bug-gnu-emacs@gnu.org; Mon, 17 Nov 2014 03:14:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqHRe-0005wC-FL for bug-gnu-emacs@gnu.org; Mon, 17 Nov 2014 03:14:00 -0500 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:40961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqHRe-0005vh-3Q for bug-gnu-emacs@gnu.org; Mon, 17 Nov 2014 03:13:58 -0500 Received: by mail-lb0-f177.google.com with SMTP id z12so8490640lbi.8 for ; Mon, 17 Nov 2014 00:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=F9m1XwWJ7th5W+c2ydwekpxammgY+92B4/RXf1GvqBU=; b=X568JWLv791b65Y160R+m8VxhuNM2dIc9MXEauERRRFBxNBWb+KlWqYCOaieY+fCpB xcjb+yeqMpQrHQlzKjTcQqXDlNlcQifZHdBdNrCJxoIkzXRc4pID7LpCE92PX5KG9IRo ferbwf81NTFMu5Cywc1rIliB+WEv6vRyFofYL3JXZ7u3n51yxDwQTOwVnSxDQ6sbDw0q RaTI8tRUD64uIPEHTFEXn9rOoDjw9LXXifZLWxUpXicstXK/+HZJyaroDtfN7GNe+asO 9lC5dpHdICuGnNx270BlVnn5Pt3aEtjV/+GDDEF4UcQIDJVBxodsKDPSx+kkVKfUmGvb gcAQ== MIME-Version: 1.0 X-Received: by 10.152.42.172 with SMTP id p12mr25488794lal.11.1416212036290; Mon, 17 Nov 2014 00:13:56 -0800 (PST) Received: by 10.112.202.106 with HTTP; Mon, 17 Nov 2014 00:13:56 -0800 (PST) Date: Mon, 17 Nov 2014 09:13:56 +0100 Message-ID: Subject: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows From: Alexander Shukaev To: bug-gnu-emacs Content-Type: multipart/alternative; boundary=001a11c35086598ef20508098f4d 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 (----) --001a11c35086598ef20508098f4d Content-Type: text/plain; charset=UTF-8 `init.el': (add-hook 'window-setup-hook 'toggle-frame-maximized t) (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) does not work as expected. Emacs goes fullscreen indeed. However, running manually `(toggle-frame-fullscreen)' once again after Emacs loaded, does not bring Emacs into maximized state, it rather returns to a small initial frame (of the default size, `emacs -q' to remind yourself how it looks like). Changing `init.el' to: (add-to-list 'default-frame-alist '(fullscreen . maximized)) (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) does not help either. One could think that somehow `maximized' parameter is not set, but if one has in `init.el' only: (add-to-list 'default-frame-alist '(fullscreen . maximized)) or (add-hook 'window-setup-hook 'toggle-frame-maximized t) then Emacs is loaded into maximized state indeed (*). On the other hand in `emacs -q', if one runs (toggle-frame-maximized) (toggle-frame-fullscreen) manually, and then runs `(toggle-frame-fullscreen)' manually once again, then Emacs is brought to maximized state. All this makes me think that there is some problem with memorizing `maximized' parameter during `window-setup-hook', but note that this actually contradicts (*) what makes this problem even more confusing. It's Emacs 24.4.50 on Windows. --001a11c35086598ef20508098f4d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
`init.el':

(add-hook = 9;window-setup-hook 'toggle-frame-maximized t)
(add-hook '= ;window-setup-hook 'toggle-frame-fullscreen t)

does not work as expected. Emacs goes fullscreen indeed. However, running = manually `(toggle-frame-fullscreen)' once again after Emacs loaded, doe= s not bring Emacs into maximized state, it rather returns to a small initia= l frame (of the default size, `emacs -q' to remind yourself how it look= s like). Changing `init.el' to:

(add-to-l= ist 'default-frame-alist '(fullscreen . maximized))
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)
=

does not help either.

One coul= d think that somehow `maximized' parameter is not set, but if one has i= n `init.el' only:

(add-to-list 'default-fr= ame-alist '(fullscreen . maximized))

or

(add-hook 'window-setup-hook 'toggle-frame-m= aximized t)

then Emacs is loaded into maximize= d state indeed (*).

On the other hand in `emacs -q= ', if one runs

(toggle-frame-maximized)
(toggle-frame-fullscreen)

manually, an= d then runs `(toggle-frame-fullscreen)' manually once again, then Emacs= is brought to maximized state.

All this makes me = think that there is some problem with memorizing `maximized' parameter = during `window-setup-hook', but note that this actually contradicts (*)= what makes this problem even more confusing.

It&#= 39;s Emacs 24.4.50 on Windows.
--001a11c35086598ef20508098f4d-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 17 04:29:32 2014 Received: (at 19075) by debbugs.gnu.org; 17 Nov 2014 09:29:32 +0000 Received: from localhost ([127.0.0.1]:35753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqIcl-0002cT-QF for submit@debbugs.gnu.org; Mon, 17 Nov 2014 04:29:32 -0500 Received: from mout.gmx.net ([212.227.15.18]:59111) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqIch-0002c8-A3 for 19075@debbugs.gnu.org; Mon, 17 Nov 2014 04:29:27 -0500 Received: from [178.191.143.215] ([178.191.143.215]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LvlTo-1Y2GSI1ENw-017RSi; Mon, 17 Nov 2014 10:29:26 +0100 Message-ID: <5469BFF4.3050606@gmx.at> Date: Mon, 17 Nov 2014 10:29:24 +0100 From: martin rudalics MIME-Version: 1.0 To: Alexander Shukaev , 19075@debbugs.gnu.org Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:frLi9PvfiabCgBiCw8moOeUoY8LRoKKAbZUbQ0df589ACgNg07N 7CLwbxCNtigWuT+/+shlyNfnukBD9JYgYUTo7MsiJi5GlZJ+IcWZD9qTXQ35ezzcAppgJIk XbaPD4PyxONbMkU2hxK5pvKBxp7rgY74xaycoqX6FxFyB9KMSoJHIecGQRyc4Dxy3dCGOhU K1LqoQOjMQ39L0cVu3FKw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19075 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.0 (/) > (add-hook 'window-setup-hook 'toggle-frame-maximized t) > (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) > > does not work as expected. Emacs goes fullscreen indeed. However, running > manually `(toggle-frame-fullscreen)' once again after Emacs loaded, does > not bring Emacs into maximized state, it rather returns to a small initial > frame (of the default size, `emacs -q' to remind yourself how it looks > like). [...] > It's Emacs 24.4.50 on Windows. Can you try with Emacs 25.0.50? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 17 04:48:41 2014 Received: (at 19075) by debbugs.gnu.org; 17 Nov 2014 09:48:41 +0000 Received: from localhost ([127.0.0.1]:35763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqIvJ-0003h5-0n for submit@debbugs.gnu.org; Mon, 17 Nov 2014 04:48:41 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:56384) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqIvG-0003gp-OI for 19075@debbugs.gnu.org; Mon, 17 Nov 2014 04:48:39 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so8405168wiw.9 for <19075@debbugs.gnu.org>; Mon, 17 Nov 2014 01:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vkep+hJhoM1xTg7WtfoGYqA2tjnlF2vjIl2Z/IAYf/c=; b=hgxT646EkPFKVdf2McuYPxnJofqF148IKOqA3XaKLTGZM/BzyIoeKv6VKva8B0dEJw ltyEMGicVKFzcHse5/UU227hOUdvyWSLLhIqUfDzWgDLGx0+5CJMg5W3DFz/OcG79nST lwWGdsQuG2Brkrfe2IikotSPkMBeda6HyvM3J17TiD+R30uK/fIoF2mkx3qhpw3ZA1UJ dhh1bRoTF8oCjBOBKcx5XUntuKU9FMHSibRogHBibVR3AeuoilZodKVaLbx4c5wer5Um ddsqwnHjrPFrajouaIr5BeHpHRBMx4smCUgW3xpqFRvHvy3dgzrA8sj2qFbwKpiOsijl NLxA== MIME-Version: 1.0 X-Received: by 10.180.92.169 with SMTP id cn9mr29698358wib.26.1416217716293; Mon, 17 Nov 2014 01:48:36 -0800 (PST) Received: by 10.180.101.101 with HTTP; Mon, 17 Nov 2014 01:48:36 -0800 (PST) In-Reply-To: <5469BFF4.3050606@gmx.at> References: <5469BFF4.3050606@gmx.at> Date: Mon, 17 Nov 2014 10:48:36 +0100 Message-ID: Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows From: Alexander Shukaev To: martin rudalics Content-Type: multipart/alternative; boundary=f46d0435c068e785fa05080ae11e X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19075 Cc: 19075@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 (/) --f46d0435c068e785fa05080ae11e Content-Type: text/plain; charset=UTF-8 > > Can you try with Emacs 25.0.50? It's the same problem. By the way, I forgot to mention that sometimes it works and sometimes not, like if there was some concurrency issue. But in the most cases it does not work. --f46d0435c068e785fa05080ae11e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Can you try with Emacs 25.0.50?
It's the same problem. By the way, I forgot to mention = that sometimes it works and sometimes not, like if there was some concurren= cy issue. But in the most cases it does not work.=C2=A0
--f46d0435c068e785fa05080ae11e-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 17 05:16:19 2014 Received: (at 19075) by debbugs.gnu.org; 17 Nov 2014 10:16:19 +0000 Received: from localhost ([127.0.0.1]:35771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqJM2-0005FU-Ta for submit@debbugs.gnu.org; Mon, 17 Nov 2014 05:16:19 -0500 Received: from mout.gmx.net ([212.227.15.18]:58608) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqJM0-0005FC-0n for 19075@debbugs.gnu.org; Mon, 17 Nov 2014 05:16:17 -0500 Received: from [178.191.143.215] ([178.191.143.215]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M86jp-1YBqW40BuL-00vkBI; Mon, 17 Nov 2014 11:16:13 +0100 Message-ID: <5469CAEA.4030601@gmx.at> Date: Mon, 17 Nov 2014 11:16:10 +0100 From: martin rudalics MIME-Version: 1.0 To: Alexander Shukaev Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows References: <5469BFF4.3050606@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Yo3PO3TRjyH5WxQPo8Rm8LDjGiV6HRYFLzbUi9xrEXBponn+J+d M+c1hKrxEie1Oh1fz50nmX/ElfnLpDztdBjPsYruQ6j3vumegn2aHXcTtxWRZxz9RUmI1Ub aRWMqDgLZgfPYk5b/LwcIc8RN4UvEr7q7Spkb+M5LjFXcA4zAHh1d/ml/z8XwkMivCeH+Xn 66Zh/Hz55VXpxJKGmjOnw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19075 Cc: 19075@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.0 (/) > It's the same problem. What does (with Emacs 25.0.50) (frame-parameter nil 'maximized) give with your initial screen, that is, before you do (toggle-frame-fullscreen)? > By the way, I forgot to mention that sometimes it > works and sometimes not, like if there was some concurrency issue. I think so too. You should be able to verify that by putting (toggle-frame-maximized) (sit-for 0) (toggle-frame-fullscreen) into your .emacs. > But in > the most cases it does not work. It works here on Windows XP with Emacs 25.0.50. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 17 11:03:48 2014 Received: (at 19075) by debbugs.gnu.org; 17 Nov 2014 16:03:48 +0000 Received: from localhost ([127.0.0.1]:36466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqOmK-00006I-0q for submit@debbugs.gnu.org; Mon, 17 Nov 2014 11:03:48 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:45158) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqOmF-00005r-4Q for 19075@debbugs.gnu.org; Mon, 17 Nov 2014 11:03:47 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NF600200XK08I00@a-mtaout23.012.net.il> for 19075@debbugs.gnu.org; Mon, 17 Nov 2014 18:03:41 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NF6002BAXXV3180@a-mtaout23.012.net.il>; Mon, 17 Nov 2014 18:03:31 +0200 (IST) Date: Mon, 17 Nov 2014 18:03:22 +0200 From: Eli Zaretskii Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows In-reply-to: <5469CAEA.4030601@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <8361edddbp.fsf@gnu.org> References: <5469BFF4.3050606@gmx.at> <5469CAEA.4030601@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19075 Cc: haroogan@gmail.com, 19075@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 (+) > Date: Mon, 17 Nov 2014 11:16:10 +0100 > From: martin rudalics > Cc: 19075@debbugs.gnu.org > > > By the way, I forgot to mention that sometimes it > > works and sometimes not, like if there was some concurrency issue. > > I think so too. You should be able to verify that by putting > > (toggle-frame-maximized) > (sit-for 0) > (toggle-frame-fullscreen) > > into your .emacs. The concurrency issue is fundamental, since the Windows messages are handled in a separate thread, and a command sent to a frame is not executed immediately. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 13 13:25:51 2015 Received: (at 19075) by debbugs.gnu.org; 13 Feb 2015 18:25:52 +0000 Received: from localhost ([127.0.0.1]:42135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMKw3-00007Z-DX for submit@debbugs.gnu.org; Fri, 13 Feb 2015 13:25:51 -0500 Received: from mout.gmx.net ([212.227.17.20]:59781) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMKw2-00007L-23 for 19075@debbugs.gnu.org; Fri, 13 Feb 2015 13:25:50 -0500 Received: from [88.117.117.6] ([88.117.117.6]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M0hT0-1XRm2I0b0w-00us9N; Fri, 13 Feb 2015 19:25:44 +0100 Message-ID: <54DE419F.60806@gmx.at> Date: Fri, 13 Feb 2015 19:25:35 +0100 From: martin rudalics MIME-Version: 1.0 To: Alexander Shukaev , 19075@debbugs.gnu.org Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rMVltM9knBjf/FCtNK4+ihlesdL4poUUwIARzTCP0vmKCzUFiOF 8RcXrPazFthlWkGry/NDZcnHyZUgTjbiYHqmbZJH4aFoQ6+YPQMgBGrEO8kXNpCV04FBz76 AUdgZ8poNxgtE4tdCRiuiHmqmZqOYtZQYemn4M/WKhXTIe/XyfWOXZcEvlWVZOlhPXtPHSW e1/+qRrUwne4ZwX3R26dg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19075 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.0 (/) > `init.el': > > (add-hook 'window-setup-hook 'toggle-frame-maximized t) > (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) Actually, this could never have worked. Emacs internally sets up a list of parameters to be used for the initial frame and the second form just annihilates any effect of the first. > does not work as expected. Emacs goes fullscreen indeed. However, running > manually `(toggle-frame-fullscreen)' once again after Emacs loaded, does > not bring Emacs into maximized state, it rather returns to a small initial > frame (of the default size, `emacs -q' to remind yourself how it looks > like). In fact. Emacs never went to the maximized state so it can't return to it. > Changing `init.el' to: > > (add-to-list 'default-frame-alist '(fullscreen . maximized)) > (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) > > does not help either. The effect is the same as above. > One could think that somehow `maximized' parameter is not set, but if one > has in `init.el' only: > > (add-to-list 'default-frame-alist '(fullscreen . maximized)) > > or > > (add-hook 'window-setup-hook 'toggle-frame-maximized t) > > then Emacs is loaded into maximized state indeed (*). Because there's no fullscreen request that overrides it. > On the other hand in `emacs -q', if one runs > > (toggle-frame-maximized) > (toggle-frame-fullscreen) > > manually, and then runs `(toggle-frame-fullscreen)' manually once again, > then Emacs is brought to maximized state. Indeed. These are two commands processed separately. > All this makes me think that there is some problem with memorizing > `maximized' parameter during `window-setup-hook', but note that this > actually contradicts (*) what makes this problem even more confusing. I've now implemented a couple of changes on trunk which allow to memorize that parameter, which I renamed to `fullscreen-restore'. In particular, using an equivalent of the following form in your init file should accomplish what you want. (setq initial-frame-alist '((fullscreen . fullboth) (fullscreen-restore . maximized))) Using `toggle-frame-fullscreen' and `toggle-frame-fullscreen' in the initial file is confusing. These specify transitions rather than states and an initial file should rather specify the desired initial state of a frame. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 27 11:24:39 2015 Received: (at 19075) by debbugs.gnu.org; 27 Jun 2015 15:24:39 +0000 Received: from localhost ([127.0.0.1]:59296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8ryA-0007NY-8W for submit@debbugs.gnu.org; Sat, 27 Jun 2015 11:24:39 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:33698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8ry6-0007NJ-OL for 19075@debbugs.gnu.org; Sat, 27 Jun 2015 11:24:35 -0400 Received: by laar3 with SMTP id r3so22564337laa.0 for <19075@debbugs.gnu.org>; Sat, 27 Jun 2015 08:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pMh7N0iYREAhO3Nbg9x58UngsrtfdnBuk6XFxYGAHig=; b=iG7IE7MHfi9uapXSd+UIZ6FhfhDSjH2G4wnpq3BNtahC49e5X8MM2n3z7Mw4IGFXm5 uowEKLa64AJ5xCkz5DN5LhDNAvud2uYwOd26/ag5eo0aBE5Dh5bIRFaV0oZ5+VFLel5k pqce88u0OO2hGV050vkhqEM/B8NUI/HpZocCw5jnN6gfLN4ytxjnFU39miLWJBuZYe8G jo1NACPuw5MVQOjag7HJ0Vec+n+jqMm9MVumfa88+DHaGq2AvfvRQO8tPCP4JRMP8PDM wEqrpXC6CVhPuj1ZONSgp9CA93NAYdL0Sxg83v8gJhR3nFgRSILKSihYY6H/0Tek0GXI 3jJw== MIME-Version: 1.0 X-Received: by 10.152.164.193 with SMTP id ys1mr6343915lab.65.1435418668706; Sat, 27 Jun 2015 08:24:28 -0700 (PDT) Received: by 10.112.36.103 with HTTP; Sat, 27 Jun 2015 08:24:28 -0700 (PDT) In-Reply-To: <54DE419F.60806@gmx.at> References: <54DE419F.60806@gmx.at> Date: Sat, 27 Jun 2015 17:24:28 +0200 Message-ID: Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows From: Alexander Shukaev To: martin rudalics Content-Type: multipart/alternative; boundary=001a1133c258da314f05198173b2 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19075 Cc: 19075@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 (/) --001a1133c258da314f05198173b2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 13, 2015 at 8:25 PM, martin rudalics wrote: > `init.el': >> >> (add-hook 'window-setup-hook 'toggle-frame-maximized t) >> (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) >> > > Actually, this could never have worked. Emacs internally sets up a list > of parameters to be used for the initial frame and the second form just > annihilates any effect of the first. > > does not work as expected. Emacs goes fullscreen indeed. However, runnin= g >> manually `(toggle-frame-fullscreen)' once again after Emacs loaded, does >> not bring Emacs into maximized state, it rather returns to a small initi= al >> frame (of the default size, `emacs -q' to remind yourself how it looks >> like). >> > > In fact. Emacs never went to the maximized state so it can't return to > it. > > Changing `init.el' to: >> >> (add-to-list 'default-frame-alist '(fullscreen . maximized)) >> (add-hook 'window-setup-hook 'toggle-frame-fullscreen t) >> >> does not help either. >> > > The effect is the same as above. > > One could think that somehow `maximized' parameter is not set, but if on= e >> has in `init.el' only: >> >> (add-to-list 'default-frame-alist '(fullscreen . maximized)) >> >> or >> >> (add-hook 'window-setup-hook 'toggle-frame-maximized t) >> >> then Emacs is loaded into maximized state indeed (*). >> > > Because there's no fullscreen request that overrides it. > > On the other hand in `emacs -q', if one runs >> >> (toggle-frame-maximized) >> (toggle-frame-fullscreen) >> >> manually, and then runs `(toggle-frame-fullscreen)' manually once again, >> then Emacs is brought to maximized state. >> > > Indeed. These are two commands processed separately. > > All this makes me think that there is some problem with memorizing >> `maximized' parameter during `window-setup-hook', but note that this >> actually contradicts (*) what makes this problem even more confusing. >> > > I've now implemented a couple of changes on trunk which allow to > memorize that parameter, which I renamed to `fullscreen-restore'. In > particular, using an equivalent of the following form in your init file > should accomplish what you want. > > (setq initial-frame-alist > '((fullscreen . fullboth) (fullscreen-restore . maximized))) > > Using `toggle-frame-fullscreen' and `toggle-frame-fullscreen' in the > initial file is confusing. These specify transitions rather than states > and an initial file should rather specify the desired initial state of a > frame. > > martin > =E2=80=8BAmazing. Thanks, Martin! This one can be definitely closed.=E2= =80=8B --001a1133c258da314f05198173b2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Feb 13, 2015 at 8:2= 5 PM, martin rudalics <rudalic= s@gmx.at> wrote:=
`init.el':

(add-hook 'window-setup-hook 'toggle-frame-maximized t)
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)

Actually, this could never have worked.=C2=A0 Emacs internally sets up a li= st
of parameters to be used for the initial frame and the second form just
annihilates any effect of the first.

does not work as expected. Emacs goes fullscreen indeed. However, running manually `(toggle-frame-fullscreen)' once again after Emacs loaded, doe= s
not bring Emacs into maximized state, it rather returns to a small initial<= br> frame (of the default size, `emacs -q' to remind yourself how it looks<= br> like).

In fact.=C2=A0 Emacs never went to the maximized state so it can't retu= rn to
it.

Changing `init.el' to:

(add-to-list 'default-frame-alist '(fullscreen . maximized))
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)

does not help either.

The effect is the same as above.

One could think that somehow `maximized' parameter is not set, but if o= ne
has in `init.el' only:

(add-to-list 'default-frame-alist '(fullscreen . maximized))

or

(add-hook 'window-setup-hook 'toggle-frame-maximized t)

then Emacs is loaded into maximized state indeed (*).

Because there's no fullscreen request that overrides it.

On the other hand in `emacs -q', if one runs

(toggle-frame-maximized)
(toggle-frame-fullscreen)

manually, and then runs `(toggle-frame-fullscreen)' manually once again= ,
then Emacs is brought to maximized state.

Indeed.=C2=A0 These are two commands processed separately.=

All this makes me think that there is some problem with memorizing
`maximized' parameter during `window-setup-hook', but note that thi= s
actually contradicts (*) what makes this problem even more confusing.

I've now implemented a couple of changes on trunk which allow to
memorize that parameter, which I renamed to `fullscreen-restore'.=C2=A0= In
particular, using an equivalent of the following form in your init file
should accomplish what you want.

(setq initial-frame-alist
=C2=A0 =C2=A0 =C2=A0 '((fullscreen . fullboth) (fullscreen-restore . ma= ximized)))

Using `toggle-frame-fullscreen' and `toggle-frame-fullscreen' in th= e
initial file is confusing.=C2=A0 These specify transitions rather than stat= es
and an initial file should rather specify the desired initial state of a frame.

martin

=E2=80=8BAmazing.= =C2=A0 Thanks, Martin!=C2=A0 This one can be definitely closed.=E2=80=8B
--001a1133c258da314f05198173b2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 29 05:45:19 2015 Received: (at 19075-done) by debbugs.gnu.org; 29 Jun 2015 09:45:19 +0000 Received: from localhost ([127.0.0.1]:60907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9Vcs-0007HH-TB for submit@debbugs.gnu.org; Mon, 29 Jun 2015 05:45:19 -0400 Received: from mout.gmx.net ([212.227.17.20]:53679) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9Vcq-0007H1-9F for 19075-done@debbugs.gnu.org; Mon, 29 Jun 2015 05:45:16 -0400 Received: from [62.47.250.71] ([62.47.250.71]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M8JyQ-1YoFNs0Oxe-00vxhb; Mon, 29 Jun 2015 11:45:10 +0200 Message-ID: <559113A4.4040507@gmx.at> Date: Mon, 29 Jun 2015 11:45:08 +0200 From: martin rudalics MIME-Version: 1.0 To: Alexander Shukaev Subject: Re: bug#19075: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows References: <54DE419F.60806@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:U7SOFKs0ZZBgKjhq5cakE7DyYzMOOvJDdhtUcdVHCQZxMoyXwgs N01yge4CILTiLbtSTtEeFwu2TxMlpT5SPLxiyqM0zf1RUWni4QIW9TFz8nHFc1OdXI3qY2u w0h7PNB0MDlGnzoyg2y7xHzvr7enRLL0gtq8orMB9+PG9caGKYHV0Cxjzm6VEs1PSsHl7x5 Kpxeu78DjM/qqTPZg4+bA== X-UI-Out-Filterresults: notjunk:1;V01:K0:qKq/z4w/pAE=:9xzdXjGVgvn3k8GS/ysnME MbwCuIOK5dxF2jXu4tj8y4V8WvPX1+7FdM2Rmzim9Y9dZqiO1/76R4n7f3xyeQTPkmXJzbZtG kcEQ2LVNk6bnHyquzanUd+ONS9sKomwLDpJUUlxP4T2ft5/rls/7wstSnl3aXmHG/qQiBQBc+ ILaQoiilyHFAOJ1hmGFc1FtpdsacOgRwzQ9xuMMABNpO+xIrnCbXO4lqomo///0+LlUNXtA/n LxHnjfiC+h0HZOOJT1INKR2M3teqCSlxM1BI+x1zI5PA8TFVCaEUbVPwx0HKU2UsiNYRLCTDr Wh3hnlrcnQtHZVSSUfApQ1zaddGhB3XDJgDz5gxw2ZhLtRVkCzHn3HoS8s00u3S4JkMwWxlOX fdiDGCAFZCw2lgklr/zy9v+ek4juoPnXgxXy6xIjMWw0mA0iIRlBYNeiED+M+O/HxLJlCgmnh 43kuXRQ/dPCtaD9z/mz09W0qXhCUgDdpO5dbJ1HIhMPz7EIMwN9/NUEZPOzJGQ4LnLJYDi9ZV d4nWcaGhgqt2qCERPz2E9efu65yrlvETlfpWT0Qv8W/1nNLfSoEQI4VDTkY5mD+PE/ibt1ai6 760+Jg5yyMeXFVkWDswk1mWnQ41SI7TV7e5VucorH9h7AcnswAeZT8kpekKdTqbysOduelmLI xvqtczesYESXzc2CTgWhDNuKWuSaboEnXGzyNzgcfoF46SPIV/u8gEn4AkGI26eBxrzw= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19075-done Cc: 19075-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.0 (/) > =E2=80=8BThis one can be definitely closed.=E2=80=8B Done. martin From unknown Sun Aug 17 22:12:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 27 Jul 2015 11:24:04 +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