summaryrefslogtreecommitdiffstats
path: root/src/blueshift_iccprofile.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-03 01:06:47 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-03 01:06:47 +0200
commitb51821368c23ee017317ae9fe16e797662e1a1ba (patch)
tree219091df543ea40bdb6a86498fad005a7ad4685f /src/blueshift_iccprofile.c
parentmove some issues from 'future stuff' into the issue tracker on github (diff)
downloadblueshift-b51821368c23ee017317ae9fe16e797662e1a1ba.tar.gz
blueshift-b51821368c23ee017317ae9fe16e797662e1a1ba.tar.bz2
blueshift-b51821368c23ee017317ae9fe16e797662e1a1ba.tar.xz
add multi-display support when listing moditors and getting icc profile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/blueshift_iccprofile.c12
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 */