diff options
| author | Eli Zaretskii | 2014-10-08 13:16:45 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-10-08 13:16:45 +0300 |
| commit | 28ec0a87ca43f6d62b1503bedfe25640269fd7ef (patch) | |
| tree | 11af3bd8cdfaeb03992f80fc67204806fba1cc89 /doc/lispref | |
| parent | a7044030f39a7351507727421308c56d7771bebf (diff) | |
| download | emacs-28ec0a87ca43f6d62b1503bedfe25640269fd7ef.tar.gz emacs-28ec0a87ca43f6d62b1503bedfe25640269fd7ef.zip | |
Fix bug #18636 with documentation of multi-monitor displays.
doc/lispref/frames.texi (Multiple Terminals): Improve the description of X
display names. Add index entries.
(Basic Parameters): Add a cross-reference to where X display names
are described.
(Position Parameters): Mention that positional parameters of the
form (+ POS) can be negative if they are on a non-primary monitor
of a multi-monitor display.
(Creating Frames): Mention that on multi-monitor displays the
frame might be positioned differently than specified by the frame
parameters alist.
lisp/faces.el (display-grayscale-p): Mention in the doc string that
the argument can be either a display name or a frame.
lisp/frame.el (display-pixel-height, display-pixel-width)
(display-mm-height, display-mm-width, display-backing-store)
(display-save-under, display-planes, display-color-cells)
(display-visual-class, display-monitor-attributes-list)
(display-screens): Mention in the doc string that the argument can
be either a display name or a frame. Improve the docs of the
monitor attributes.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 13 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 89 |
2 files changed, 84 insertions, 18 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index babcc22959e..36497470705 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2014-10-08 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * frames.texi (Multiple Terminals): Improve the description of X | ||
| 4 | display names. Add index entries. | ||
| 5 | (Basic Parameters): Add a cross-reference to where X display names | ||
| 6 | are described. | ||
| 7 | (Position Parameters): Mention that positional parameters of the | ||
| 8 | form (+ POS) can be negative if they are on a non-primary monitor | ||
| 9 | of a multi-monitor display. (Bug#18636) | ||
| 10 | (Creating Frames): Mention that on multi-monitor displays the | ||
| 11 | frame might be positioned differently than specified by the frame | ||
| 12 | parameters alist. | ||
| 13 | |||
| 1 | 2014-10-04 Glenn Morris <rgm@gnu.org> | 14 | 2014-10-04 Glenn Morris <rgm@gnu.org> |
| 2 | 15 | ||
| 3 | * commands.texi (Generic Commands): Copyedits. | 16 | * commands.texi (Generic Commands): Copyedits. |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index afbace34575..cb3fefd7115 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -131,6 +131,13 @@ applies any parameters listed in @code{frame-inherited-parameters} | |||
| 131 | (see below) and not present in the argument, taking the values from | 131 | (see below) and not present in the argument, taking the values from |
| 132 | the frame that was selected when @code{make-frame} was called. | 132 | the frame that was selected when @code{make-frame} was called. |
| 133 | 133 | ||
| 134 | Note that on multi-monitor displays (@pxref{Multiple Terminals}), the | ||
| 135 | window manager might position the frame differently than specified by | ||
| 136 | the positional parameters in @var{alist} (@pxref{Position | ||
| 137 | Parameters}). For example, some window managers have a policy of | ||
| 138 | displaying the frame on the monitor that contains the largest part of | ||
| 139 | the window (a.k.a.@: the @dfn{dominating} monitor). | ||
| 140 | |||
| 134 | This function itself does not make the new frame the selected frame. | 141 | This function itself does not make the new frame the selected frame. |
| 135 | @xref{Input Focus}. The previously selected frame remains selected. | 142 | @xref{Input Focus}. The previously selected frame remains selected. |
| 136 | On graphical terminals, however, the windowing system may select the | 143 | On graphical terminals, however, the windowing system may select the |
| @@ -258,13 +265,27 @@ of those frames is ``@emph{the} selected frame'' at any given moment | |||
| 258 | terminals, by interacting with the @command{emacsclient} program. | 265 | terminals, by interacting with the @command{emacsclient} program. |
| 259 | @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. | 266 | @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. |
| 260 | 267 | ||
| 268 | @cindex X display names | ||
| 269 | @cindex display name on X | ||
| 261 | A single X server can handle more than one display. Each X display | 270 | A single X server can handle more than one display. Each X display |
| 262 | has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. | 271 | has a three-part name, |
| 263 | The first two parts, @var{host} and @var{server}, identify the X | 272 | @samp{@var{hostname}:@var{displaynumber}.@var{screennumber}}. The |
| 264 | server; the third part, @var{screen}, identifies a screen number on | 273 | first part, @var{hostname}, specifies the name of the machine to which |
| 265 | that X server. When you use two or more screens belonging to one | 274 | the display is physically connected. The second part, |
| 266 | server, Emacs knows by the similarity in their names that they share a | 275 | @var{displaynumber}, is a zero-based number that identifies one or |
| 267 | single keyboard. | 276 | more monitors connected to that machine that share a common keyboard |
| 277 | and pointing device (mouse, tablet, etc.). The third part, | ||
| 278 | @var{screennumber}, identifies a zero-based screen number (a separate | ||
| 279 | monitor) that is part of a single monitor collection on that X server. | ||
| 280 | When you use two or more screens belonging to one server, Emacs knows | ||
| 281 | by the similarity in their names that they share a single keyboard. | ||
| 282 | |||
| 283 | Systems that don't use the X window system, such as MS-Windows, | ||
| 284 | don't support the notion of X displays, and have only one display on | ||
| 285 | each host. The display name on these systems doesn't follow the above | ||
| 286 | 3-part format; for example, the display name on MS-Windows systems is | ||
| 287 | a constant string @samp{w32}, and exists for compatibility, so that | ||
| 288 | you could pass it to functions that expect a display name. | ||
| 268 | 289 | ||
| 269 | @deffn Command make-frame-on-display display &optional parameters | 290 | @deffn Command make-frame-on-display display &optional parameters |
| 270 | This function creates and returns a new frame on @var{display}, taking | 291 | This function creates and returns a new frame on @var{display}, taking |
| @@ -320,19 +341,27 @@ to obtain information about such setups. | |||
| 320 | 341 | ||
| 321 | @defun display-monitor-attributes-list &optional display | 342 | @defun display-monitor-attributes-list &optional display |
| 322 | This function returns a list of physical monitor attributes on | 343 | This function returns a list of physical monitor attributes on |
| 323 | @var{display}, which defaults to that of the selected frame. | 344 | @var{display}, which can be a display name (a string), a terminal, or |
| 324 | Each element of the list is an association list, representing the | 345 | a frame; if omitted or @code{nil}, it defaults to the selected frame's |
| 325 | attributes of a physical monitor. The first element corresponds to | 346 | display. Each element of the list is an association list, |
| 326 | the primary monitor. The attribute keys and values are: | 347 | representing the attributes of a physical monitor. The first element |
| 348 | corresponds to the primary monitor. The attribute keys and values | ||
| 349 | are: | ||
| 327 | 350 | ||
| 328 | @table @samp | 351 | @table @samp |
| 329 | @item geometry | 352 | @item geometry |
| 330 | Position and size in pixels as @samp{(@var{x} @var{y} | 353 | Position of the top-left corner of the monitor's screen and its size, |
| 331 | @var{width} @var{height})}. | 354 | in pixels, as @samp{(@var{x} @var{y} @var{width} @var{height})}. Note |
| 355 | that, if the monitor is not the primary monitor, some of the | ||
| 356 | coordinates might be negative. | ||
| 332 | 357 | ||
| 333 | @item workarea | 358 | @item workarea |
| 334 | Position and size of the work area in pixels as | 359 | Position of the top-left corner and size of the work area in pixels as |
| 335 | @samp{(@var{x} @var{y} @var{width} @var{height})}. | 360 | @samp{(@var{x} @var{y} @var{width} @var{height})}. This is different |
| 361 | from @samp{geometry} in that the various system windows, such as the | ||
| 362 | task bar and side bar, are excluded from the work area. Note that, if | ||
| 363 | the monitor is not the primary monitor, some of the coordinates might | ||
| 364 | be negative. | ||
| 336 | 365 | ||
| 337 | @item mm-size | 366 | @item mm-size |
| 338 | Width and height in millimeters as @samp{(@var{width} @var{height})} | 367 | Width and height in millimeters as @samp{(@var{width} @var{height})} |
| @@ -353,6 +382,27 @@ does not intersect any physical monitors) that monitor is the closest | |||
| 353 | to the frame. Every (non-tooltip) frame (whether visible or not) in a | 382 | to the frame. Every (non-tooltip) frame (whether visible or not) in a |
| 354 | graphical display is dominated by exactly one physical monitor at a | 383 | graphical display is dominated by exactly one physical monitor at a |
| 355 | time, though the frame can span multiple (or no) physical monitors. | 384 | time, though the frame can span multiple (or no) physical monitors. |
| 385 | |||
| 386 | Here's an example of the data produced by this function on a 2-monitor | ||
| 387 | display: | ||
| 388 | |||
| 389 | @smalllisp | ||
| 390 | (display-monitor-attributes-list) | ||
| 391 | @result{} | ||
| 392 | (((geometry 0 0 1920 1080) ;; Left hand monitor | ||
| 393 | (workarea 0 0 1920 1050) ;; Bottom of screen used for task bar | ||
| 394 | task bar | ||
| 395 | (mm-size 677 381) | ||
| 396 | (name . "\\\\.\\DISPLAY1") | ||
| 397 | (frames #<frame emacs@@host *foo* 0000000005BBDC48> | ||
| 398 | #<frame emacs@@host *scratch* 000000008179D370>)) | ||
| 399 | ((geometry 1920 0 1680 1050) ;; Right hand monitor | ||
| 400 | (workarea 1920 0 1680 1050) ;; Whole screen can be used | ||
| 401 | (mm-size 593 370) | ||
| 402 | (name . "\\\\.\\DISPLAY2") | ||
| 403 | (frames))) | ||
| 404 | @end smalllisp | ||
| 405 | |||
| 356 | @end defun | 406 | @end defun |
| 357 | 407 | ||
| 358 | @defun frame-monitor-attributes &optional frame | 408 | @defun frame-monitor-attributes &optional frame |
| @@ -529,8 +579,9 @@ frame. @code{title} and @code{name} are meaningful on all terminals. | |||
| 529 | @vindex display, a frame parameter | 579 | @vindex display, a frame parameter |
| 530 | @item display | 580 | @item display |
| 531 | The display on which to open this frame. It should be a string of the | 581 | The display on which to open this frame. It should be a string of the |
| 532 | form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the | 582 | form @samp{@var{host}:@var{dpy}.@var{screen}}, just like the |
| 533 | @env{DISPLAY} environment variable. | 583 | @env{DISPLAY} environment variable. @xref{Multiple Terminals}, for |
| 584 | more details about display names. | ||
| 534 | 585 | ||
| 535 | @vindex display-type, a frame parameter | 586 | @vindex display-type, a frame parameter |
| 536 | @item display-type | 587 | @item display-type |
| @@ -586,12 +637,14 @@ right screen edge. | |||
| 586 | @item @code{(+ @var{pos})} | 637 | @item @code{(+ @var{pos})} |
| 587 | This specifies the position of the left frame edge relative to the left | 638 | This specifies the position of the left frame edge relative to the left |
| 588 | screen edge. The integer @var{pos} may be positive or negative; a | 639 | screen edge. The integer @var{pos} may be positive or negative; a |
| 589 | negative value specifies a position outside the screen. | 640 | negative value specifies a position outside the screen or on a monitor |
| 641 | other than the primary one (for multi-monitor displays). | ||
| 590 | 642 | ||
| 591 | @item @code{(- @var{pos})} | 643 | @item @code{(- @var{pos})} |
| 592 | This specifies the position of the right frame edge relative to the right | 644 | This specifies the position of the right frame edge relative to the right |
| 593 | screen edge. The integer @var{pos} may be positive or negative; a | 645 | screen edge. The integer @var{pos} may be positive or negative; a |
| 594 | negative value specifies a position outside the screen. | 646 | negative value specifies a position outside the screen or on a monitor |
| 647 | other than the primary one (for multi-monitor displays). | ||
| 595 | @end table | 648 | @end table |
| 596 | 649 | ||
| 597 | Some window managers ignore program-specified positions. If you want to | 650 | Some window managers ignore program-specified positions. If you want to |