From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21173: 25.0.50; New frames positioned off screen with multiple monitors Date: Wed, 28 Oct 2015 17:52:52 +0200 Message-ID: <83wpu72dnv.fsf@gnu.org> References: <874mkjadqx.fsf@gmail.com> <55BCA4B1.8030103@gmx.at> <55BCEAA5.9020406@gmx.at> <55BF0E7D.1070007@gmx.at> <86k2s0v97i.fsf@gmail.com> <56137EDB.1020801@gmx.at> <56288487.9020202@gmx.at> <86h9lcou5o.fsf@gmail.com> <56309B7D.5090207@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446047699 25055 80.91.229.3 (28 Oct 2015 15:54:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 15:54:59 +0000 (UTC) Cc: 21173@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 16:54:48 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 1ZrT3j-0004zB-Ik for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 16:54:43 +0100 Original-Received: from localhost ([::1]:39050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrT3i-0006JB-Sx for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 11:54:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrT38-0005gF-1u for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 11:54:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrT34-0001ml-PK for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 11:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrT34-0001mh-Mg for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZrT34-0005fF-Ha for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 11:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Oct 2015 15:54: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: Original-Received: via spool by 21173-submit@debbugs.gnu.org id=B21173.144604760521708 (code B ref 21173); Wed, 28 Oct 2015 15:54:02 +0000 Original-Received: (at 21173) by debbugs.gnu.org; 28 Oct 2015 15:53:25 +0000 Original-Received: from localhost ([127.0.0.1]:42681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrT2S-0005e3-Vx for submit@debbugs.gnu.org; Wed, 28 Oct 2015 11:53:25 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:49939) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrT28-0005dd-KH for 21173@debbugs.gnu.org; Wed, 28 Oct 2015 11:53:23 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NWX00M00TF7QQ00@a-mtaout22.012.net.il> for 21173@debbugs.gnu.org; Wed, 28 Oct 2015 17:53:02 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWX00M5HTG479C0@a-mtaout22.012.net.il>; Wed, 28 Oct 2015 17:52:53 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108105 Archived-At: > From: Andy Moreton > Date: Wed, 28 Oct 2015 14:13:28 +0000 > > On Wed 28 Oct 2015, martin rudalics wrote: > > >> Hopefully this reply includes a suiteably formatted patch. > > > > Thanks. But compiling gets me now: > > > > ../../src/w32term.c: In function 'x_calc_absolute_position': > > ../../src/w32term.c:5926:7: error: incompatible type for argument 1 of 'Fw32_display_monitor_attributes_list' > > ./globals.h:4463:1: note: expected 'Lisp_Object' but argument is of type 'int' > > What non-default build options are you using to see this error ? I think the warnings depend on the version of GCC. > I've built this without warnings on: > mingw32 32bit > mingw32 32bit wide-int > mingw64 64bit > cygwin 64bit > > > I suppose you meant writing something like > > > > Lisp_Object frame, list; > > > > XSETFRAME (frame, f); > > list = Fw32_display_monitor_attributes_list (frame); > > > > Please have a look. > > I'm sure you know more about it than me - I don't know enough about the > internals to judge which is correct. Feel free to adjust the patch to > fix this. Martin is right: Fw32_display_monitor_attributes_list accepts a Lisp_Object as its argument, which should be either nil, a frame, a terminal, or a display name (a string), whereas FRAME_X_DISPLAY returns zero on MS-Windows. I think it works for you because Qnil has the value of zero. To catch such problems, invoke the configure script with the --enable-check-lisp-object-type switch. > The patch as shown was tested with multiple monitors on Win7 64bit for both > mingw64 and cygwin w32 builds, and worked correctly with the testcase > from the original reporter. > > I've retested this briefly with your fix, which still works for the > simple testcase shows by Fran Litterio. To see the difference, you need a test case where the selected frame and the frame used in your code are different.