From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#25542: 25.1; Restoring the frame from fullscreen to maximized Date: Fri, 27 Jan 2017 13:50:38 -0500 Message-ID: References: <5889C6B4.8060506@gmx.at> <588A0102.7010704@gmx.at> <588B108E.9070501@gmx.at> <588B1437.9010303@gmx.at> <588B4F7C.40909@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113db4b229c662054717f115 X-Trace: blaine.gmane.org 1485543078 21265 195.159.176.226 (27 Jan 2017 18:51:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2017 18:51:18 +0000 (UTC) Cc: 25542@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 27 19:51:13 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 1cXBc3-0004dq-Jo for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 19:51:07 +0100 Original-Received: from localhost ([::1]:47400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXBc8-0006w3-U7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 13:51:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXBc2-0006vv-Sf for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 13:51:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXBby-00023W-5F for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 13:51:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXBby-00023S-1y for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 13:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cXBbx-0005po-RD for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 13:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2017 18:51:01 +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.148554304722408 (code B ref 25542); Fri, 27 Jan 2017 18:51:01 +0000 Original-Received: (at 25542) by debbugs.gnu.org; 27 Jan 2017 18:50:47 +0000 Original-Received: from localhost ([127.0.0.1]:48557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXBbi-0005pM-Tv for submit@debbugs.gnu.org; Fri, 27 Jan 2017 13:50:47 -0500 Original-Received: from mail-ot0-f194.google.com ([74.125.82.194]:35618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXBbh-0005pA-2r for 25542@debbugs.gnu.org; Fri, 27 Jan 2017 13:50:45 -0500 Original-Received: by mail-ot0-f194.google.com with SMTP id 65so31897619otq.2 for <25542@debbugs.gnu.org>; Fri, 27 Jan 2017 10:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+F7vGHoT+dGu0TL8v6fjciAf8LsvP5tTa8NYPbglsTo=; b=B6TCf6c/a+kBg9Eu6VIcSj/c4eGEzPR2t2U7dd6kjKkTt3ird39lNH/XNJFVQ3puxu Ds3eNlSxtwZXVl5NoKCs4kfYfDaCBqN56V7iR/s1SosMwjCICtWX+8QgVoNTdtoNSHoK B26MzSmO48V2UmTh/q8Cpj25rf5D3bBpJZ2WJhoGkLb8r18BKnh2C9pBw1sYo/VtY3lb Swrs73pSzqSi0M0xGOEq43qWtcrHOpffCEFuTHbmNvk9UIsuRMI9HwkZijRvQB6EFNvO clGMRKmYdaX7mDa8a3a6PS3SUl/xzwdZIIgD/L8U5O5ANnhGjLC/5UYxUa2hs4FTu6w3 xfFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+F7vGHoT+dGu0TL8v6fjciAf8LsvP5tTa8NYPbglsTo=; b=JcTejIstrspViqS6AqjXP21hYppdKlL1gt0l1s1EPAPURy05TL5hRyOoOoKVRGE2Dx FDHxpbyHvwZGOaiOJ42eFsksuwJzX6TotRs3D/tsEqapbUgshZJnLGlEKjvfkkd5LQJ7 lpvUcuXDWcaLbFdrYGNtfUM9PUdO52SaZ/tF11PUX06iPrpuY9mcg+Fa2eTKvrR8FPVr JalY/2FcM8Poj3cugpQq8Iwqvcd4eRRmi24wnwcC/4I2rQZas96xKRoLKMFc7d4pjGI7 LncJ+RiQvrHq3YMIRZeNrr8t4iHpzJPopHQLnO5qvq46X85oWJiwbc3mlXumI2K0yNOn 5fIg== X-Gm-Message-State: AIkVDXJPTGIirnlpdM+5fB8ZQCdU9KUIc/ZlUDqnJbYxUqdprTYUHBGhzVt+Okw2MTFFyZPzYvI4CTDlcGuhfQ== X-Received: by 10.157.37.209 with SMTP id q75mr5067964ota.267.1485543039407; Fri, 27 Jan 2017 10:50:39 -0800 (PST) Original-Received: by 10.157.21.117 with HTTP; Fri, 27 Jan 2017 10:50:38 -0800 (PST) In-Reply-To: <588B4F7C.40909@gmx.at> X-Google-Sender-Auth: TxYxVMs2edza0l2NRMDLPnBK5Go 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:128694 Archived-At: --001a113db4b229c662054717f115 Content-Type: text/plain; charset=UTF-8 On Fri, Jan 27, 2017 at 8:47 AM, martin rudalics wrote: > 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.) 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). --001a113db4b229c662054717f115 Content-Type: text/plain; charset=US-ASCII; name="w32term.c.msg.diff" Content-Disposition: attachment; filename="w32term.c.msg.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iyg5mnpv0 ZGlmZiAtLWdpdCBpL3NyYy93MzJ0ZXJtLmMgdy9zcmMvdzMydGVybS5jCmluZGV4IGQ2Yjc4ZmQu Ljk2MjcwMTkgMTAwNjQ0Ci0tLSBpL3NyYy93MzJ0ZXJtLmMKKysrIHcvc3JjL3czMnRlcm0uYwpA QCAtNTExMCwxMiArNTExMCwxOCBAQCB3MzJfcmVhZF9zb2NrZXQgKHN0cnVjdCB0ZXJtaW5hbCAq dGVybWluYWwsCiAJCSAgICAgc2ltcGxlIGhhY2sgdG8gY2hlY2sgdGhhdCBiYXNlZCBvbiB0aGUg ZmFjdCB0aGF0CiAJCSAgICAgb25seSBhIG1heGltaXplZCBmdWxsc2NyZWVuIGZyYW1lIHNob3Vs ZCBoYXZlIGJvdGgKIAkJICAgICB0b3AvbGVmdCBvdXRzaWRlIHRoZSBzY3JlZW4uICAqLworICAg ICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgQVVUT19TVFJJTkcgKGZv cm1hdCwgIlNJWkVfTUFYSU1JWkVELCBmdWxsc2NyZWVuID0gJXMiKTsKKyAgICAgICAgICAgICAg ICAgICAgICBDQUxMTiAoRm1lc3NhZ2UsIGZvcm1hdCwgU1lNQk9MX05BTUUgKGZ1bGxzY3JlZW4p KTsKKyAgICAgICAgICAgICAgICAgICAgfQogCQkgIGlmIChFUSAoZnVsbHNjcmVlbiwgUWZ1bGx3 aWR0aCkgfHwgRVEgKGZ1bGxzY3JlZW4sIFFmdWxsaGVpZ2h0KQogCQkgICAgICB8fCBOSUxQIChm dWxsc2NyZWVuKSkKIAkJICAgICAgewogCQkJaW50IHgsIHk7CiAKIAkJCXhfcmVhbF9wb3NpdGlv bnMgKGYsICZ4LCAmeSk7CisgICAgICAgICAgICAgICAgICAgICAgICBBVVRPX1NUUklORyAoZm9y bWF0LCAiU0laRV9NQVhJTUlaRUQsIHggPSAlZCwgeSA9ICVkIik7CisgICAgICAgICAgICAgICAg ICAgICAgICBDQUxMTiAoRm1lc3NhZ2UsIGZvcm1hdCwgbWFrZV9udW1iZXIgKHgpLCBtYWtlX251 bWJlciAoeSkpOwogCQkJaWYgKHggPCAwICYmIHkgPCAwKQogCQkJICBzdG9yZV9mcmFtZV9wYXJh bSAoZiwgUWZ1bGxzY3JlZW4sIFFtYXhpbWl6ZWQpOwogCQkgICAgICB9Cg== --001a113db4b229c662054717f115--