Fix send border to 0, 0 problem.

SVN revision: 15383
This commit is contained in:
sebastid 2005-06-17 09:29:27 +00:00 committed by sebastid
parent 10956241a6
commit bd63fe8048
2 changed files with 9 additions and 12 deletions

View File

@ -1059,24 +1059,22 @@ e_hints_window_stacking_set(E_Border *bd, E_Stacking stacking)
void void
e_hints_window_desktop_set(E_Border *bd) e_hints_window_desktop_set(E_Border *bd)
{ {
/* This function is only called when really changing desktop,
* so just set the property and don't care about the roundtrip.
*/
unsigned int deskpos[2]; unsigned int deskpos[2];
unsigned int current;
current = (bd->desk->y * bd->zone->desk_x_count) + bd->desk->x;
/* if valgrind complains here it is complaining bd->client.netwm.desktop /* if valgrind complains here it is complaining bd->client.netwm.desktop
* is an uninitialised variable - but it isn't. it can't be. its part of * is an uninitialised variable - but it isn't. it can't be. its part of
* a calloc()'d struct and thus has to have been set to 0. hell even * a calloc()'d struct and thus has to have been set to 0. hell even
* e_border.c explicitly sets it to 0 on creation of the border object. * e_border.c explicitly sets it to 0 on creation of the border object.
*/ */
if (bd->client.netwm.desktop != current) deskpos[0] = bd->desk->x;
{ deskpos[1] = bd->desk->y;
deskpos[0] = bd->desk->x; ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2);
deskpos[1] = bd->desk->y;
ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2);
#if 0 #if 0
ecore_x_netwm_desktop_set(bd->client.win, current); ecore_x_netwm_desktop_set(bd->client.win, current);
#endif #endif
bd->client.netwm.desktop = current; bd->client.netwm.desktop = (bd->desk->y * bd->zone->desk_x_count) + bd->desk->x;
}
} }

View File

@ -700,10 +700,9 @@ _e_main_screens_init(void)
if (con) if (con)
{ {
e_container_show(con); e_container_show(con);
e_manager_manage_windows(man);
/* setup hints */
e_hints_manager_init(man); e_hints_manager_init(man);
_e_main_desk_restore(man, con); _e_main_desk_restore(man, con);
e_manager_manage_windows(man);
} }
else else
{ {