Seiji Zenitani <[EMAIL PROTECTED]> writes: > I tested the latest fullscreen code on an external display. My > display configuration is described in the attached file; a wider sub > screen (an external display) is located on the left side of the main > screen. > > Everything is file on the main screen, however, there is a glitch on > the sub screen. For example, when I set the fullscreen frame > parameter to 'fullwidth on a sub screen, the frame shows up both on > the main screen and on the sub screen, as shown in the PDF file. The > width of the frame seems to be correct: it's same as the width of the > sub screen.
The background for this bug is that the origin of the display on a Mac is in the top-left corner of the main display. In your setup, the main display is on the right, so a window on your external display will have negative X-coordinates. X11, however, does not use negative coordinates. Instead, a negative sign indicates that the coordinate is relative to the right or bottom edge of the display (rather than the left or top). There is code in macterm.c (e.g., x_calc_absolute_position) that simulates the X11 behavior. The bug was present even before my patch, but didn't happen right away (because mac-toggle-max-window changed the position without telling Emacs). It would also be encountered by anyone setting the frame parameter 'left, even if they didn't use the fullscreen feature at all. The right way to fix this is probably to translate between two coordinate spaces. Internally to Emacs, the origin should be in the top-left corner of the minimum bounding rectangle of the union of the displays. The Mac-specific code will have to translate to and from the Mac coordinates (with the origin in the top-left corner of the main display). Vebjorn --~--~---------~--~----~------------~-------~--~----~ Carbon Emacs User Group http://groups.google.com/group/carbon-emacs?hl=en -~----------~----~----~----~------~----~------~--~---