Add debugging function for showing monitor geometry

This commit is contained in:
o9000 2015-08-01 08:25:17 +02:00
parent 7ffc220891
commit e5cd73f4a7
2 changed files with 15 additions and 0 deletions

View file

@ -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);

View file

@ -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();