From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Litterio Newsgroups: gmane.emacs.bugs Subject: bug#21173: 25.0.50; New frames positioned off screen with multiple monitors Date: Sat, 1 Aug 2015 16:59:51 +0000 (UTC) Message-ID: References: <874mkjadqx.fsf@gmail.com> <55BCA4B1.8030103@gmx.at> <55BCEAA5.9020406@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1438448485 5979 80.91.229.3 (1 Aug 2015 17:01:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 17:01:25 +0000 (UTC) To: 21173@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 19:01:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZLa9o-0001Mx-UZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 19:01:13 +0200 Original-Received: from localhost ([::1]:54346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa9o-00079c-7K for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 13:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa9k-00079M-92 for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:01:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLa9e-0007Bh-GA for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:01:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa9e-0007Bb-E0 for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZLa9e-0006rC-5Z for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:01:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <874mkjadqx.fsf@gmail.com> Resent-From: Francis Litterio Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 17:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21173 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143844841126240 (code B ref -1); Sat, 01 Aug 2015 17:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2015 17:00:11 +0000 Original-Received: from localhost ([127.0.0.1]:36785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLa8o-0006p8-Ey for submit@debbugs.gnu.org; Sat, 01 Aug 2015 13:00:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56980) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLa8j-0006ox-Sj for submit@debbugs.gnu.org; Sat, 01 Aug 2015 13:00:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLa8i-0006pT-O5 for submit@debbugs.gnu.org; Sat, 01 Aug 2015 13:00:05 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa8i-0006p2-Lj for submit@debbugs.gnu.org; Sat, 01 Aug 2015 13:00:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa8h-0006pO-JH for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:00:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLa8c-0006fH-LW for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 13:00:03 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLa8c-0006eG-E4 for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 12:59:58 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZLa8a-0000uu-LI for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2015 18:59:57 +0200 Original-Received: from 46.sub-70-215-22.myvzw.com ([70.215.22.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2015 18:59:56 +0200 Original-Received: from flitterio by 46.sub-70-215-22.myvzw.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2015 18:59:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 70.215.22.46 (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105276 Archived-At: martin rudalics gmx.at> writes: > > > Function x_calc_absolute_position does not account for the fact > > that my left monitor's left offsets are negative. I believe that > > is the root of the bug. > > If `display-monitor-attributes-list' returns the correct geometry values > it shouldn't be too hard to fix this. Thanks, Martin. I see display-monitor-attributes-list return this value: (((geometry 0 0 1920 1080) (workarea 0 0 1920 1080) (mm-size 677 381) (name . "\\\\.\\DISPLAY1") (frames #)) ((geometry -1920 0 1920 1080) (workarea -1920 0 1920 1080) (mm-size 677 381) (name . "\\\\.\\DISPLAY2") (frames))) Note the "-1920" in the info for DISPLAY2. So I think all the information is there to fix this. > That is, after the final > calculation of f->left_pos in x_calc_absolute_position subtract from it > the value (if negative) of whatever w32_display_monitor_attributes_list > returns as first value in `geometry' and from f->top_pos the second > value. I could do this in pure Elisp, but x_calc_absolute_position is written in C, and I'm weak at using Elisp functions and objects from C. I'll give it a try and re-test. If I get something working, I'll post the patch here for review. -- Fran