Checking when SCREEN_RESOURCES property is updated

Dave Howorth xorg at howorth.org.uk
Sun Jan 9 12:44:06 UTC 2022


On Fri, 07 Jan 2022 08:29:50 +0000
Xaro <cat at heaven.ist> wrote:

> Hello,
> 
> I have an application that reads some Xresources file configs to
> update its theme.
> 
> So i use XOpenDisplay, XResourceManagerString and
> XrmGetStringDatabase from libx11 to get the fields that i want.
> 
> My problem is when the user update the Xresources file then run `xrdb
> ~/.Xresources` my version of the database is not updated, and i dont
> know how to detect such an event.
> 
> I can retrieve the theme for example every 10 seconds but that is too
> much. Is there a way or a blocking function I can use to detect if
> the SCREEN_RESOURCES property for a screen has been updated so that i
> can retrieve it and update the application theme?
> 
> I'm not very knowledgeable about C or X11 in general but I'm trying
> my best to learn, couldn't find what i want in the documentation.
> 
> If someone knows the direction i should be looking for I will really
> appreciate it.  

Probably worth looking at man inotify (7)

> Thanks.


More information about the xorg mailing list