From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#25542: 25.1; Restoring the frame from fullscreen to maximized Date: Fri, 27 Jan 2017 14:47:40 +0100 Message-ID: <588B4F7C.40909@gmx.at> References: <5889C6B4.8060506@gmx.at> <588A0102.7010704@gmx.at> <588B108E.9070501@gmx.at> <588B1437.9010303@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1485528162 16693 195.159.176.226 (27 Jan 2017 14:42:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2017 14:42:42 +0000 (UTC) Cc: 25542@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 27 15:42:32 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX7jA-00027l-IE for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 15:42:12 +0100 Original-Received: from localhost ([::1]:45788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX7jF-0000UL-NX for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 09:42:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX6so-0006w4-Jc for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 08:48:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cX6sk-0005Pd-Ok for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 08:48:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cX6sk-0005PN-L8 for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 08:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cX6sk-00075p-8U for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 08:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2017 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25542 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25542-submit@debbugs.gnu.org id=B25542.148552487227247 (code B ref 25542); Fri, 27 Jan 2017 13:48:02 +0000 Original-Received: (at 25542) by debbugs.gnu.org; 27 Jan 2017 13:47:52 +0000 Original-Received: from localhost ([127.0.0.1]:47138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX6sa-00075P-DP for submit@debbugs.gnu.org; Fri, 27 Jan 2017 08:47:52 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:61116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX6sY-000758-6w for 25542@debbugs.gnu.org; Fri, 27 Jan 2017 08:47:50 -0500 Original-Received: from [192.168.1.100] ([213.162.68.23]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfVU3-1cq1Ia1cNv-00P9dE; Fri, 27 Jan 2017 14:47:43 +0100 In-Reply-To: X-Provags-ID: V03:K0:PjTIlJb02N9GN65MkRGHx+zMv9js71VHM3L18O9tr4qwxFapCZ5 unlXzpF20Nhc3y9jW2TrPmh5o6OUN1viF70yUE0tC2tGjFXyVJwzgXezHKE88iEein51NOE wjdgv+OkV5qcFQNVqkAZb+IXJN9DXkacR918Gq35TfUFN8eLA/B21/ou2VjQAKYT4QrmvuQ NWWVsL1vFuhObBHsCmKQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2zfC/L8X2JE=:xw1mxZzvcvOIPhPbsQEhIJ LJ6vj6QpLq/wHz2Ydr7/nKhHyB/b2roxJCzYQnOXnbKgAImIEtZTIl4L92UV3Hmcy66AYjqTZ lQiha65t0HUUEXTqYWJJ9Le/QeQoPMWl375IGjXQMbLSEFyKR7d+izQlMpYj7CZw08jImouas qiXVtjFpPqWM3kewTLrfeHEEdYj4TO38z/kkO+rEXsrt2hlUTIfgdegfXC26OKoG+uk24eBae xUXsXaVtkI50mdDlznxcMfaCE9/1RluAYFluK7lc6/YEFVe5UipPD1XOmn019SzDwof/iS40w bbnjYsRkOojmEIlFCKZlv8quEMAwL2svssS/XOfnjsvJVINyDt2ssYk6J3vThgp5J2DKtsEme Wo7jkAvnbCmm/go79Vl4aQKhcaKOg9FI1GAyAOdRDUh/gAnwY55lUD2S0Xc0K9M1O1KmpAzoH DIFxEBQRbPe4S/1mvMng8h8BeZEwgS7nAEzI1tIHnD3SwDmJZ5lvEBXVyCEJA2Xii6drhRocw vNYauT6eCZfq56s83lQdE7m68RlpQ8tHOJlIx5Kevszn8ZKDCR36X+2dw/VCnP8hrMGTHMDra IP2OcS68CUEiha/lbdkiRVcuql7uW2vqJUi5Dz3bNqFSQEVeaQ6qEObbDK//DShyLgEwyhFk2 k5cimAH6M0Cld5vchA3E9Y8F4XhHzkt8kIIBkxKFGa8HHFixpjaFpDF/UigWTQeYUHEsqTA2X zzZIjuYjzSWBBt31uR7iouoqKOQqhjhwbKsnzLgqYqwwiKK9H7kcToB8fbybCSeffHK9ufgL X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128681 Archived-At: > ** 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 # 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