diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-03 01:06:47 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-03 01:06:47 +0200 |
commit | b51821368c23ee017317ae9fe16e797662e1a1ba (patch) | |
tree | 219091df543ea40bdb6a86498fad005a7ad4685f /src/blueshift_idcrtc.c | |
parent | move some issues from 'future stuff' into the issue tracker on github (diff) | |
download | blueshift-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 'src/blueshift_idcrtc.c')
-rw-r--r-- | src/blueshift_idcrtc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/blueshift_idcrtc.c b/src/blueshift_idcrtc.c index 67ead56..c1f73b6 100644 --- a/src/blueshift_idcrtc.c +++ b/src/blueshift_idcrtc.c @@ -58,6 +58,7 @@ static xcb_generic_error_t* error; */ int main(int argc, char** argv) { + char* display = NULL; xcb_randr_query_version_cookie_t version_cookie; xcb_randr_query_version_reply_t* randr_version; xcb_screen_iterator_t iter; @@ -66,16 +67,17 @@ int main(int argc, char** argv) int screen_i; int i; - (void) argc; - (void) argv; - /* Get X connection */ /* 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); /* Check RandR protocol version */ |