parent
24e0230079
commit
09fc45f3c8
|
@ -1219,7 +1219,8 @@ EAPI int ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
|
|||
EAPI void ecore_x_netwm_user_time_set(Ecore_X_Window win, int time);
|
||||
EAPI int ecore_x_netwm_user_time_get(Ecore_X_Window win, int *time);
|
||||
|
||||
EAPI Ecore_X_Window_State *ecore_x_netwm_window_state_get(Ecore_X_Window win, int *num);
|
||||
EAPI Ecore_X_Window_State *ecore_x_netwm_window_state_list_get(Ecore_X_Window win, int *num);
|
||||
EAPI int ecore_x_netwm_window_state_list_set(Ecore_X_Window win, Ecore_X_Window_State *state, int num);
|
||||
|
||||
EAPI void ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State state, int on);
|
||||
EAPI int ecore_x_netwm_window_state_isset(Ecore_X_Window win, Ecore_X_Window_State state);
|
||||
|
|
|
@ -911,7 +911,7 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
|
|||
}
|
||||
|
||||
Ecore_X_Window_State *
|
||||
ecore_x_netwm_window_state_get(Ecore_X_Window win, int *num)
|
||||
ecore_x_netwm_window_state_list_get(Ecore_X_Window win, int *num)
|
||||
{
|
||||
int num_ret, i;
|
||||
unsigned char *data;
|
||||
|
@ -940,6 +940,32 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win, int *num)
|
|||
return state;
|
||||
}
|
||||
|
||||
int
|
||||
ecore_x_netwm_window_state_list_set(Ecore_X_Window win, Ecore_X_Window_State *state, int num)
|
||||
{
|
||||
unsigned char *data;
|
||||
Ecore_X_Atom *set;
|
||||
int i;
|
||||
|
||||
if (num == 0)
|
||||
{
|
||||
XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_NET_WM_STATE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
data = malloc(num * sizeof(Ecore_X_Atom));
|
||||
if (!data) return 1;
|
||||
|
||||
set = (Ecore_X_Window_State *) data;
|
||||
for (i = 0; i < num; i++)
|
||||
set[i] = _ecore_x_netwm_state_atom_get(state[i]);
|
||||
|
||||
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_NET_WM_STATE,
|
||||
XA_ATOM, 32, data, num);
|
||||
free(data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
ecore_x_netwm_window_state_isset(Ecore_X_Window win, Ecore_X_Window_State s)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue