From: Eli Zaretskii <eliz@gnu.org>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: 21173@debbugs.gnu.org
Subject: bug#21173: 25.0.50; New frames positioned off screen with multiple monitors
Date: Wed, 28 Oct 2015 17:52:52 +0200 [thread overview]
Message-ID: <83wpu72dnv.fsf@gnu.org> (raw)
In-Reply-To: <vz11tcfulmf.fsf@gmail.com>
> From: Andy Moreton <andrewjmoreton@gmail.com>
> 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.
next prev parent reply other threads:[~2015-10-28 15:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 3:28 bug#21173: 25.0.50; New frames positioned off screen with multiple monitors Francis Litterio
2015-08-01 10:51 ` martin rudalics
2015-08-01 15:03 ` Francis Litterio
2015-08-01 15:49 ` martin rudalics
2015-08-01 16:59 ` Francis Litterio
2015-08-03 6:47 ` martin rudalics
2015-08-03 20:35 ` Andy Moreton
2015-08-03 21:12 ` Glenn Morris
2015-08-04 16:31 ` Fran Litterio
2015-09-08 22:26 ` Andy Moreton
2015-10-06 7:57 ` martin rudalics
2015-10-07 16:50 ` Fran
2015-10-21 18:57 ` Francis Litterio
2015-10-21 23:37 ` Andy Moreton
2015-10-22 6:39 ` martin rudalics
2015-10-27 21:53 ` Andy Moreton
2015-10-28 9:55 ` martin rudalics
2015-10-28 14:13 ` Andy Moreton
2015-10-28 15:52 ` Eli Zaretskii [this message]
2015-10-28 17:25 ` Andy Moreton
2015-10-28 18:08 ` Eli Zaretskii
2015-10-28 19:21 ` martin rudalics
2015-10-28 19:39 ` Andy Moreton
2015-10-29 7:57 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wpu72dnv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=21173@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).