diff --git a/src/server.c b/src/server.c index a0ae559..d73f1ee 100644 --- a/src/server.c +++ b/src/server.c @@ -364,6 +364,20 @@ next: } } +void print_monitors() +{ + fprintf(stderr, "Number of monitors: %d\n", server.nb_monitor); + int i; + for (i = 0; i < server.nb_monitor; i++) { + fprintf(stderr, "Monitor %d: x = %d, y = %d, w = %d, h = %d\n", + i+1, + server.monitor[i].x, + server.monitor[i].y, + server.monitor[i].width, + server.monitor[i].height); + } +} + int server_get_number_of_desktops() { return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL); diff --git a/src/server.h b/src/server.h index b4f11d1..5cf3a1d 100644 --- a/src/server.h +++ b/src/server.h @@ -153,6 +153,7 @@ void get_root_pixmap(); // detect monitors and desktops void get_monitors(); +void print_monitors(); void get_desktops(); int server_get_number_of_desktops();