From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#34680: Display monitor frames not warmed up Date: Tue, 05 Mar 2019 23:28:00 +0200 Organization: LINKOV.NET Message-ID: <87r2bl5c37.fsf@mail.linkov.net> References: <875zt5ueue.fsf@mail.linkov.net> <87y35zfwni.fsf@mail.linkov.net> <871s3mtkrg.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175971"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 34680@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 05 23:15:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1ILC-000jZM-JW for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Mar 2019 23:15:15 +0100 Original-Received: from localhost ([127.0.0.1]:49939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1ILB-0007s7-Dt for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Mar 2019 17:15:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1IL4-0007rq-W3 for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:15:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1IL1-0007PW-Hv for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:15:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1IL0-0007P6-5X for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1IKz-0003Ni-U3 for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Mar 2019 22:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34680 X-GNU-PR-Package: emacs Original-Received: via spool by 34680-submit@debbugs.gnu.org id=B34680.155182409412972 (code B ref 34680); Tue, 05 Mar 2019 22:15:01 +0000 Original-Received: (at 34680) by debbugs.gnu.org; 5 Mar 2019 22:14:54 +0000 Original-Received: from localhost ([127.0.0.1]:33553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1IKs-0003N8-07 for submit@debbugs.gnu.org; Tue, 05 Mar 2019 17:14:54 -0500 Original-Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:31347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1IKq-0003Mz-8o for 34680@debbugs.gnu.org; Tue, 05 Mar 2019 17:14:53 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CECE5284B73 for <34680@debbugs.gnu.org>; Tue, 5 Mar 2019 22:14:50 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a46.g.dreamhost.com (unknown [100.96.26.217]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7CC3D284B6D for <34680@debbugs.gnu.org>; Tue, 5 Mar 2019 22:14:50 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a46.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.3); Tue, 05 Mar 2019 22:14:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Fearful-Invention: 625f04a5101e15ce_1551824090661_2199242855 X-MC-Loop-Signature: 1551824090660:1765637021 X-MC-Ingress-Time: 1551824090660 Original-Received: from pdx1-sub0-mail-a46.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTP id 171698027E for <34680@debbugs.gnu.org>; Tue, 5 Mar 2019 14:14:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=JsfLoJ Ja54UpiDmWKBeYvECCZ+w=; b=TvhHxfaAsNSRXEu5tjxBrNk8SKzy3AXrasWZjR ZfZU2p1a8oDyFOhW+QXAf1X6t3dqxhiGyCuXu2As3F6iIUL1WskWG8o0R0YcZGFr LyyVatAmK1hFKaje4G5yCv26W4zJAznmO7LmDAFZ/r1t14rR4Zf91Xigm1j+bacD dLOo8= Original-Received: from mail.jurta.org (m91-129-98-103.cust.tele2.ee [91.129.98.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTPSA id 40E1E80270 for <34680@debbugs.gnu.org>; Tue, 5 Mar 2019 14:14:47 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a46 In-Reply-To: <871s3mtkrg.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 04 Mar 2019 23:03:31 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrfeefgdduiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucffohhmrghinhepghhnuhdrohhrghenucfkphepledurdduvdelrdelkedruddtfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdelkedruddtfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopeefgeeikedtseguvggssghughhsrdhgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd 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: 209.51.188.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:156075 Archived-At: >>> I guess calling the function =E2=80=98message=E2=80=99 before calling >>> =E2=80=98display-monitor-attributes-list=E2=80=99 performs some redis= play that adds >>> the frame to the list of frames in =E2=80=98display-monitor-attribute= s-list=E2=80=99. >> >> It also fixes the issue when using any of the following >> =E2=80=98redisplay=E2=80=99, =E2=80=98redraw-display=E2=80=99, =E2=80=98= redraw-frame=E2=80=99, or just >> =E2=80=98display-monitor-attributes-list=E2=80=99 before calling >> =E2=80=98frame-monitor-attributes=E2=80=99 for the first time. >> >> Just calling =E2=80=98display-monitor-attributes-list=E2=80=99 somehow= =E2=80=9Cregisters=E2=80=9D the >> frame in the list of frames, so the next call of =E2=80=98display-moni= tor-attributes-list=E2=80=99 >> returns the attribute =E2=80=98frames=E2=80=99 containing the frame. > > I can't explain this, but this is the minimal patch that fixes my > problem. This dry run by calling gdk_display_get_monitor_at_window > ignores its first wrong return value, so its subsequent calls return > correct values. I discovered this is a known problem yet unfixed for many years: https://debbugs.gnu.org/19706 25.0.50; (+ nil nil -1) in desktop-restore-frameset with references from http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00131.html http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00474.html Although the original bug report was for macOS, the same bug I see is for GDK on GNU/Linux. At least, I found a fix for GDK that populates the 'frames' attribute. But if on macOS display-monitor-attributes-list returns no 'frames' attribute, this feature is unavailable on macOS.