Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine if X recognized new monitors #43

Open
plazmakeks opened this issue Jun 27, 2018 · 1 comment
Open

Determine if X recognized new monitors #43

plazmakeks opened this issue Jun 27, 2018 · 1 comment

Comments

@plazmakeks
Copy link

Hi,

I got an issue:

I got a udev rule which launches a go routine when a monitor was connected/disconnected. That routine is using xgb. I configure the monitors depening on how they are (dis)connected. The udev rule works reliable in determining changes on the monitor setup. The problem is, that X or xgb needs some time to realize the change. Means: when my go routine is launched and checks for connected monitors it usually delivers the pre-plug/unplug state. I tried to wait for it with xgb.Sync but it didn't help. I tried to wait for events with xgb.Conn.WaitForEvent or xgb.Conn.PollForEvent but those never got me any events. Any recommendation how to solve that?

@plazmakeks plazmakeks changed the title Determine till X recognized new monitors Determine if X recognized new monitors Jun 27, 2018
@BurntSushi
Copy link
Owner

I have no idea, sorry. Your best bet is to find some software that does this already and look at its source code to see how they handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants