diff options
Diffstat (limited to '')
-rw-r--r-- | src/blueshift_iccprofile.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/blueshift_iccprofile.c b/src/blueshift_iccprofile.c index fb2aa7b..b96e682 100644 --- a/src/blueshift_iccprofile.c +++ b/src/blueshift_iccprofile.c @@ -45,14 +45,12 @@ static xcb_generic_error_t* error; */ int main(int argc, char** argv) { + char* display = NULL; xcb_screen_iterator_t iter; int screen_count; xcb_screen_t* screens; int screen_i; - (void) argc; - (void) argv; - /* To get all ICC profiles, which are binary encoded, we have to connect to the display and for each screen look for @@ -71,8 +69,12 @@ int main(int argc, char** argv) /* This acquires a connection to the X display indicated by the DISPLAY - environ variable. */ - connection = xcb_connect(NULL, NULL); + environ variable, or as indicated + by the first command line argument + if existent. */ + if (argc > 1) + display = *(argv + 1); + connection = xcb_connect(display, NULL); /* Get screen information */ |