From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#14841: Frames created invisible have their visibility parameter set to t Date: Thu, 11 Jul 2013 17:14:19 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1373555963 25661 80.91.229.3 (11 Jul 2013 15:19:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Jul 2013 15:19:23 +0000 (UTC) To: 14841@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 11 17:19:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UxIbK-0008AB-90 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2013 17:16:10 +0200 Original-Received: from localhost ([::1]:45901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIbJ-0006cs-Q5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2013 11:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIbE-0006XX-FA for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2013 11:16:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxIbD-00060k-68 for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2013 11:16:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIbC-00060c-VC; Thu, 11 Jul 2013 11:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UxIbC-0000Nt-Em; Thu, 11 Jul 2013 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: eliz@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2013 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14841 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: eliz@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13735557171387 (code B ref -1); Thu, 11 Jul 2013 15:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jul 2013 15:15:17 +0000 Original-Received: from localhost ([127.0.0.1]:47997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxIaS-0000MI-8H for submit@debbugs.gnu.org; Thu, 11 Jul 2013 11:15:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37326) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxIaQ-0000Lx-Ms for submit@debbugs.gnu.org; Thu, 11 Jul 2013 11:15:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxIaK-0005ai-9m for submit@debbugs.gnu.org; Thu, 11 Jul 2013 11:15:09 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIaK-0005ad-71 for submit@debbugs.gnu.org; Thu, 11 Jul 2013 11:15:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIaI-0005wX-2b for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2013 11:15:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxIaD-0005MZ-Ty for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2013 11:15:06 -0400 Original-Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:41772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIaD-0005Il-OO for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2013 11:15:01 -0400 Original-Received: by mail-ea0-f176.google.com with SMTP id z15so5695175ead.7 for ; Thu, 11 Jul 2013 08:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=E/Y8OIQRfWDwU4TYBg1CRDqBB2RoLNiWovJGIWJ2XfU=; b=tkIahEQrHXrKwW0RtUmklyJG/WmQjPW7iumX8Vtb8LGgxqFrojyFVFZVfylomaudKd 2TjYClv0VvCToXLDOsQwzS2KmbTnOKpsKoT+ZGN+TRlOncWnGDDSW3OvDZuAkaC523/z ZrEL2ckHPu5sGmoXWSkJ4R+SLKQ1U0CZ1OxOQRLsjw4bfM2OfKxUUkgt+ppK7XtxO1pk mUUKUgTkM5JGoeqF4nPxgNllJuE7UeKojNH7frlrObZxLS47tmhLd0JGbko27KunMlUG RqgOlBWUCnRny1ejsFYFGCHtI+6v3cwRTmRk4f0FJQk1JZfxtDf+4CA0S/2v0WEQOtiC fCyA== X-Received: by 10.15.76.71 with SMTP id m47mr41696252eey.70.1373555700616; Thu, 11 Jul 2013 08:15:00 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Thu, 11 Jul 2013 08:14:19 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76218 Archived-At: Package: emacs Version: 20.7.3 X-Debbugs-CC: eliz@gnu.org This is a very old bug, I see the same behavior since 20.7.3 (the older binary I have) but it is likely there since the redisplay rewriting in 20.1. I don't know if this is Windows related. Could someone please test it in a POSIX build? Anyway, the bug: frames made invisible with set-frame-parameter, modify-frame-parameters or make-frame-invisible have their visibility parameter really set to nil. However, frames created already invisible with (make-frame '((visibility . nil)), which *are* invisible, have their visibility parameter set to t as soon as there's some redisplay. ELISP> (setq f1 (make-frame '((visibility)))) # ELISP> (frame-parameter f1 'visibility) t ELISP> (mapcar #'frame-visible-p (frame-list)) (t t) ELISP> (make-frame-invisible f1) nil ELISP> (frame-parameter f1 'visibility) nil ELISP> (mapcar #'frame-visible-p (frame-list)) (nil t) ELISP> (setq f2 (make-frame)) # ELISP> (set-frame-parameter f2 'visibility nil) nil ELISP> (frame-parameter f2 'visibility) nil ELISP> (mapcar #'frame-visible-p (frame-list)) (nil nil t) ELISP> (let ((f3 (make-frame '((visibility))))) (frame-parameter f3 'visibility)) nil ELISP> (mapcar #'frame-visible-p (frame-list)) (t nil nil t) This could be related to this comment in frame.h On ttys and on Windows NT/9X, to avoid wasting effort updating visible frames that are actually completely obscured by other windows on the display, we bend the meaning of visible slightly: if equal to 2, then the frame is obscured - we still consider it to be "visible" as seen from lisp, but we don't bother updating it. We must take care to garbage the frame when it ceases to be obscured though. See SET_FRAME_VISIBLE below. */ unsigned visible : 2; which would mean it is a Windows-specific display bug. This affects the frame-restore functionality I'm testing, because many frames are "restored" via (make-frame SOME-BIG-PARAMETER-LIST). I can work around the bug by treating visibility specially, of course, but still, it is a bug, because the affected frames are not "obscured", they are invisible.