I'm trying to write a program that would detect external monitors being plugged in and automatically enable and configure them through Xlib. I know that there is XRandr extension that allows this. My question is, how do I enable receiving XRandr events to my application? What event mask should I use? I know that xev app is able to do this.
相关问题
- X11 forwarding affects Java Swing GUI dropdowns -
- X11 non-clipped child windows
- Using Python GTK GUI front end with C++ backend
- Saving xlib XImage to PNG
- R script using X11 window only opens for a second
相关文章
- Tracking XWindow Protocol
- How do I map an X11 keysym to a Unicode character?
- Sending Keystrokes to a X Window
- XLib Window Name Problems
- Desktop integrated application (desktop widget lik
- With X11, how can I get the user's time “away
- Programmatically launching standalone Adobe flashp
- Embedding QWidget into X11 Window
Xev's source code:
Or:
git clone git://anongit.freedesktop.org/xorg/app/xev
For the second part, I issue the configuration directly to nvidia-settings.
I've cobbled together the first part from parts that I was able to find so that my HTPC system which is hooked to a TV that is horribly overscanned can reset the screen environment when the TV is turned on.
I'd be interested to see the pure C port of my efforts...