From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: jiegec Newsgroups: gmane.emacs.bugs Subject: bug#29953: 26.0.90; Moving a child frame before making it visible makes the child frame not showing any more on macOS Date: Thu, 4 Jan 2018 16:38:18 +0800 Message-ID: <16484.345336403$1515055036@news.gmane.org> References: <5a4c1c86.0ac7df0a.a769a.93cbSMTPIN_ADDED_BROKEN@mx.google.com> <20180103140704.GA98841@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="3FE96389-E7D2-4755-B7CE-5FAF364F84B6"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: blaine.gmane.org 1515055036 1886 195.159.176.226 (4 Jan 2018 08:37:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 08:37:16 +0000 (UTC) Cc: 29953@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 09:37:12 2018 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 1eX11S-00006D-Vf for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 09:37:11 +0100 Original-Received: from localhost ([::1]:47875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX13S-0003TV-Cp for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 03:39:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX13K-0003TF-CJ for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 03:39:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eX13H-0002cS-4Y for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 03:39:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eX13G-0002bo-Le for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 03:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eX13G-0006B7-9P for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 03:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jiegec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jan 2018 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29953 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29953-submit@debbugs.gnu.org id=B29953.151505512623702 (code B ref 29953); Thu, 04 Jan 2018 08:39:02 +0000 Original-Received: (at 29953) by debbugs.gnu.org; 4 Jan 2018 08:38:46 +0000 Original-Received: from localhost ([127.0.0.1]:35039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX12z-0006AE-Eu for submit@debbugs.gnu.org; Thu, 04 Jan 2018 03:38:45 -0500 Original-Received: from smtpbg64.qq.com ([103.7.28.238]:23807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX12u-00069g-IH for 29953@debbugs.gnu.org; Thu, 04 Jan 2018 03:38:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1515055112; bh=dxZ1aLLl0wnricv9qDvgz0lP8t2HqjZodw9B+8P3Do8=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type; b=r8gl1aaFooTBsAW9uIiMYHTd6IYyVFLqpSb9uZ9u7RGROQlH7//Q+m3Pv7hxvSaGq pPqLtm1iQu55x323qZGsNye/hQJDviySkOD20lm4Z6W0fuN2ye5Eh3dr6yiR6YGm/G ZDksQtDEkw2n47n1Xb/+/FB84K8r6y30L3eEnqyA= X-QQ-mid: esmtp15t1515055109t1pr3p2i1 Original-Received: from localhost.mail (unknown [183.172.81.157]) by esmtp5.qq.com (ESMTP) with id ; Thu, 04 Jan 2018 16:38:25 +0800 (CST) X-QQ-SSF: 00000000000000F0F21000000000000 X-QQ-FEAT: +IkrLX7ElIIcMo18QCfbdZUQo6SLGyXxeF8k7azNdB1ZEksNzW5yihLTZJmy9 EpMNHJtF4qBkyyMccsW/yevAlUk3mUwBGzC48v1S54OwwrQY5iQdvxGUQHJTboFTDdk45zT Ov9voqAKEsbRR2zcTa8MWtM17Rt72jj/0GLFry9j2KY47MKvMoPIH9eAt/fFxjjKFnlD39Y 6DyBfsh61GrOHxjILst6RQb2UFaSElePvDaL2sO6e4lwajiAQJ2xC+OiuhjB9+Ca26f+BRN CtLanSynL39LbGVDaCqedvHUQ4g/VVQ7yFV+HDiwHH+88o X-QQ-GoodBg: 0 In-Reply-To: <20180103140704.GA98841@breton.holly.idiocy.org> X-Mailer: Airmail (467) X-QQ-SENDSIZE: 520 Feedback-ID: esmtp:qq.com:bgweb:bgweb117 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:141768 Archived-At: --3FE96389-E7D2-4755-B7CE-5FAF364F84B6 Content-Type: multipart/alternative; boundary="5a4de7fb_22dcd01_19fd" --5a4de7fb_22dcd01_19fd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =E5=BC=80 3 January 2018 =E5=9C=A8 10:07:12 PM, Alan Third (alan=40idiocy= .org) =E5=86=99=E5=88=B0: On Wed, Jan 03, 2018 at 07:55:12AM +0800, Jiege Chen wrote:=C2=A0 >=C2=A0 > Snippet:=C2=A0 >=C2=A0 > This code uses =60oddp', which might not be available from =60emacs -Q'= .=C2=A0 You can replace it with (=3D 1 (mod count 2))=C2=A0 Yup, that=E2=80=99s right. > On my macOS Sierra, the frame only shows once and never shows again.=C2= =A0 There were two issues interacting here: invisible child frames lose=C2=A0= track of their parents in NS, and frames that are off=E2=80=90screen don=E2= =80=99t=C2=A0 have an associated screen but our positioning code will only position=C2=A0= a frame if it knows it=E2=80=99s screen.=C2=A0 I=E2=80=99ve fixed the first issue so that we look up the parent through = the=C2=A0 Emacs frame structs, and the second by positioning according to the=C2=A0= main screen if the frame doesn=E2=80=99t have a screen.=C2=A0 I also fixed what I think is a bug when child frames are positioned=C2=A0= with negative values. On X it looks as though a negative value always=C2=A0= results in positioning according to the bottom=E2=80=90right of the paren= t=C2=A0 frame, but on NS it would be positioned to the left and above the=C2=A0 parent frame. NS now behaves like X.=C2=A0 Patch attached.=C2=A0 I have tested it locally, and it fixes the problem for me. Both the snipp= et and lsp-ui work well now. > Related issue: https://github.com/emacs-lsp/lsp-ui/issues/21 .=C2=A0 Are you using threads=3F GUI calls and threads don=E2=80=99t mix well yet= ,=C2=A0 unfortunately.=C2=A0 --=C2=A0 Alan Third=C2=A0 Best regards, Jiajie Chen --5a4de7fb_22dcd01_19fd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline