- int xscreen = DefaultScreen( (Display*)xdisplay );
- Window xroot = RootWindow( (Display*)xdisplay, xscreen );
- Visual* xvisual = DefaultVisual( xdisplay, xscreen );
+ Display * const dpy = (Display *)xdisplay;
+
+ int xscreen = DefaultScreen( dpy );
+ Window xroot = RootWindow( dpy, xscreen );
+ Visual* xvisual = DefaultVisual( dpy, xscreen );