all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fran Litterio <flitterio@gmail.com>
To: emacs-devel@gnu.org
Subject: Bug in function x_calc_absolute_position in xterm.c and w32term.c
Date: Tue, 23 Jun 2015 16:12:43 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150623T175914-383@post.gmane.org> (raw)

Using the latest sources, I see the following behavior on a machine
with two 1920x1080 monitors arranged side-by-side:

  $ runemacs.exe -Q

In buffer *scratch*:

  (setq f (make-frame '((left . -1))))
  #<frame emacs@IZSYSTEM023 015257f0>
  (frame-parameter f 'left)
  3155

The left offset of the new frame appears to be 1920 pixels too far
to the right.  Evaluating the following form positions the frame to
its expected location (abutting the right edge of the rightmost 
monitor):

  (set-frame-position f (- 3155 1920) 0)

The root cause appears to be that function x_calc_absolute_position
(in files xterm.c and w32term.c) calls function x_display_pixel_width
to obtain the pixel width of the current monitor, but
x_display_pixel_width has changed to give the combined pixel width
of all monitors.

I expect the same problem would happen making a frame with a 'top
parameter of -1 with multiple vertically stacked monitors (due to
x_display_pixel_height having changed similarly).

If I can get a fix working, I'll send a patch.
--
Fran Litterio





             reply	other threads:[~2015-06-23 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 16:12 Fran Litterio [this message]
2015-06-30 13:42 ` Bug in function x_calc_absolute_positionin xterm.c and w32term.c Fran Litterio

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20150623T175914-383@post.gmane.org \
    --to=flitterio@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.