[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in function x_calc_absolute_position in xterm.c and w32term.c

From: Fran Litterio
Subject: Bug in function x_calc_absolute_position in xterm.c and w32term.c
Date: Tue, 23 Jun 2015 16:12:43 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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 address@hidden 015257f0>
  (frame-parameter f 'left)

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 

  (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 via email to

[Prev in Thread] Current Thread [Next in Thread]