aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2013-07-04 19:25:54 +0900
committerYAMAMOTO Mitsuharu2013-07-04 19:25:54 +0900
commitcf13177e99d20e8db632ad6ed5defd3818f7d901 (patch)
tree8cbc52eb53375dfbb2eb4eba3dff92453385e186 /lisp
parent46e4f8217a5379bfab2a0f9c78e2a6a23a9d3cf1 (diff)
downloademacs-cf13177e99d20e8db632ad6ed5defd3818f7d901.tar.gz
emacs-cf13177e99d20e8db632ad6ed5defd3818f7d901.zip
Add multi-monitor support on W32.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/frame.el28
2 files changed, 32 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7921f77ca05..7bdd21bc3e4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * frame.el (display-pixel-height, display-pixel-width)
4 (display-mm-height, display-mm-width): Mention behavior on
5 multi-monitor setups in docstrings.
6 (w32-display-monitor-attributes-list): Declare function.
7 (display-monitor-attributes-list): Use it.
8
12013-07-04 Michael Albinus <michael.albinus@gmx.de> 92013-07-04 Michael Albinus <michael.albinus@gmx.de>
2 10
3 * filenotify.el: New package. 11 * filenotify.el: New package.
diff --git a/lisp/frame.el b/lisp/frame.el
index 0f8fc523a1b..3ac24a509a0 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1365,7 +1365,11 @@ frame's display)."
1365 1365
1366(defun display-pixel-height (&optional display) 1366(defun display-pixel-height (&optional display)
1367 "Return the height of DISPLAY's screen in pixels. 1367 "Return the height of DISPLAY's screen in pixels.
1368For character terminals, each character counts as a single pixel." 1368For character terminals, each character counts as a single pixel.
1369For graphical terminals, note that on \"multi-monitor\" setups this
1370refers to the pixel height for all physical monitors associated
1371with DISPLAY. To get information for each physical monitor, use
1372`display-monitor-attributes-list'."
1369 (let ((frame-type (framep-on-display display))) 1373 (let ((frame-type (framep-on-display display)))
1370 (cond 1374 (cond
1371 ((memq frame-type '(x w32 ns)) 1375 ((memq frame-type '(x w32 ns))
@@ -1377,7 +1381,11 @@ For character terminals, each character counts as a single pixel."
1377 1381
1378(defun display-pixel-width (&optional display) 1382(defun display-pixel-width (&optional display)
1379 "Return the width of DISPLAY's screen in pixels. 1383 "Return the width of DISPLAY's screen in pixels.
1380For character terminals, each character counts as a single pixel." 1384For character terminals, each character counts as a single pixel.
1385For graphical terminals, note that on \"multi-monitor\" setups this
1386refers to the pixel width for all physical monitors associated
1387with DISPLAY. To get information for each physical monitor, use
1388`display-monitor-attributes-list'."
1381 (let ((frame-type (framep-on-display display))) 1389 (let ((frame-type (framep-on-display display)))
1382 (cond 1390 (cond
1383 ((memq frame-type '(x w32 ns)) 1391 ((memq frame-type '(x w32 ns))
@@ -1408,7 +1416,11 @@ displays not explicitly specified."
1408(defun display-mm-height (&optional display) 1416(defun display-mm-height (&optional display)
1409 "Return the height of DISPLAY's screen in millimeters. 1417 "Return the height of DISPLAY's screen in millimeters.
1410System values can be overridden by `display-mm-dimensions-alist'. 1418System values can be overridden by `display-mm-dimensions-alist'.
1411If the information is unavailable, value is nil." 1419If the information is unavailable, value is nil.
1420For graphical terminals, note that on \"multi-monitor\" setups this
1421refers to the height in millimeters for all physical monitors
1422associated with DISPLAY. To get information for each physical
1423monitor, use `display-monitor-attributes-list'."
1412 (and (memq (framep-on-display display) '(x w32 ns)) 1424 (and (memq (framep-on-display display) '(x w32 ns))
1413 (or (cddr (assoc (or display (frame-parameter nil 'display)) 1425 (or (cddr (assoc (or display (frame-parameter nil 'display))
1414 display-mm-dimensions-alist)) 1426 display-mm-dimensions-alist))
@@ -1420,7 +1432,11 @@ If the information is unavailable, value is nil."
1420(defun display-mm-width (&optional display) 1432(defun display-mm-width (&optional display)
1421 "Return the width of DISPLAY's screen in millimeters. 1433 "Return the width of DISPLAY's screen in millimeters.
1422System values can be overridden by `display-mm-dimensions-alist'. 1434System values can be overridden by `display-mm-dimensions-alist'.
1423If the information is unavailable, value is nil." 1435If the information is unavailable, value is nil.
1436For graphical terminals, note that on \"multi-monitor\" setups this
1437refers to the width in millimeters for all physical monitors
1438associated with DISPLAY. To get information for each physical
1439monitor, use `display-monitor-attributes-list'."
1424 (and (memq (framep-on-display display) '(x w32 ns)) 1440 (and (memq (framep-on-display display) '(x w32 ns))
1425 (or (cadr (assoc (or display (frame-parameter nil 'display)) 1441 (or (cadr (assoc (or display (frame-parameter nil 'display))
1426 display-mm-dimensions-alist)) 1442 display-mm-dimensions-alist))
@@ -1495,6 +1511,8 @@ The value is one of the symbols `static-gray', `gray-scale',
1495 1511
1496(declare-function x-display-monitor-attributes-list "xfns.c" 1512(declare-function x-display-monitor-attributes-list "xfns.c"
1497 (&optional terminal)) 1513 (&optional terminal))
1514(declare-function w32-display-monitor-attributes-list "w32fns.c"
1515 (&optional display))
1498(declare-function ns-display-monitor-attributes-list "nsfns.m" 1516(declare-function ns-display-monitor-attributes-list "nsfns.m"
1499 (&optional terminal)) 1517 (&optional terminal))
1500 1518
@@ -1530,6 +1548,8 @@ monitors."
1530 (cond 1548 (cond
1531 ((eq frame-type 'x) 1549 ((eq frame-type 'x)
1532 (x-display-monitor-attributes-list display)) 1550 (x-display-monitor-attributes-list display))
1551 ((eq frame-type 'w32)
1552 (w32-display-monitor-attributes-list display))
1533 ((eq frame-type 'ns) 1553 ((eq frame-type 'ns)
1534 (ns-display-monitor-attributes-list display)) 1554 (ns-display-monitor-attributes-list display))
1535 (t 1555 (t