fix stickiness!

SVN revision: 14936
This commit is contained in:
Carsten Haitzler 2005-05-25 10:09:34 +00:00
parent 141e1b6cdd
commit ab878e203a
2 changed files with 14 additions and 2 deletions

View File

@ -992,6 +992,7 @@ e_border_fullscreen(E_Border *bd)
if ((bd->shaded) || (bd->shading)) return; if ((bd->shaded) || (bd->shading)) return;
if (!bd->fullscreen) if (!bd->fullscreen)
{ {
printf("FULLSCREEEN!\n");
bd->saved.x = bd->x; bd->saved.x = bd->x;
bd->saved.y = bd->y; bd->saved.y = bd->y;
bd->saved.w = bd->w; bd->saved.w = bd->w;
@ -1024,6 +1025,7 @@ e_border_unfullscreen(E_Border *bd)
if ((bd->shaded) || (bd->shading)) return; if ((bd->shaded) || (bd->shading)) return;
if (bd->fullscreen) if (bd->fullscreen)
{ {
printf("UNFULLSCREEEN!\n");
e_hints_window_fullscreen_set(bd, 0); e_hints_window_fullscreen_set(bd, 0);
e_border_move_resize(bd, bd->saved.x, bd->saved.y, bd->saved.w, bd->saved.h); e_border_move_resize(bd, bd->saved.x, bd->saved.y, bd->saved.w, bd->saved.h);
@ -1102,6 +1104,8 @@ e_border_stick(E_Border *bd)
E_OBJECT_CHECK(bd); E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->sticky) return;
printf("STICK!\n");
bd->sticky = 1; bd->sticky = 1;
e_hints_window_sticky_set(bd, 1); e_hints_window_sticky_set(bd, 1);
@ -1119,6 +1123,8 @@ e_border_unstick(E_Border *bd)
E_OBJECT_CHECK(bd); E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
/* Set the desk before we unstick the border */ /* Set the desk before we unstick the border */
if (!bd->sticky) return;
printf("UNSTICK!\n");
e_border_desk_set(bd, e_desk_current_get(bd->zone)); e_border_desk_set(bd, e_desk_current_get(bd->zone));
bd->sticky = 0; bd->sticky = 0;
e_hints_window_sticky_set(bd, 0); e_hints_window_sticky_set(bd, 0);

View File

@ -345,7 +345,10 @@ e_hints_window_init(E_Border *bd)
if (ecore_x_netwm_desktop_get(bd->client.win, &bd->client.netwm.desktop)) if (ecore_x_netwm_desktop_get(bd->client.win, &bd->client.netwm.desktop))
{ {
if (bd->client.netwm.desktop == 0xffffffff) if (bd->client.netwm.desktop == 0xffffffff)
e_border_stick(bd); {
printf("CLIENT asks for all desks!\n");
e_border_stick(bd);
}
else if (bd->client.netwm.desktop < (bd->zone->desk_x_count * bd->zone->desk_y_count)) else if (bd->client.netwm.desktop < (bd->zone->desk_x_count * bd->zone->desk_y_count))
{ {
E_Desk *desk; E_Desk *desk;
@ -370,7 +373,10 @@ e_hints_window_init(E_Border *bd)
bd->client.netwm.pid = -1; bd->client.netwm.pid = -1;
if (bd->client.netwm.state.sticky) if (bd->client.netwm.state.sticky)
e_border_stick(bd); {
printf("CLIENT asks for stickiness!\n");
e_border_stick(bd);
}
if (bd->client.netwm.state.shaded) if (bd->client.netwm.state.shaded)
e_border_shade(bd, e_hints_window_shade_direction_get(bd)); e_border_shade(bd, e_hints_window_shade_direction_get(bd));
if (bd->client.netwm.state.maximized_v && bd->client.netwm.state.maximized_h) if (bd->client.netwm.state.maximized_v && bd->client.netwm.state.maximized_h)