From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65840: 29.1; desktop-load moves frames to the right and down Date: Sat, 09 Sep 2023 21:35:01 +0800 Message-ID: <871qf7cvwa.fsf@yahoo.com> References: <83v8cjtscl.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38487"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65840@debbugs.gnu.org, tanzer@gg32.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 15:36:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qey8L-0009qA-TZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 15:36:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qey80-0005xm-FO; Sat, 09 Sep 2023 09:36:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qey7z-0005xV-DO for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 09:35:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qey7z-0002Zd-5a for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 09:35:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qey81-00020r-W3 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Sep 2023 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65840 X-GNU-PR-Package: emacs Original-Received: via spool by 65840-submit@debbugs.gnu.org id=B65840.16942665277675 (code B ref 65840); Sat, 09 Sep 2023 13:36:01 +0000 Original-Received: (at 65840) by debbugs.gnu.org; 9 Sep 2023 13:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:46411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qey7T-0001zh-75 for submit@debbugs.gnu.org; Sat, 09 Sep 2023 09:35:27 -0400 Original-Received: from sonic301-31.consmr.mail.ne1.yahoo.com ([66.163.184.200]:37086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qey7R-0001zS-5x for 65840@debbugs.gnu.org; Sat, 09 Sep 2023 09:35:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1694266516; bh=FQ0SghirldZLocS3K3qenmk/4usl0sjFDpmaeWVKdLU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=P/xCYhYN1YKWykD2tADwGmIAocv8onFS26mPWH1+nM4yOYuwrISYn8qkZfzrpE0ahEYS+6+o0wsnxzVAOztW2VsZZR/qD+LdfRQvyIqjAbgEXVzN5NwRh5J+jLTcpecOVjcsTWc3j2QWEtf9OnUeOL1l49gIFkoCSG2kSlm+0IKNOJI5sKGDmNAjW4G5I54DHoqJXr6udUAhT/igypP6+vyXQPUykFvDE6f6YVOTTSrMy/PmQLNUETnC2NUrnPEfA7IALT2sqQv2TyF1br4XEFT8nNzWFka4MPniFCwmeXMgC7qLxbs3OLGvLo6fcJQQfWoCog91ppFG9wXplX4ayQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1694266516; bh=CL+ttrJkLPkplMyeCOPa3Ii25Fg36tiD2sHpWsQ/nAt=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=KFYoUaauCVMKgJwGrEJf11BLYIguaZwsmsERXrgxSmlBpFf7KM7wzrPiRioROfM1CMmGL9lPw4xd1mc7xjng3i2710myx/ZsxCY6Ma3lGXFLFUDb6uUP1e8MwD267/FZpcvLJ6ywi8yzzD6nHinpnC6c74XNwc8fDdejbXOZC0ffFzLnJ/iKpWrl+oLyrtcwFUDKbY7JIbN/9LoniZyKSv+rSrDW+onbCEh6C1/CqYmBDJRoGfMkmXoD7NpDLB9o1dmdh7LebnCnstylSyruXLq48imX53guXrow6EJ0NppZpcUy0ZoAkyKW3mfHDpfmmzQVbNgdkeDcFy+tT3g/rw== X-YMail-OSG: SWMUYbgVM1lVi5mszv8Iux0.Wsfpe9TACV0Rurhp8k2FkdjybkAaIBsvscvO1Vb 0SSWwfGb4gzYLsqOFT0uyasCTNNCDW4CArB0BwvjiIEUcVfFU91kKJykWDag0yJ1v2ONho.DSGEw 1NMTZNjN5cLZ71LZ0sHgeGwOI686aCzPzLU2ctHvIvB4QJs7sG60YVMF7EaOT4iGqIBnL.lyzV7z kTYXj_aW0yGOsmuOetI94KU8KysLAdL_Fwx9n.OFkWj7MJD5h80CzOltqvGD8fyejfthlxzylQBU bqG_Bop55lknm0jqeB2p27t3j335mg4NcHBJlS3yLSOlffzxAWW3GemjZtFZOVJKtS1lQ5JhkwOP iTjXqrUa23PcG_3paqLmb2LdiVI0saMGzoasBzGPsvrUMraUHqMi1H53T8deKIklkX6j35CgaoS0 v1XJ1AoLnDUJb0kd7wQDfwEKLnGfN6qdgctZpCWO54Iay6K.43bcFnPbq3hLJhKVWBDkkChr9KnY LWrjH38xFmRJat2Gy7A1HriFHpxkG8LIFD62FleYYN4wb6xpDTSSvzYGCx6_Y_ZWMig4tKr65J9y vCAEF8mK6uvwt463KJ6SIXJLDQLpJQN44wIRa_cr_q9MiaqbzXfAKwqK23zlEQsE23xcXNnYTj1P _dqhA_BeOT7NduAqexF8TZaVSSV3QWescSuf4rmofmxkQOTh58j5jL9tti8gbAGJf25_43PYmBEr 6J2IzFJriZpsyf_c2GQ8GtfDgq4yrSIpqvaIiQRp3mP3GU7c8OmIK3ftMoVIRat7s7rM2KNqULLN Kh8m0UUxRN8qUryjhyxl74xqGOXah5QsQSjuAOCXL9 X-Sonic-MF: X-Sonic-ID: 0a20b1c0-8865-44d8-a96d-38fe003a2d7a Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sat, 9 Sep 2023 13:35:16 +0000 Original-Received: by hermes--production-sg3-69654d8bd-sv8qw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4465a9d3294801944d9578a23917d80d; Sat, 09 Sep 2023 13:35:07 +0000 (UTC) In-Reply-To: <83v8cjtscl.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Sep 2023 15:59:38 +0300") X-Mailer: WebService/1.1.21763 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269862 Archived-At: Eli Zaretskii writes: > You are aware, I hope, that on X and similar GUI systems, the > coordinates of the frames we request from the window-manager are > advisory: the WM doesn't have to adhere to what we request. I'm not > sure what you see is not a manifestation of that. > > Po Lu, can you chime in, please? Thanks, but I'm not well versed in Mac OS window management. I would begin an investigation into this behavior by calling: (set-frame-position f 10 10) waiting for a MOVE_FRAME_EVENT to arrive: emacsframe->left_pos = (NSMinX (r) - NS_PARENT_WINDOW_LEFT_POS (emacsframe)); emacsframe->top_pos = (NS_PARENT_WINDOW_TOP_POS (emacsframe) - NSMaxY (r)); and attempting to establish which factors influence both the position set by ns_set_offset and that returned within the consequent MOVE_FRAME_EVENT. With that information at hand, it should become possible to then devise a method of compensating for such factors, so as to guarantee that the frame position through `set-frame-position' is reflected faithfully within the frame's `left' and `top' properties, insofar as the window manager elects to respect said position.