all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* x-display-pixel-width/height inconsistency
@ 2013-03-19  0:39 YAMAMOTO Mitsuharu
  2013-03-19  1:34 ` Leo Liu
  2013-03-19 22:25 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 97+ messages in thread
From: YAMAMOTO Mitsuharu @ 2013-03-19  0:39 UTC (permalink / raw)
  To: emacs-devel

There is an inconsistency about the behavior of
x-display-pixel-width/height among multiple platforms under
multi-monitor environments.

The elisp info nodes "Multiple Terminals" and "Display Feature
Testing" say:

  ...

     On some "multi-monitor" setups, a single X display outputs to more
  than one physical monitor.  Currently, there is no way for Emacs to
  distinguish between the different physical monitors.

  ...

   -- Function: display-pixel-height &optional display
       This function returns the height of the screen in pixels.  On a
       character terminal, it gives the height in characters.

       For graphical terminals, note that on "multi-monitor" setups this
       refers to the pixel width for all physical monitors associated with
       DISPLAY.  *Note Multiple Terminals::.

   -- Function: display-pixel-width &optional display
       This function returns the width of the screen in pixels.  On a
       character terminal, it gives the width in characters.

       For graphical terminals, note that on "multi-monitor" setups this
       refers to the pixel width for all physical monitors associated with
       DISPLAY.  *Note Multiple Terminals::.

But the actual return value is different among the platforms:

  * X11 and Mac port: Dimension for all physical monitors, as
    documented above.

  * NS port: Dimension of some particular physical monitor determined
    by the argument.

  * W32 port: Dimension of the primary monitor. (Not actually tested,
    but guessed from the code and API documentations.)

I think these functions should behave consistently among multiple
platforms (probably in line with X11).

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp



^ permalink raw reply	[flat|nested] 97+ messages in thread
* Re: x-display-pixel-width/height inconsistency
@ 2013-03-21  0:58 grischka
  2013-03-21  1:05 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 97+ messages in thread
From: grischka @ 2013-03-21  0:58 UTC (permalink / raw)
  To: mituharu; +Cc: emacs-devel

The DC has nothing to do with monitors because monitors are just
different coordinates on the same (virtual) screen. (Obviously
since you can drag the window between monitors, even such that
it's partially on two monitors at the same time.)

To get the the size of the monitor where your window is (mostly)
on you can use:

     MONITORINFO mi;
     HMONITOR hMon;
     RECT s;

     hmon = MonitorFromWindow(your_hwnd, MONITOR_DEFAULTTONEAREST);
     mi.cbSize = sizeof(mi);
     if (GetMonitorInfoA(hMon, &mi)) {
         s = mi.rcMonitor;  // entire screen, or
         s = mi.rcWork; // without taskbar
     }

--- gr



^ permalink raw reply	[flat|nested] 97+ messages in thread

end of thread, other threads:[~2013-07-06 19:25 UTC | newest]

Thread overview: 97+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19  0:39 x-display-pixel-width/height inconsistency YAMAMOTO Mitsuharu
2013-03-19  1:34 ` Leo Liu
2013-03-19  4:54   ` Xue Fuqiao
2013-03-19 15:41     ` Drew Adams
2013-03-19 15:51       ` Leo Liu
2013-03-19 15:58         ` Drew Adams
2013-03-20  0:55           ` Leo Liu
2013-03-19 22:25 ` YAMAMOTO Mitsuharu
2013-03-19 23:15   ` Dmitry Gutov
2013-03-19 23:52     ` YAMAMOTO Mitsuharu
2013-03-20  0:12       ` Dmitry Gutov
2013-03-20  0:20         ` YAMAMOTO Mitsuharu
2013-03-20  1:41           ` Dmitry Gutov
2013-03-20  3:58             ` YAMAMOTO Mitsuharu
2013-03-20 14:05               ` Dmitry Gutov
2013-03-20 23:28                 ` YAMAMOTO Mitsuharu
2013-03-21  1:27                   ` Dmitry Gutov
2013-03-21  1:51                     ` YAMAMOTO Mitsuharu
2013-03-21  2:43                       ` Dmitry Gutov
2013-03-21  3:47                         ` YAMAMOTO Mitsuharu
2013-03-21  4:22                           ` YAMAMOTO Mitsuharu
  -- strict thread matches above, loose matches on Subject: below --
2013-03-21  0:58 grischka
2013-03-21  1:05 ` YAMAMOTO Mitsuharu
2013-03-21  1:09   ` grischka
2013-03-21  1:44     ` YAMAMOTO Mitsuharu
2013-03-21 23:29       ` YAMAMOTO Mitsuharu
2013-03-22 10:33         ` Eli Zaretskii
2013-03-23  0:32           ` YAMAMOTO Mitsuharu
2013-03-23  6:15             ` Eli Zaretskii
2013-03-23 13:35               ` Jan Djärv
2013-03-23 23:58               ` YAMAMOTO Mitsuharu
2013-03-24  3:53                 ` Eli Zaretskii
2013-03-24  4:36                   ` YAMAMOTO Mitsuharu
2013-03-24 16:19                     ` Eli Zaretskii
2013-04-27  5:13                     ` YAMAMOTO Mitsuharu
2013-04-27  8:04                       ` Jan Djärv
2013-04-28  1:40                         ` YAMAMOTO Mitsuharu
2013-04-28 17:16                           ` Jan D.
2013-04-29  2:27                             ` YAMAMOTO Mitsuharu
2013-04-29  2:42                               ` YAMAMOTO Mitsuharu
2013-05-01  9:58                               ` Jan Djärv
2013-05-02  4:09                                 ` YAMAMOTO Mitsuharu
2013-05-06  1:04                                   ` YAMAMOTO Mitsuharu
2013-05-06  1:55                                     ` Stefan Monnier
2013-05-06  6:15                                       ` YAMAMOTO Mitsuharu
2013-05-06 13:37                                         ` Stefan Monnier
2013-05-08 10:46                                         ` YAMAMOTO Mitsuharu
2013-05-08 11:24                                           ` YAMAMOTO Mitsuharu
2013-05-08 17:41                                           ` Eli Zaretskii
2013-05-09  0:09                                             ` YAMAMOTO Mitsuharu
2013-05-09  1:52                                               ` Glenn Morris
2013-05-09  3:19                                                 ` YAMAMOTO Mitsuharu
2013-05-09  6:27                                                   ` Glenn Morris
2013-05-09  2:53                                               ` Eli Zaretskii
2013-05-09  8:14                                               ` Jan Djärv
2013-05-09  8:43                                                 ` YAMAMOTO Mitsuharu
2013-05-09 15:18                                                   ` Jan Djärv
2013-05-09 20:03                                               ` Eli Zaretskii
2013-05-09 21:28                                                 ` Stefan Monnier
2013-05-10  6:00                                                 ` YAMAMOTO Mitsuharu
2013-05-10  6:05                                                   ` YAMAMOTO Mitsuharu
2013-05-10  7:06                                                   ` Eli Zaretskii
2013-05-10  7:47                                                     ` YAMAMOTO Mitsuharu
2013-05-10  8:41                                                       ` Eli Zaretskii
2013-05-10  8:55                                                         ` YAMAMOTO Mitsuharu
2013-05-10  9:15                                                           ` Eli Zaretskii
2013-05-10  9:27                                                             ` YAMAMOTO Mitsuharu
2013-05-14 10:39                                                               ` YAMAMOTO Mitsuharu
2013-07-01  6:49                                                                 ` martin rudalics
2013-07-02  1:30                                                                   ` YAMAMOTO Mitsuharu
2013-07-02 10:38                                                                     ` martin rudalics
2013-07-02 10:53                                                                       ` Juanma Barranquero
2013-07-02 13:11                                                                         ` martin rudalics
2013-07-02 14:05                                                                           ` Juanma Barranquero
2013-07-03  9:27                                                                             ` martin rudalics
2013-07-03 10:49                                                                               ` Juanma Barranquero
2013-07-03 12:44                                                                                 ` martin rudalics
2013-07-03 13:43                                                                                   ` Juanma Barranquero
2013-07-04  9:34                                                                                     ` martin rudalics
     [not found]                                                                                       ` <5987E3>
2013-07-04 22:32                                                                                       ` Juanma Barranquero
2013-07-05  7:44                                                                                         ` martin rudalics
2013-07-05  9:32                                                                                           ` Juanma Barranquero
2013-07-05  9:34                                                                                         ` Jan Djärv
2013-07-05  9:41                                                                                           ` Juanma Barranquero
2013-07-05 11:25                                                                                             ` Jan Djärv
2013-07-05 11:56                                                                                               ` Juanma Barranquero
2013-07-05 12:12                                                                                                 ` Jan Djärv
2013-07-05 12:16                                                                                                   ` Juanma Barranquero
2013-07-05 15:30                                                                                                     ` Drew Adams
2013-07-05 15:53                                                                                                       ` Juanma Barranquero
2013-07-05 16:58                                                                                                         ` Drew Adams
2013-07-06 14:48                                                                                                           ` Juanma Barranquero
2013-07-06 19:25                                                                                                             ` Drew Adams
2013-07-05 15:27                                                                                                   ` Drew Adams
2013-07-04 10:28                                                                                     ` YAMAMOTO Mitsuharu
2013-05-10  7:44                                                   ` Jan Djärv
2013-04-28  1:48                       ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.