aboutsummaryrefslogtreecommitdiff
path: root/i3-nagbar
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2019-10-14 12:25:33 +0300
committerOrestis Floros <orestisflo@gmail.com>2019-10-14 12:26:04 +0300
commita3f94783e5956c9ca5da5af09697fe51e75deb05 (patch)
tree8dbdb3df07938e12a209a6ac631d2c108bcc6737 /i3-nagbar
parentb1723f0549c38eaa7fcb2a62ec3d4d4749531657 (diff)
downloadi3-a3f94783e5956c9ca5da5af09697fe51e75deb05.tar.gz
i3-a3f94783e5956c9ca5da5af09697fe51e75deb05.zip
i3-nagbar: get_window_position: Improve logging
Diffstat (limited to 'i3-nagbar')
-rw-r--r--i3-nagbar/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/i3-nagbar/main.c b/i3-nagbar/main.c
index 49c9d931..e2c6e516 100644
--- a/i3-nagbar/main.c
+++ b/i3-nagbar/main.c
@@ -295,15 +295,19 @@ static xcb_rectangle_t get_window_position(void) {
xcb_randr_get_output_info_reply(conn,
xcb_randr_get_output_info(conn, primary->output, res->config_timestamp),
NULL);
- if (output == NULL || output->crtc == XCB_NONE)
+ if (output == NULL || output->crtc == XCB_NONE) {
+ LOG("Could not query primary screen.\n");
goto free_resources;
+ }
xcb_randr_get_crtc_info_reply_t *crtc =
xcb_randr_get_crtc_info_reply(conn,
xcb_randr_get_crtc_info(conn, output->crtc, res->config_timestamp),
NULL);
- if (crtc == NULL)
+ if (crtc == NULL) {
+ LOG("Could not get CRTC.\n");
goto free_resources;
+ }
LOG("Found primary output on position x = %i / y = %i / w = %i / h = %i.\n",
crtc->x, crtc->y, crtc->width, crtc->height);