In C I can open display, get a screen pointer with
screen = XScreenOfDisplay (display, XDefaultScreen
(display)), get the same display pointer with
XDisplayOfScreen(screen), and get the same screen
pointer again by calling XScreenOfDisplay (display,
XDefaultScreen (display)) second time.
Since I did not find any word about releasing the
pointer I get this way in the Xlib documentation it
should always behave like this.
In xlib_wrap/ruby I get diffrerent ojects and there is
no way to tell the objects refer to the same Xlib object.
This also makes it harder to extend the objects to add
some intelligence because I cannot subclass them
directly (I would have different objects and instance
variable sets for the same thing). Instead, I'd have
to remember from which X wrapper object a new object is
created so that I could track the single Display object
representing its connection.