Closed iamsubhranil closed 4 years ago
Can't really test the original use-case since my events act weird. But it does inhibit the issue even when reload_on_display_configure
is true.
Changing line 494 to
if((xavaRREventBase + RRScreenChangeNotify) && p.reloadOnDC) {
printf("Display change detected - Restarting...\n");
return 1;
}
fixes that.
I think this is the correct solution while @nikp123 looks at why the events still get through while the config value is false.
Thanks for contributing, however, it's supposed to be a plus. I've used xev source code as a base. The mistake was that I was supposed to write: if(xavaRREventBase + RRScreenChangeNotify == xavaXEvent.type)
My bad. And it somehow worked, despite being completely wrong.
Changing line 494 to
if((xavaRREventBase + RRScreenChangeNotify) && p.reloadOnDC) { printf("Display change detected - Restarting...\n"); return 1; }
fixes that.
It doesn't matter if you check the flag, since the flag disables the code that enables the RRScreenChangeNotify event.
This fixes #20 , but I don't have multiple monitors, so let me know if it works for the original usecase.