Revert "taskbar: Add logging for window_get_monitor()"

This reverts commit 7162c5dea1.
This commit is contained in:
o9000 2015-07-30 22:56:01 +02:00
parent 9624b5d558
commit 4e3989f9f5
4 changed files with 4 additions and 39 deletions

View file

@ -364,20 +364,6 @@ 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,7 +153,6 @@ void get_root_pixmap();
// detect monitors and desktops
void get_monitors();
void print_monitors();
void get_desktops();
int server_get_number_of_desktops();

View file

@ -533,12 +533,6 @@ void set_task_state(Task *tsk, int state)
hide = 1;
}
if (1 - hide != tsk1->area.on_screen) {
fprintf(stderr, "%s %s task %ld '%s' (panel monitor = %d)\n",
__FUNCTION__,
hide ? "hiding" : "showing",
tsk->win,
tsk->title ? tsk->title : "??",
((Panel*)tsk->area.panel)->monitor + 1);
tsk1->area.on_screen = 1 - hide;
set_task_redraw(tsk1);
Panel *p = (Panel*)tsk->area.panel;

View file

@ -130,16 +130,7 @@ int window_get_monitor (Window win)
int i, x, y;
Window src;
XTextProperty xname;
char *name;
if (XGetWMName(server.dsp, win, &xname)) {
name = strdup((char*)xname.value);
XFree(xname.value);
} else {
name = strdup("??");
}
Bool result = XTranslateCoordinates(server.dsp, win, server.root_win, 0, 0, &x, &y, &src);
XTranslateCoordinates(server.dsp, win, server.root_win, 0, 0, &x, &y, &src);
x += 2;
y += 2;
for (i = 0; i < server.nb_monitor; i++) {
@ -148,14 +139,9 @@ int window_get_monitor (Window win)
break;
}
if (i == server.nb_monitor)
i = 0;
printf("\n%s: window %ld '%s': monitor %d, x = %d, y = %d, result = %s\n", __FUNCTION__, win, name, i+1, x, y, result ? "True" : "False");
print_monitors();
free(name);
return i;
//printf("window %lx : ecran %d, (%d, %d)\n", win, i, x, y);
if (i == server.nb_monitor) return 0;
else return i;
}
void window_get_coordinates (Window win, int *x, int *y, int *w, int *h)