aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/frames.texi
diff options
context:
space:
mode:
authorGlenn Morris2014-10-08 21:23:09 -0700
committerGlenn Morris2014-10-08 21:23:09 -0700
commit32ade3f01a0185f2a836c313d9d50564abe4e254 (patch)
tree195ed03adf2f7757d67caf79dd2baff44911748c /doc/lispref/frames.texi
parentfdcb06012a36a8ec800e33554ae94c26e43a7c05 (diff)
parent942a57a2a5c56575a15dd22e1feebd1825f281b0 (diff)
downloademacs-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.texi96
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
132the frame that was selected when @code{make-frame} was called. 132the frame that was selected when @code{make-frame} was called.
133 133
134Note that on multi-monitor displays (@pxref{Multiple Terminals}), the
135window manager might position the frame differently than specified by
136the positional parameters in @var{alist} (@pxref{Position
137Parameters}). For example, some window managers have a policy of
138displaying the frame on the monitor that contains the largest part of
139the window (a.k.a.@: the @dfn{dominating} monitor).
140
134This function itself does not make the new frame the selected frame. 141This 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.
136On graphical terminals, however, the windowing system may select the 143On 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
258terminals, by interacting with the @command{emacsclient} program. 265terminals, 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
262has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. 271has a three-part name,
263The first two parts, @var{host} and @var{server}, identify the X 272@samp{@var{hostname}:@var{displaynumber}.@var{screennumber}}. The
264server; the third part, @var{screen}, identifies a screen number on 273first part, @var{hostname}, specifies the name of the machine to which
265that X server. When you use two or more screens belonging to one 274the display is physically connected. The second part,
266server, Emacs knows by the similarity in their names that they share a 275@var{displaynumber}, is a zero-based number that identifies one or
267single keyboard. 276more monitors connected to that machine that share a common keyboard
277and pointing device (mouse, tablet, etc.). The third part,
278@var{screennumber}, identifies a zero-based screen number (a separate
279monitor) that is part of a single monitor collection on that X server.
280When you use two or more screens belonging to one server, Emacs knows
281by 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,
284don't support the notion of X displays, and have only one display on
285each host. The display name on these systems doesn't follow the above
2863-part format; for example, the display name on MS-Windows systems is
287a constant string @samp{w32}, and exists for compatibility, so that
288you 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
270This function creates and returns a new frame on @var{display}, taking 291This 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
322This function returns a list of physical monitor attributes on 343This 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
324Each element of the list is an association list, representing the 345a frame; if omitted or @code{nil}, it defaults to the selected frame's
325attributes of a physical monitor. The first element corresponds to 346display. Each element of the list is an association list,
326the primary monitor. The attribute keys and values are: 347representing the attributes of a physical monitor. The first element
348corresponds to the primary monitor. The attribute keys and values
349are:
327 350
328@table @samp 351@table @samp
329@item geometry 352@item geometry
330Position and size in pixels as @samp{(@var{x} @var{y} 353Position of the top-left corner of the monitor's screen and its size,
331@var{width} @var{height})}. 354in pixels, as @samp{(@var{x} @var{y} @var{width} @var{height})}. Note
355that, if the monitor is not the primary monitor, some of the
356coordinates might be negative.
332 357
333@item workarea 358@item workarea
334Position and size of the work area in pixels as 359Position of the top-left corner and size of the work area (``usable''
335@samp{(@var{x} @var{y} @var{width} @var{height})}. 360space) in pixels as @samp{(@var{x} @var{y} @var{width} @var{height})}.
361This may be different from @samp{geometry} in that space occupied by
362various window manager features (docks, taskbars, etc.) may be
363excluded from the work area. Whether or not such features actually
364subtract from the work area depends on the platform and environment.
365Again, if the monitor is not the primary monitor, some of the
366coordinates might be negative.
336 367
337@item mm-size 368@item mm-size
338Width and height in millimeters as @samp{(@var{width} @var{height})} 369Width 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
344Name of the physical monitor as @var{string}. 375Name of the physical monitor as @var{string}.
376
377@item source
378Source of the multi-monitor information as @var{string};
379e.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
350A frame is @dfn{dominated} by a physical monitor when either the 385A frame is @dfn{dominated} by a physical monitor when either the
351largest area of the frame resides in that monitor, or (if the frame 386largest 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
353to the frame. Every (non-tooltip) frame (whether visible or not) in a 388to the frame. Every (non-tooltip) frame (whether visible or not) in a
354graphical display is dominated by exactly one physical monitor at a 389graphical display is dominated by exactly one physical monitor at a
355time, though the frame can span multiple (or no) physical monitors. 390time, though the frame can span multiple (or no) physical monitors.
391
392Here's an example of the data produced by this function on a 2-monitor
393display:
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
531The display on which to open this frame. It should be a string of the 586The display on which to open this frame. It should be a string of the
532form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the 587form @samp{@var{host}:@var{dpy}.@var{screen}}, just like the
533@env{DISPLAY} environment variable. 588@env{DISPLAY} environment variable. @xref{Multiple Terminals}, for
589more 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})}
587This specifies the position of the left frame edge relative to the left 643This specifies the position of the left frame edge relative to the left
588screen edge. The integer @var{pos} may be positive or negative; a 644screen edge. The integer @var{pos} may be positive or negative; a
589negative value specifies a position outside the screen. 645negative value specifies a position outside the screen or on a monitor
646other than the primary one (for multi-monitor displays).
590 647
591@item @code{(- @var{pos})} 648@item @code{(- @var{pos})}
592This specifies the position of the right frame edge relative to the right 649This specifies the position of the right frame edge relative to the right
593screen edge. The integer @var{pos} may be positive or negative; a 650screen edge. The integer @var{pos} may be positive or negative; a
594negative value specifies a position outside the screen. 651negative value specifies a position outside the screen or on a monitor
652other than the primary one (for multi-monitor displays).
595@end table 653@end table
596 654
597Some window managers ignore program-specified positions. If you want to 655Some window managers ignore program-specified positions. If you want to