How to programmatically get the resolution of a window and that of the system in Linux?

前端 未结 4 486
庸人自扰
庸人自扰 2021-02-06 00:06

I\'m trying to get the resolution of the screen as well as the resolution of a specific window (in which a program is running) on Linux system. I don\'t need to modify the resol

4条回答
  •  悲哀的现实
    2021-02-06 00:42

    The command line tool xdpyinfo provides this information for you; to do it programmatically you need to to use Xlib, as Andrew Y explains.

提交回复
热议问题