Add debugging function for showing monitor geometry
This commit is contained in:
parent
7ffc220891
commit
e5cd73f4a7
2 changed files with 15 additions and 0 deletions
14
src/server.c
14
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()
|
int server_get_number_of_desktops()
|
||||||
{
|
{
|
||||||
return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL);
|
return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL);
|
||||||
|
|
|
@ -153,6 +153,7 @@ void get_root_pixmap();
|
||||||
|
|
||||||
// detect monitors and desktops
|
// detect monitors and desktops
|
||||||
void get_monitors();
|
void get_monitors();
|
||||||
|
void print_monitors();
|
||||||
void get_desktops();
|
void get_desktops();
|
||||||
int server_get_number_of_desktops();
|
int server_get_number_of_desktops();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue