diff options
Diffstat (limited to 'Gui/wm')
-rw-r--r-- | Gui/wm/ws.c | 8 | ||||
-rw-r--r-- | Gui/wm/ws.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index 4922d8998a..b3c86a4b7b 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -130,12 +130,15 @@ int wsErrorHandler( Display * dpy,XErrorEvent * Event ) exit( 0 ); } -void wsXInit( void ) +void wsXInit( void* mDisplay ) { - char * DisplayName = ":0.0"; int eventbase; int errorbase; +if(mDisplay){ + wsDisplay=mDisplay; +} else { + char * DisplayName = ":0.0"; if ( getenv( "DISPLAY" ) ) DisplayName=getenv( "DISPLAY" ); wsDisplay=XOpenDisplay( DisplayName ); if ( !wsDisplay ) @@ -143,6 +146,7 @@ void wsXInit( void ) fprintf( stderr,"[ws] couldn't open the display !\n" ); exit( 0 ); } +} if ( !XShmQueryExtension( wsDisplay ) ) { diff --git a/Gui/wm/ws.h b/Gui/wm/ws.h index be10ff0b0d..9436dd0866 100644 --- a/Gui/wm/ws.h +++ b/Gui/wm/ws.h @@ -180,7 +180,7 @@ extern int wsUseDGA; extern unsigned long wsKeyTable[512]; extern void wsXDone( void ); -extern void wsXInit( void ); +extern void wsXInit( void* disp ); extern int wsGetDepthOnScreen( void ); |