简体   繁体   English

Xlib多种显示支持

[英]Xlib multiple display support

I want to get display info via Xlib, specifically: 我想通过Xlib获取显示信息,特别是:

  • iterate displays 迭代显示
  • get the screen rectangle for each display (relative to the virtual screen - does X11 have the concept of a virtual screen on which physical screens are mapped, similar to Windows and OSX?) 获取每个显示器的屏幕矩形(相对于虚拟屏幕-X11是否具有映射物理屏幕的虚拟屏幕的概念,类似于Windows和OSX?)
  • get the client area rectangle (so screen minus taskbar etc.) for each display 获取每个显示的客户区域矩形(因此屏幕减去任务栏等)

Thanks. 谢谢。


Half answer: using XineramaQueryScreens() I was able to enumerate displays and get their coordinates in the virtual screen and their sizes. 一半答案:使用XineramaQueryScreens()我能够枚举显示并获得它们在虚拟屏幕中的坐标及其大小。 Now how do I get the desktop size, ie the size that the windows maximize to? 现在如何获取桌面大小,即窗口最大化到的大小?

您需要阅读_NET_DESKTOP_GEOMETRY (也可能是_NET_DESKTOP_VIEWPORT和_NET_WORKAREA)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM