diff options
Diffstat (limited to 'src/display.c')
| -rw-r--r-- | src/display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/display.c b/src/display.c index 0e2754a..2c8519f 100644 --- a/src/display.c +++ b/src/display.c @@ -14,7 +14,7 @@ void display_init(display_t *display) display->connection = xcb_connect(NULL, &preferred_screen); assert(display->connection != NULL && !xcb_connection_has_error(display->connection)); - log_value_debug("Connected to xcb" + log_value_debug("Connected to xcb", "i:preferred_screen", preferred_screen); xcb_screen_iterator_t iter = xcb_setup_roots_iterator(xcb_get_setup(display->connection)); @@ -46,9 +46,12 @@ void display_init(display_t *display) display->info_reply = xcb_randr_get_screen_info_reply(display->connection, cookie, &error); assert(error == NULL); + // TODO: Listen to xrandr notify with select input + // and select the monitor by name + display->screen_size = xcb_randr_get_screen_info_sizes(display->info_reply); assert(display->screen_size != NULL); - log_value_info("Display size", + log_value_info("Display information", "i:width", display->screen_size->width, "i:height", display->screen_size->height); |
