Add debugging function for showing monitor geometry
o9000 o9000
2 files changed,
15 insertions(+),
0 deletions(-)
M
src/server.c
→
src/server.c
@@ -364,6 +364,20 @@ server.monitor[0].names = 0;
} } +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);
M
src/server.h
→
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();