Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Natively in X11? No. Even with Xrandr. It is no. But you can obtain the display size and then draw things differently using OpenGL but now you're reinventing the display protocol in your drawing engine (which is what GLX is after all but I digress). You need to onboard every toolkit to your protocol.


Is this different to Wayland?


Yes. Wayland is designed to be flexible of what does the drawing and where (currently only shared memory and EGL surfaces are implemented / supported). So it needs to define monitors as abstract concepts. They are called outputs and the client can query the size directly in Wayland protocol without needing display drivers or OpenGL.

However, there is no common way of handling different custom DPIs / scaling in the core Wayland protocol. Fractional scaling is implemented optionally by the client and the server and both need to opt-in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: