diff options
| author | Glenn Morris | 2014-10-08 21:23:09 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-10-08 21:23:09 -0700 |
| commit | 32ade3f01a0185f2a836c313d9d50564abe4e254 (patch) | |
| tree | 195ed03adf2f7757d67caf79dd2baff44911748c /doc/lispref/frames.texi | |
| parent | fdcb06012a36a8ec800e33554ae94c26e43a7c05 (diff) | |
| parent | 942a57a2a5c56575a15dd22e1feebd1825f281b0 (diff) | |
| download | emacs-32ade3f01a0185f2a836c313d9d50564abe4e254.tar.gz emacs-32ade3f01a0185f2a836c313d9d50564abe4e254.zip | |
Merge from emacs-24; up to 2014-07-22T06:37:31Z!yamaoka@jpl.org
Diffstat (limited to 'doc/lispref/frames.texi')
| -rw-r--r-- | doc/lispref/frames.texi | 96 |
1 files changed, 77 insertions, 19 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 464c5fccc4f..a14702a7ce1 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,29 @@ 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 (``usable'' |
| 335 | @samp{(@var{x} @var{y} @var{width} @var{height})}. | 360 | space) in pixels as @samp{(@var{x} @var{y} @var{width} @var{height})}. |
| 361 | This may be different from @samp{geometry} in that space occupied by | ||
| 362 | various window manager features (docks, taskbars, etc.) may be | ||
| 363 | excluded from the work area. Whether or not such features actually | ||
| 364 | subtract from the work area depends on the platform and environment. | ||
| 365 | Again, if the monitor is not the primary monitor, some of the | ||
| 366 | coordinates might be negative. | ||
| 336 | 367 | ||
| 337 | @item mm-size | 368 | @item mm-size |
| 338 | Width and height in millimeters as @samp{(@var{width} @var{height})} | 369 | Width and height in millimeters as @samp{(@var{width} @var{height})} |
| @@ -342,10 +373,14 @@ List of frames that this physical monitor dominates (see below). | |||
| 342 | 373 | ||
| 343 | @item name | 374 | @item name |
| 344 | Name of the physical monitor as @var{string}. | 375 | Name of the physical monitor as @var{string}. |
| 376 | |||
| 377 | @item source | ||
| 378 | Source of the multi-monitor information as @var{string}; | ||
| 379 | e.g., @samp{XRandr} or @samp{Xinerama}. | ||
| 345 | @end table | 380 | @end table |
| 346 | 381 | ||
| 347 | @var{x}, @var{y}, @var{width}, and @var{height} are integers. | 382 | @var{x}, @var{y}, @var{width}, and @var{height} are integers. |
| 348 | @samp{name} may not be present. | 383 | @samp{name} and @samp{source} may be absent. |
| 349 | 384 | ||
| 350 | A frame is @dfn{dominated} by a physical monitor when either the | 385 | A frame is @dfn{dominated} by a physical monitor when either the |
| 351 | largest area of the frame resides in that monitor, or (if the frame | 386 | largest area of the frame resides in that monitor, or (if the frame |
| @@ -353,6 +388,26 @@ 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 | 388 | 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 | 389 | graphical display is dominated by exactly one physical monitor at a |
| 355 | time, though the frame can span multiple (or no) physical monitors. | 390 | time, though the frame can span multiple (or no) physical monitors. |
| 391 | |||
| 392 | Here's an example of the data produced by this function on a 2-monitor | ||
| 393 | display: | ||
| 394 | |||
| 395 | @lisp | ||
| 396 | (display-monitor-attributes-list) | ||
| 397 | @result{} | ||
| 398 | (((geometry 0 0 1920 1080) ;; @r{Left-hand, primary monitor} | ||
| 399 | (workarea 0 0 1920 1050) ;; @r{A taskbar occupies some of the height} | ||
| 400 | (mm-size 677 381) | ||
| 401 | (name . "DISPLAY1") | ||
| 402 | (frames #<frame emacs@@host *Messages* 0x11578c0> | ||
| 403 | #<frame emacs@@host *scratch* 0x114b838>)) | ||
| 404 | ((geometry 1920 0 1680 1050) ;; @r{Right-hand monitor} | ||
| 405 | (workarea 1920 0 1680 1050) ;; @r{Whole screen can be used} | ||
| 406 | (mm-size 593 370) | ||
| 407 | (name . "DISPLAY2") | ||
| 408 | (frames))) | ||
| 409 | @end lisp | ||
| 410 | |||
| 356 | @end defun | 411 | @end defun |
| 357 | 412 | ||
| 358 | @defun frame-monitor-attributes &optional frame | 413 | @defun frame-monitor-attributes &optional frame |
| @@ -529,8 +584,9 @@ frame. @code{title} and @code{name} are meaningful on all terminals. | |||
| 529 | @vindex display, a frame parameter | 584 | @vindex display, a frame parameter |
| 530 | @item display | 585 | @item display |
| 531 | The display on which to open this frame. It should be a string of the | 586 | 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 | 587 | form @samp{@var{host}:@var{dpy}.@var{screen}}, just like the |
| 533 | @env{DISPLAY} environment variable. | 588 | @env{DISPLAY} environment variable. @xref{Multiple Terminals}, for |
| 589 | more details about display names. | ||
| 534 | 590 | ||
| 535 | @vindex display-type, a frame parameter | 591 | @vindex display-type, a frame parameter |
| 536 | @item display-type | 592 | @item display-type |
| @@ -586,12 +642,14 @@ right screen edge. | |||
| 586 | @item @code{(+ @var{pos})} | 642 | @item @code{(+ @var{pos})} |
| 587 | This specifies the position of the left frame edge relative to the left | 643 | 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 | 644 | screen edge. The integer @var{pos} may be positive or negative; a |
| 589 | negative value specifies a position outside the screen. | 645 | negative value specifies a position outside the screen or on a monitor |
| 646 | other than the primary one (for multi-monitor displays). | ||
| 590 | 647 | ||
| 591 | @item @code{(- @var{pos})} | 648 | @item @code{(- @var{pos})} |
| 592 | This specifies the position of the right frame edge relative to the right | 649 | 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 | 650 | screen edge. The integer @var{pos} may be positive or negative; a |
| 594 | negative value specifies a position outside the screen. | 651 | negative value specifies a position outside the screen or on a monitor |
| 652 | other than the primary one (for multi-monitor displays). | ||
| 595 | @end table | 653 | @end table |
| 596 | 654 | ||
| 597 | Some window managers ignore program-specified positions. If you want to | 655 | Some window managers ignore program-specified positions. If you want to |