Renamed display to gdi_display where it is used for GDI operations, to
allow supporting multiple X connections.

diff --git a/include/x11drv.h b/include/x11drv.h
index b1d654b..0006cef 100644
--- a/include/x11drv.h
+++ b/include/x11drv.h
@@ -170,14 +170,12 @@
 /* X11 driver internal functions */
 
 extern BOOL X11DRV_BITMAP_Init(void);
-extern BOOL X11DRV_BRUSH_Init(void);
-extern BOOL X11DRV_DIB_Init(void);
 extern BOOL X11DRV_FONT_Init( struct tagDeviceCaps* );
 extern BOOL X11DRV_OBM_Init(void);
 
 struct tagBITMAPOBJ;
 extern XImage *X11DRV_BITMAP_GetXImage( const struct tagBITMAPOBJ *bmp );
-extern int X11DRV_DIB_GetXImageWidthBytes( int width, int depth );
+extern XImage *X11DRV_DIB_CreateXImage( int width, int height, int depth );
 extern HBITMAP X11DRV_BITMAP_CreateBitmapHeaderFromPixmap(Pixmap pixmap);
 extern HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc, BOOL bDeletePixmap);
 extern HBITMAP X11DRV_BITMAP_CreateBitmapFromPixmap(Pixmap pixmap, BOOL bDeletePixmap);
@@ -194,14 +192,6 @@
 
 extern void _XInitImageFuncPtrs(XImage *);
 
-#define XCREATEIMAGE(image,width,height,bpp) \
-{ \
-    int width_bytes = X11DRV_DIB_GetXImageWidthBytes( (width), (bpp) ); \
-    (image) = TSXCreateImage(display, X11DRV_GetVisual(), \
-                           (bpp), ZPixmap, 0, calloc( (height), width_bytes ),\
-                           (width), (height), 32, width_bytes ); \
-}
-
 /* exported dib functions for now */
 
 /* Additional info for DIB section objects */
@@ -277,9 +267,11 @@
  * X11 GDI driver
  */
 
-BOOL X11DRV_GDI_Initialize(void);
+BOOL X11DRV_GDI_Initialize( Display *display );
 void X11DRV_GDI_Finalize(void);
 
+extern Display *gdi_display;  /* display to use for all GDI functions */
+
 /* X11 GDI palette driver */
 
 #define X11DRV_PALETTE_FIXED    0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
@@ -395,11 +387,6 @@
 extern void X11DRV_WND_SetGravity(struct tagWND* wndPtr, int value );
 extern BOOL X11DRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
 
-extern int X11DRV_EVENT_PrepareShmCompletion( Drawable dw );
-extern void X11DRV_EVENT_WaitShmCompletion( int compl );
-extern void X11DRV_EVENT_WaitShmCompletions( Drawable dw );
-extern void X11DRV_EVENT_WaitReplaceShmCompletion( int *compl, Drawable dw );
-
 extern void X11DRV_SetFocus( HWND hwnd );
 
 #endif  /* __WINE_X11DRV_H */