what are the wayland's APIS can get system resolution and dpi

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 26 23:37:44 PDT 2014


On Fri, 27 Jun 2014 10:32:59 +0800
"Jacky (ZhiJun) Ni" <jni at telecomsys.com> wrote:

> Hi all,
> 
>          Is there anyone knows the APIS which can get system resolution
> and dpi?

See
http://wayland.freedesktop.org/docs/html/protocol-spec-interface-wl_output.html

You get the physical size of the output, and are notified about the
current permanent video mode initially and whenever it changes.

Please, unless you are already aware that physical dimensions are
often a lie, do also read "why you don't actually want dpi" at
http://web.archive.org/web/20120102153021/http://www.fooishbar.org/blog

For HiDPI use cases, you will be interested in wl_output::scale event
instead of the output physical size vs. resolution.


Thanks,
pq


More information about the wayland-devel mailing list