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 /lisp | |
| 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 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/faces.el | 4 | ||||
| -rw-r--r-- | lisp/frame.el | 19 |
3 files changed, 32 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5045e5d1469..e8fd37925fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2014-10-08 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * faces.el (display-grayscale-p): Mention in the doc string that | ||
| 4 | the argument can be either a display name or a frame. | ||
| 5 | |||
| 6 | * frame.el (display-pixel-height, display-pixel-width) | ||
| 7 | (display-mm-height, display-mm-width, display-backing-store) | ||
| 8 | (display-save-under, display-planes, display-color-cells) | ||
| 9 | (display-visual-class, display-monitor-attributes-list) | ||
| 10 | (display-screens): Mention in the doc string that the argument can | ||
| 11 | be either a display name or a frame. Improve the docs of the | ||
| 12 | monitor attributes. (Bug#18636) | ||
| 13 | |||
| 1 | 2014-10-06 Martin Rudalics <rudalics@gmx.at> | 14 | 2014-10-06 Martin Rudalics <rudalics@gmx.at> |
| 2 | 15 | ||
| 3 | * term.el (term-window-width): Subtract 1 from the width when | 16 | * term.el (term-window-width): Subtract 1 from the width when |
diff --git a/lisp/faces.el b/lisp/faces.el index f316245d165..20665286b4f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1814,7 +1814,9 @@ If omitted or nil, that stands for the selected frame's display." | |||
| 1814 | (declare-function x-display-grayscale-p "xfns.c" (&optional terminal)) | 1814 | (declare-function x-display-grayscale-p "xfns.c" (&optional terminal)) |
| 1815 | 1815 | ||
| 1816 | (defun display-grayscale-p (&optional display) | 1816 | (defun display-grayscale-p (&optional display) |
| 1817 | "Return non-nil if frames on DISPLAY can display shades of gray." | 1817 | "Return non-nil if frames on DISPLAY can display shades of gray. |
| 1818 | DISPLAY should be either a frame or a display name (a string). | ||
| 1819 | If omitted or nil, that stands for the selected frame's display." | ||
| 1818 | (let ((frame-type (framep-on-display display))) | 1820 | (let ((frame-type (framep-on-display display))) |
| 1819 | (cond | 1821 | (cond |
| 1820 | ((memq frame-type '(x w32 ns)) | 1822 | ((memq frame-type '(x w32 ns)) |
diff --git a/lisp/frame.el b/lisp/frame.el index f4d7622e662..9ab24cefc0f 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1381,6 +1381,7 @@ frame's display)." | |||
| 1381 | 1381 | ||
| 1382 | (defun display-screens (&optional display) | 1382 | (defun display-screens (&optional display) |
| 1383 | "Return the number of screens associated with DISPLAY. | 1383 | "Return the number of screens associated with DISPLAY. |
| 1384 | DISPLAY should be either a frame or a display name (a string). | ||
| 1384 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1385 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1385 | (let ((frame-type (framep-on-display display))) | 1386 | (let ((frame-type (framep-on-display display))) |
| 1386 | (cond | 1387 | (cond |
| @@ -1393,6 +1394,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1393 | 1394 | ||
| 1394 | (defun display-pixel-height (&optional display) | 1395 | (defun display-pixel-height (&optional display) |
| 1395 | "Return the height of DISPLAY's screen in pixels. | 1396 | "Return the height of DISPLAY's screen in pixels. |
| 1397 | DISPLAY can be a display name or a frame. | ||
| 1396 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | 1398 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1397 | 1399 | ||
| 1398 | For character terminals, each character counts as a single pixel. | 1400 | For character terminals, each character counts as a single pixel. |
| @@ -1412,6 +1414,7 @@ with DISPLAY. To get information for each physical monitor, use | |||
| 1412 | 1414 | ||
| 1413 | (defun display-pixel-width (&optional display) | 1415 | (defun display-pixel-width (&optional display) |
| 1414 | "Return the width of DISPLAY's screen in pixels. | 1416 | "Return the width of DISPLAY's screen in pixels. |
| 1417 | DISPLAY can be a display name or a frame. | ||
| 1415 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | 1418 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1416 | 1419 | ||
| 1417 | For character terminals, each character counts as a single pixel. | 1420 | For character terminals, each character counts as a single pixel. |
| @@ -1450,6 +1453,7 @@ not explicitly specified." | |||
| 1450 | (defun display-mm-height (&optional display) | 1453 | (defun display-mm-height (&optional display) |
| 1451 | "Return the height of DISPLAY's screen in millimeters. | 1454 | "Return the height of DISPLAY's screen in millimeters. |
| 1452 | If the information is unavailable, this function returns nil. | 1455 | If the information is unavailable, this function returns nil. |
| 1456 | DISPLAY can be a display name or a frame. | ||
| 1453 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | 1457 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1454 | 1458 | ||
| 1455 | You can override what the system thinks the result should be by | 1459 | You can override what the system thinks the result should be by |
| @@ -1470,6 +1474,7 @@ monitor, use `display-monitor-attributes-list'." | |||
| 1470 | (defun display-mm-width (&optional display) | 1474 | (defun display-mm-width (&optional display) |
| 1471 | "Return the width of DISPLAY's screen in millimeters. | 1475 | "Return the width of DISPLAY's screen in millimeters. |
| 1472 | If the information is unavailable, this function returns nil. | 1476 | If the information is unavailable, this function returns nil. |
| 1477 | DISPLAY can be a display name or a frame. | ||
| 1473 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | 1478 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1474 | 1479 | ||
| 1475 | You can override what the system thinks the result should be by | 1480 | You can override what the system thinks the result should be by |
| @@ -1493,6 +1498,7 @@ monitor, use `display-monitor-attributes-list'." | |||
| 1493 | "Return the backing store capability of DISPLAY's screen. | 1498 | "Return the backing store capability of DISPLAY's screen. |
| 1494 | The value may be `always', `when-mapped', `not-useful', or nil if | 1499 | The value may be `always', `when-mapped', `not-useful', or nil if |
| 1495 | the question is inapplicable to a certain kind of display. | 1500 | the question is inapplicable to a certain kind of display. |
| 1501 | DISPLAY can be a display name or a frame. | ||
| 1496 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1502 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1497 | (let ((frame-type (framep-on-display display))) | 1503 | (let ((frame-type (framep-on-display display))) |
| 1498 | (cond | 1504 | (cond |
| @@ -1505,6 +1511,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1505 | 1511 | ||
| 1506 | (defun display-save-under (&optional display) | 1512 | (defun display-save-under (&optional display) |
| 1507 | "Return non-nil if DISPLAY's screen supports the SaveUnder feature. | 1513 | "Return non-nil if DISPLAY's screen supports the SaveUnder feature. |
| 1514 | DISPLAY can be a display name or a frame. | ||
| 1508 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1515 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1509 | (let ((frame-type (framep-on-display display))) | 1516 | (let ((frame-type (framep-on-display display))) |
| 1510 | (cond | 1517 | (cond |
| @@ -1517,6 +1524,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1517 | 1524 | ||
| 1518 | (defun display-planes (&optional display) | 1525 | (defun display-planes (&optional display) |
| 1519 | "Return the number of planes supported by DISPLAY. | 1526 | "Return the number of planes supported by DISPLAY. |
| 1527 | DISPLAY can be a display name or a frame. | ||
| 1520 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1528 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1521 | (let ((frame-type (framep-on-display display))) | 1529 | (let ((frame-type (framep-on-display display))) |
| 1522 | (cond | 1530 | (cond |
| @@ -1531,6 +1539,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1531 | 1539 | ||
| 1532 | (defun display-color-cells (&optional display) | 1540 | (defun display-color-cells (&optional display) |
| 1533 | "Return the number of color cells supported by DISPLAY. | 1541 | "Return the number of color cells supported by DISPLAY. |
| 1542 | DISPLAY can be a display name or a frame. | ||
| 1534 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1543 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1535 | (let ((frame-type (framep-on-display display))) | 1544 | (let ((frame-type (framep-on-display display))) |
| 1536 | (cond | 1545 | (cond |
| @@ -1547,6 +1556,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1547 | "Return the visual class of DISPLAY. | 1556 | "Return the visual class of DISPLAY. |
| 1548 | The value is one of the symbols `static-gray', `gray-scale', | 1557 | The value is one of the symbols `static-gray', `gray-scale', |
| 1549 | `static-color', `pseudo-color', `true-color', or `direct-color'. | 1558 | `static-color', `pseudo-color', `true-color', or `direct-color'. |
| 1559 | DISPLAY can be a display name or a frame. | ||
| 1550 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." | 1560 | If DISPLAY is omitted or nil, it defaults to the selected frame's display." |
| 1551 | (let ((frame-type (framep-on-display display))) | 1561 | (let ((frame-type (framep-on-display display))) |
| 1552 | (cond | 1562 | (cond |
| @@ -1567,6 +1577,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." | |||
| 1567 | 1577 | ||
| 1568 | (defun display-monitor-attributes-list (&optional display) | 1578 | (defun display-monitor-attributes-list (&optional display) |
| 1569 | "Return a list of physical monitor attributes on DISPLAY. | 1579 | "Return a list of physical monitor attributes on DISPLAY. |
| 1580 | DISPLAY can be a display name, a terminal name, or a frame. | ||
| 1570 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | 1581 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1571 | Each element of the list represents the attributes of a physical | 1582 | Each element of the list represents the attributes of a physical |
| 1572 | monitor. The first element corresponds to the primary monitor. | 1583 | monitor. The first element corresponds to the primary monitor. |
| @@ -1576,14 +1587,16 @@ of attribute keys and values as follows: | |||
| 1576 | 1587 | ||
| 1577 | geometry -- Position and size in pixels in the form of (X Y WIDTH HEIGHT) | 1588 | geometry -- Position and size in pixels in the form of (X Y WIDTH HEIGHT) |
| 1578 | workarea -- Position and size of the work area in pixels in the | 1589 | workarea -- Position and size of the work area in pixels in the |
| 1579 | form of (X Y WIDTH HEIGHT) | 1590 | form of (X Y WIDTH HEIGHT); this excludes task bar etc. |
| 1580 | mm-size -- Width and height in millimeters in the form of | 1591 | mm-size -- Width and height in millimeters in the form of |
| 1581 | (WIDTH HEIGHT) | 1592 | (WIDTH HEIGHT) |
| 1582 | frames -- List of frames dominated by the physical monitor | 1593 | frames -- List of frames dominated by the physical monitor |
| 1583 | name (*) -- Name of the physical monitor as a string | 1594 | name (*) -- Name of the physical monitor as a string |
| 1584 | 1595 | ||
| 1585 | where X, Y, WIDTH, and HEIGHT are integers. Keys labeled | 1596 | where X, Y, WIDTH, and HEIGHT are integers, which might be negative |
| 1586 | with (*) are optional. | 1597 | for monitors other than the primary one. X and Y are coordinates |
| 1598 | of the top-left corner of the rectange. Keys labeled with (*) are | ||
| 1599 | optional. | ||
| 1587 | 1600 | ||
| 1588 | A frame is dominated by a physical monitor when either the | 1601 | A frame is dominated by a physical monitor when either the |
| 1589 | largest area of the frame resides in the monitor, or the monitor | 1602 | largest area of the frame resides in the monitor, or the monitor |