forked from enlightenment/enlightenment
parent
8705b83353
commit
550eed698c
|
@ -2241,57 +2241,15 @@ _e_border_cb_window_state_request(void *data, int ev_type, void *ev)
|
|||
{
|
||||
E_Border *bd;
|
||||
Ecore_X_Event_Window_State_Request *e;
|
||||
int i, on;
|
||||
int i;
|
||||
|
||||
e = ev;
|
||||
bd = e_border_find_by_client_window(e->win);
|
||||
if (bd)
|
||||
{
|
||||
for (i = 0; i < 2; i++)
|
||||
e_hints_window_state_update(bd, e->state[i], e->action);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: We should ignore this when the window isn't mapped.
|
||||
* The window should state the properties by itself, and we
|
||||
* will pick them up on border creation.
|
||||
*/
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
switch (e->state[i])
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ICONIFIED:
|
||||
if (e->action == ECORE_X_WINDOW_STATE_ACTION_ADD)
|
||||
{
|
||||
ecore_x_icccm_state_set(e->win, ECORE_X_WINDOW_STATE_HINT_ICONIC);
|
||||
ecore_x_netwm_window_state_set(e->win, ECORE_X_WINDOW_STATE_HIDDEN, 1);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_UNKNOWN:
|
||||
case ECORE_X_WINDOW_STATE_HIDDEN:
|
||||
/* Ignore */
|
||||
break;
|
||||
default:
|
||||
switch (e->action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
ecore_x_netwm_window_state_set(e->win, e->state[i], 0);
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
ecore_x_netwm_window_state_set(e->win, e->state[i], 1);
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
on = ecore_x_netwm_window_state_isset(e->win, e->state[i]);
|
||||
if (on)
|
||||
ecore_x_netwm_window_state_set(e->win, e->state[i], 0);
|
||||
else
|
||||
ecore_x_netwm_window_state_set(e->win, e->state[i], 1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bd) return 1;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
e_hints_window_state_update(bd, e->state[i], e->action);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3126,7 +3084,7 @@ _e_border_eval(E_Border *bd)
|
|||
if (bd->client.netwm.fetch.name)
|
||||
{
|
||||
if (bd->client.netwm.name) free(bd->client.netwm.name);
|
||||
bd->client.netwm.name = ecore_x_netwm_name_get(bd->client.win);
|
||||
ecore_x_netwm_name_get(bd->client.win, &bd->client.netwm.name);
|
||||
|
||||
bd->client.netwm.fetch.name = 0;
|
||||
if (bd->bg_object)
|
||||
|
@ -3174,7 +3132,7 @@ _e_border_eval(E_Border *bd)
|
|||
if (bd->client.netwm.fetch.icon_name)
|
||||
{
|
||||
if (bd->client.netwm.icon_name) free(bd->client.netwm.icon_name);
|
||||
bd->client.netwm.icon_name = ecore_x_netwm_icon_name_get(bd->client.win);
|
||||
ecore_x_netwm_icon_name_get(bd->client.win, &bd->client.netwm.icon_name);
|
||||
|
||||
bd->client.netwm.fetch.icon_name = 0;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ e_hints_manager_init(E_Manager *man)
|
|||
#endif
|
||||
if (e_config->use_virtual_roots)
|
||||
{
|
||||
ecore_x_netwm_desk_roots_set(man->root, num, vroots);
|
||||
ecore_x_netwm_desk_roots_set(man->root, vroots, num);
|
||||
}
|
||||
#if 0
|
||||
/* No need for workarea without desktops */
|
||||
|
@ -241,8 +241,8 @@ e_hints_client_list_set(void)
|
|||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
m = ml->data;
|
||||
ecore_x_netwm_client_list_set(m->root, num, clients);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, num, clients);
|
||||
ecore_x_netwm_client_list_set(m->root, clients, num);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, clients, num);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -250,8 +250,8 @@ e_hints_client_list_set(void)
|
|||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
m = ml->data;
|
||||
ecore_x_netwm_client_list_set(m->root, 0, NULL);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
|
||||
ecore_x_netwm_client_list_set(m->root, NULL, 0);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, NULL, 0);
|
||||
}
|
||||
}
|
||||
IF_FREE(clients);
|
||||
|
@ -302,7 +302,7 @@ e_hints_client_stacking_set(void)
|
|||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
m = ml->data;
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, num, clients);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, clients, num);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -310,7 +310,7 @@ e_hints_client_stacking_set(void)
|
|||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
m = ml->data;
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, NULL, 0);
|
||||
}
|
||||
}
|
||||
IF_FREE(clients);
|
||||
|
@ -444,7 +444,7 @@ e_hints_window_state_set(E_Border *bd)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
ecore_x_netwm_window_state_list_set(bd->client.win, state, num);
|
||||
ecore_x_netwm_window_state_set(bd->client.win, state, num);
|
||||
}
|
||||
|
||||
void e_hints_window_type_set(E_Border *bd)
|
||||
|
@ -454,7 +454,7 @@ void e_hints_window_type_set(E_Border *bd)
|
|||
|
||||
void e_hints_window_type_get(E_Border *bd)
|
||||
{
|
||||
bd->client.netwm.type = ecore_x_netwm_window_type_get(bd->client.win);
|
||||
ecore_x_netwm_window_type_get(bd->client.win, &bd->client.netwm.type);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -830,7 +830,7 @@ e_hints_window_state_update(E_Border *bd, Ecore_X_Window_State state,
|
|||
void
|
||||
e_hints_window_state_get(E_Border *bd)
|
||||
{
|
||||
int i, num;
|
||||
unsigned int i, num;
|
||||
Ecore_X_Window_State *state;
|
||||
|
||||
bd->client.netwm.state.modal = 0;
|
||||
|
@ -844,7 +844,7 @@ e_hints_window_state_get(E_Border *bd)
|
|||
bd->client.netwm.state.fullscreen = 0;
|
||||
bd->client.netwm.state.stacking = 0;
|
||||
|
||||
state = ecore_x_netwm_window_state_list_get(bd->client.win, &num);
|
||||
ecore_x_netwm_window_state_get(bd->client.win, &state, &num);
|
||||
if (state)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
|
|
Loading…
Reference in New Issue