From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Charles A. Roelli" Newsgroups: gmane.emacs.bugs Subject: bug#26816: mouse movement support for OS X Date: Thu, 11 May 2017 20:06:13 +0200 Message-ID: References: <20170507200034.GA661@breton.holly.idiocy.org> <20170509224435.GB8974@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1494526033 27541 195.159.176.226 (11 May 2017 18:07:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 May 2017 18:07:13 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: 26816@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 11 20:07:09 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 1d8sUU-00072U-Pq for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 May 2017 20:07:07 +0200 Original-Received: from localhost ([::1]:49534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8sUa-0005Qz-E0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 May 2017 14:07:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8sUT-0005Kd-ML for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 14:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8sUQ-0003UD-HU for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 14:07:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8sUQ-0003U3-BM for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 14:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8sUQ-0002bD-5D for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 14:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Charles A. Roelli" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2017 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26816 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26816-submit@debbugs.gnu.org id=B26816.14945259859949 (code B ref 26816); Thu, 11 May 2017 18:07:01 +0000 Original-Received: (at 26816) by debbugs.gnu.org; 11 May 2017 18:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sTp-0002aO-J5 for submit@debbugs.gnu.org; Thu, 11 May 2017 14:06:25 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:45262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sTn-0002aA-0b for 26816@debbugs.gnu.org; Thu, 11 May 2017 14:06:23 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id D260C22420 for <26816@debbugs.gnu.org>; Thu, 11 May 2017 18:02:02 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1494525721; x= 1495389722; bh=zF1Cv9an+IZWBdCK6wRE6ElJiy578SbD29T110nZnhk=; b=A Zd2DfqDahjIAWTPv+O+5pKb5avfsEqf+epY20gegabtw12hEN2NNs9G/TfEIKWLC QKKs/owCqdX5v6eN5l0gAEBa1VRHf3NjD5WBY0I6QXKmSzNl13EKfI2atwJgdZYV qgj41AFctyAShOXwyfaN067QAhZBGMWi6Q1KRpfjWE= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1Ivt0Yms9uXq for <26816@debbugs.gnu.org>; Thu, 11 May 2017 18:02:01 +0000 (UTC) Original-Received: from [192.168.1.106] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 0EBEB22151; Thu, 11 May 2017 18:02:00 +0000 (UTC) In-Reply-To: <20170509224435.GB8974@breton.holly.idiocy.org> 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:132443 Archived-At: >> I ran NS_PARENT_WINDOW_TOP_POS(f) on the frame in the taller monitor as >> described, and it always returned 1680. I tried adding ([[[FRAME_NS_VIEW >> (f) window] screen] frame].origin.y) to the last line in the macro you >> mentioned, but this must always be returning zero, because it made no >> difference and the macro still returned 1680. > Hmm, this is harder than I first thought. > > Presumably (frame-position) returns nonsensical values on your > portrait monitor, and (set-frame-position nil 0 0) also plants the > frame in the wrong place (ie. not the top left)? (set-frame-position nil 0 0) places the frame in the top-left corner of the primary monitor for me in Emacs 25.2. (frame-position) with the frame in the top-left corner of the secondary monitor reports (-1050 . -880). I'm not sure: is this expected behavior? > Can you try changing that last line of NS_PARENT_WINDOW_TOP_POS to > return > > NSScreen.screens[0].frame.size.height > > I *think* that should set the top left of the primary screen as (0, > 0). If that works for this, there may be other places where we’re > using window.screen that we’ll have to change to use the primary > screen, but I’m not really sure. > > I wonder if it’ll break when ‘screens have separate spaces’ is turned > on...? :/ > > Almost anything seems to work here, but I’m not using multiple > monitors. > I made the line say [[[NSScreen screens] objectAtIndex: 0] frame].size.height (equivalent to what you wrote) and the mouse can now be set to a position in the frame as expected. Thanks for your help with this. This now reminds me of a related problem, though: with Emacs 25.2 (or in Emacs 26, with the above change applied to NS_PARENT_WINDOW_TOP_POS(f)), tooltips originating from an area with a help-echo property (like "Lisp Interaction" in the mode line in emacs -Q) in a frame on the secondary monitor actually show up in the primary monitor instead -- as if the tooltip frame is constrained to having a positive x-coordinate only. I haven't found where it happens, but I guess the cause is similar.