From e6b959c5ee2069a72bac05e9a24896cc0c6739f9 Mon Sep 17 00:00:00 2001 From: Simon Hofmann Date: Fri, 4 Sep 2020 12:45:06 +0200 Subject: [PATCH] (#27) Modified XGetMainDisplay to default to instead of ':0.0' --- src/linux/xdisplay.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/linux/xdisplay.c b/src/linux/xdisplay.c index 72155ab..74f4507 100644 --- a/src/linux/xdisplay.c +++ b/src/linux/xdisplay.c @@ -5,7 +5,7 @@ static Display *mainDisplay = NULL; static int registered = 0; -static char *displayName = ":0.0"; +static char *displayName = NULL; static int hasDisplayNameChanged = 0; Display *XGetMainDisplay(void) @@ -20,11 +20,6 @@ Display *XGetMainDisplay(void) /* First try the user set displayName */ mainDisplay = XOpenDisplay(displayName); - /* Then try using environment variable DISPLAY */ - if (mainDisplay == NULL) { - mainDisplay = XOpenDisplay(NULL); - } - if (mainDisplay == NULL) { fputs("Could not open main display\n", stderr); } else if (!registered) {