If something breaks because of the mwm disable, we need to implement

more actions on window type :)


SVN revision: 15108
This commit is contained in:
sebastid 2005-06-03 19:58:27 +00:00 committed by sebastid
parent 22d7cdc7c2
commit ef7fc7f6cc
3 changed files with 26 additions and 4 deletions

View File

@ -302,7 +302,7 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
bd->client.netwm.state.skip_pager = 0;
bd->client.netwm.state.fullscreen = 0;
bd->client.netwm.state.stacking = E_STACKING_NONE;
bd->client.netwm.type = ECORE_X_WINDOW_TYPE_NORMAL;
bd->client.netwm.type = ECORE_X_WINDOW_TYPE_UNKNOWN;
{
int at_num = 0, i;
@ -369,6 +369,12 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
printf("ECORE_X_ATOM_NET_WM_STRUT_PARTIAL\n");
bd->client.netwm.fetch.strut = 1;
}
else if (atoms[i] == ECORE_X_ATOM_NET_WM_WINDOW_TYPE)
{
/* Ignore mwm */
bd->client.mwm.fetch.hints = 0;
bd->client.netwm.fetch.type = 1;
}
}
free(atoms);
}
@ -1965,8 +1971,12 @@ _e_border_cb_window_property(void *data, int ev_type, void *ev)
}
else if (e->atom == ECORE_X_ATOM_MOTIF_WM_HINTS)
{
bd->client.mwm.fetch.hints = 1;
bd->changed = 1;
if ((bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UNKNOWN) &&
(!bd->client.netwm.fetch.type))
{
bd->client.mwm.fetch.hints = 1;
bd->changed = 1;
}
}
else if (e->atom == ECORE_X_ATOM_WM_TRANSIENT_FOR)
{
@ -3039,6 +3049,18 @@ _e_border_eval(E_Border *bd)
}
bd->changes.icon = 0;
}
if (bd->client.netwm.fetch.type)
{
e_hints_window_type_get(bd);
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DESKTOP)
{
if (bd->client.border.name) free(bd->client.border.name);
bd->client.border.name = strdup("borderless");
bd->client.border.changed = 1;
}
bd->client.netwm.fetch.type = 0;
}
if (bd->client.icccm.fetch.machine)
{
if (bd->client.icccm.machine) free(bd->client.icccm.machine);

View File

@ -206,6 +206,7 @@ struct _E_Border
unsigned char icon : 1;
unsigned char user_time : 1;
unsigned char strut : 1;
unsigned char type : 1;
/* No, fetch on new_client, shouldn't be changed after map.
unsigned char pid : 1;
*/

View File

@ -299,7 +299,6 @@ e_hints_window_init(E_Border *bd)
{
/* Don't need fetch flag, is onlt called from new border */
e_hints_window_state_get(bd);
e_hints_window_type_get(bd);
bd->client.icccm.state = ecore_x_icccm_state_get(bd->client.win);
if (bd->client.icccm.state == ECORE_X_WINDOW_STATE_HINT_NONE)