I’m using the Allegro5 API to create my window and manage it. It allows me access to the XWindow which it creates with XCreateWindow
I have access to d->window but that’s about it. From this, is there a way I could interact with the XEvents sent to this window? I want to implement clipboard functionality. I’m just not sure how I can deal with XSelection events.
You need to create the xevent loop, and to handle specific xevents. Here is a xlib hello world example, and that is how you can do it.
The example is copied from here :
To build, create a Makefile :