From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#26816: mouse movement support for OS X Date: Thu, 11 May 2017 22:43:42 +0100 Message-ID: <20170511214342.GA10431@breton.holly.idiocy.org> 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 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1494539057 21932 195.159.176.226 (11 May 2017 21:44:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 May 2017 21:44:17 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 26816@debbugs.gnu.org To: "Charles A. Roelli" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 11 23:44:08 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 1d8vsV-0005R6-NW for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 May 2017 23:44:07 +0200 Original-Received: from localhost ([::1]:50381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8vsb-0002OO-4X for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 May 2017 17:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8vsT-0002O8-QP for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 17:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8vsQ-0006zT-9s for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 17:44:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8vsQ-0006z6-5F for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 17:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8vsP-0001Kg-O1 for bug-gnu-emacs@gnu.org; Thu, 11 May 2017 17:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2017 21:44: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.14945390335099 (code B ref 26816); Thu, 11 May 2017 21:44:01 +0000 Original-Received: (at 26816) by debbugs.gnu.org; 11 May 2017 21:43:53 +0000 Original-Received: from localhost ([127.0.0.1]:39265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vsH-0001KB-C6 for submit@debbugs.gnu.org; Thu, 11 May 2017 17:43:53 -0400 Original-Received: from mail-wr0-f179.google.com ([209.85.128.179]:36587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vsG-0001Jy-1t for 26816@debbugs.gnu.org; Thu, 11 May 2017 17:43:52 -0400 Original-Received: by mail-wr0-f179.google.com with SMTP id l50so31508636wrc.3 for <26816@debbugs.gnu.org>; Thu, 11 May 2017 14:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=jE4oPv187sL8pyG4TylOuScF4crWiufwEYmmOYQJVCA=; b=KhQavcwpsToai/eQYR9C8Ok97OCFAUIUHP0/l/nFTJSwSprgQlbH0Xu+WRN/hTHG5j 9GMsMLA0wsYGzZs7QX6hJs9SlleXtJMlzuhdJONKiVaF0ndoNFpCb/d9EvlskIh0KyKB CsDUQBTDPvPvMY6nyVrbk38Yfzp5oHKN9FwXZTF0hN9xdl9X5tDr9rGkkiC56U0nHlof xxsI1FgQIb5gGJnfUJykwWyBtUfAwkF7cJsUMMLEIRbudxWxdKtPMi3Ub13JSKwmFUW2 rFuewokMpI/8+YtTppkIblEw+yCv6dMQmJHd6x1nYTIEjhN57T7fsJbW4ISRrvnBi10r BA/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=jE4oPv187sL8pyG4TylOuScF4crWiufwEYmmOYQJVCA=; b=RfswyBMVEnkUIPjbtlDQSM9sNN6O8kwwHBonEuqZKjVtJocfoYuAkb5ig+hmiwlmxn dxJWLWYeF9fRzWALOX5UFqhwS7u3+8jvVmz1KIE7DPDp8Eu4FYWYqei7lgQHfSgh42Lk hC8j/xvpNc8yjqSWEhtvUPhPH2KBhaRVZX+bCEb74Gg1P4Uy/HwI6bn9GjWD/8KaZbSS lWQhzDD8kWz5tx1FYonqotA74lRnVnjghyYVrWg7wswiLH07YoiM+Ty104/hCdL/3Syd ufAGHEhbdMimr05/Y10r7f/ysLcnAEZzYqyRKu9LMNcytyIm8ToVQ2JiVWKlFR+715RL NbuA== X-Gm-Message-State: AODbwcCjs8E/B0nJPbFdcDg+CiQTeoO2jz8bQUoBN2IkqkS+8tNLrwC2 yWxU91W2hg7YPEO5ZMc= X-Received: by 10.223.133.35 with SMTP id 32mr428166wrh.200.1494539025712; Thu, 11 May 2017 14:43:45 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-dc3e-4bdc-b913-fd48.holly.idiocy.org. [2001:8b0:3f8:8129:dc3e:4bdc:b913:fd48]) by smtp.gmail.com with ESMTPSA id l29sm1842262wmi.8.2017.05.11.14.43.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 14:43:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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:132446 Archived-At: On Thu, May 11, 2017 at 08:06:13PM +0200, Charles A. Roelli wrote: > > 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? It’s what I’d expect with the below modification to NS_PARENT_WINDOW_TOP_POS, so if Emacs 25 does that too then I’m happy. I was thinking that without the modification, Emacs 26 would do strange things, just like it did with positioning the mouse pointer. > 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. Thank you for working on it. Besides, I introduced this particular bug. > 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. Look at compute_tip_xy in nsfns.m. It moves tooltips into the positive screen space. I’ve not managed to get to grips with this code yet. I think what we want is for it to try to keep the tooltip on one screen, so it’s not spanning two monitors, but allow it to go into negative space. Perhaps this should be a separate bug report. -- Alan Third