http://incise.org/tinywm.html
tinywm shows a basic event-handling situation.
I was thinking to create a union of all eventtypes, and initialize the right one.
anyone done something similar? any other ideas how to lift the concept of events to c++ objects?
the task: write a class XEventpp that registers button-notification and receives events returning a pointer to the class which is capable of handling the event. use -std=c++11 to make the code short. preferably there should be no use of the heap or c++ libs. i.e. make it tiny. sourcecode can be big, but memory usage and program-size not. of course it must be easy to extend, unlike tinywm...
yes, that's the old way, fit for actually handling multiple windows.
however, a windowmanager knows only 2 kinds of windows: root and subwindows.
so I wrote something like this: