ecore_evas: Added support for window auxiliary hint

Summary:
The window auxiliary hint is the value which is used to decide
which actions should be made available to the user by the WM. If you
want to set specific hint to your window, then you should check whether
it exists in the supported auxiliary hints that are registered in the
root window by the window manager.

Once you've added an auxiliary hint, you can get a new ID which is used
to change value and delete hint. The window manager sends the response
message to the application on receiving auxiliary hint change event.

A list of auxiliary hint within the Ecore_Evas has this format:

  ID:HINT:VALUE,ID:HINT:VALUE,...

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D543
This commit is contained in:
Gwanglim Lee 2014-02-28 07:20:01 +09:00 committed by Carsten Haitzler (Rasterman)
parent 8e17290f19
commit cbf6f94c80
17 changed files with 442 additions and 14 deletions

View File

@ -764,6 +764,75 @@ EAPI Eina_Bool ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Eva
* @since 1.9.0
*/
EAPI void ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee);
/**
* @brief Get the list of supported auxiliary hint strings.
*
* @param ee The Ecore_Evas
* @return List of supported auxiliary hint strings.
* @note Do not change the returned list of its contents. Auxiliary hint
* strings are internal and should be considered constants, do not free or
* modify them.
* @warning Support for this depends on the underlying windowing system.
*
* The window auxiliary hint is the value which is used to decide which actions should
* be made available to the user by the window manager. If you want to set specific hint
* to your window, then you should check whether it exists in the supported auxiliary
* hints that are registered in the root window by the window manager. Once you've added
* an auxiliary hint, you can get a new ID which is used to change value and delete hint.
* The window manager sends the response message to the application on receiving auxiliary
* hint change event. A list of auxiliary hint within the Ecore_Evas has this format:
* ID:HINT:VALUE,ID:HINT:VALUE,...
*
* @since 1.9.0
*/
EAPI const Eina_List *ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee);
/**
* @brief Get the list of allowed auxiliary hint ID.
*
* @param ee The Ecore_Evas
* @return List of allowed auxiliary hint ID.
* @note This function is low level. Instead of using it directly, consider
* using the callback mechanism in Elementary such as "aux,hint,allowed".
* @warning Support for this depends on the underlying windowing system.
*
* @since 1.9.0
*/
EAPI Eina_List *ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee);
/**
* @brief Create an auxiliary hint of the Ecore_Evas.
*
* @param ee The Ecore_Evas
* @param hint The auxiliary hint string.
* @param val The value string.
* @return The ID of created auxiliary hint, or -1 on failure.
* @warning Support for this depends on the underlying windowing system.
*
* @since 1.9.0
*/
EAPI int ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val);
/**
* @brief Delete an auxiliary hint of the Ecore_Evas.
*
* @param ee The Ecore_Evas
* @param id The ID of the auxiliary hint.
* @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
* @warning Support for this depends on the underlying windowing system.
*
* @since 1.9.0
*/
EAPI Eina_Bool ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id);
/**
* @brief Change a value of the auxiliary hint.
*
* @param ee The Ecore_Evas
* @param id The auxiliary hint ID.
* @param val The value string to be set.
* @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
* @warning Support for this depends on the underlying windowing system.
*
* @since 1.9.0
*/
EAPI Eina_Bool ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val);
/**
* @brief Send message to parent ecore
*

View File

@ -2093,6 +2093,167 @@ ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee)
IFE;
}
EAPI const Eina_List *
ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
"ecore_evas_aux_hints_supported_get");
return NULL;
}
return ee->prop.aux_hint.supported_list;
}
EAPI Eina_List *
ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
"ecore_evas_aux_hints_allowed_get");
return NULL;
}
Eina_List *list = NULL, *ll;
Ecore_Evas_Aux_Hint *aux;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
{
if ((aux->allowed) && !(aux->notified))
{
list = eina_list_append(list, aux->id);
}
}
return list;
}
EAPI int
ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
"ecore_evas_aux_hint_add");
return -1;
}
Eina_List *ll;
char *supported_hint;
EINA_LIST_FOREACH(ee->prop.aux_hint.supported_list, ll, supported_hint)
{
if (!strncmp(supported_hint, hint, strlen(hint)))
{
Ecore_Evas_Aux_Hint *aux= (Ecore_Evas_Aux_Hint *)calloc(1, sizeof(Ecore_Evas_Aux_Hint));
if (aux)
{
aux->id = ee->prop.aux_hint.id;
aux->hint = eina_stringshare_add(hint);
aux->val = eina_stringshare_add(val);
ee->prop.aux_hint.hints = eina_list_append(ee->prop.aux_hint.hints, aux);
Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
if (buf)
{
if (ee->engine.func->fn_aux_hints_set)
ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
ee->prop.aux_hint.id++;
return aux->id;
}
eina_stringshare_del(aux->hint);
eina_stringshare_del(aux->val);
free(aux);
}
break;
}
}
return -1;
}
EAPI Eina_Bool
ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
"ecore_evas_aux_hint_del");
return EINA_FALSE;
}
Eina_List *ll;
Ecore_Evas_Aux_Hint *aux;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
{
if (id == aux->id)
{
ee->prop.aux_hint.hints = eina_list_remove(ee->prop.aux_hint.hints, aux);
eina_stringshare_del(aux->hint);
eina_stringshare_del(aux->val);
free(aux);
Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
if (buf)
{
if (ee->engine.func->fn_aux_hints_set)
ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
return EINA_TRUE;
}
break;
}
}
return EINA_FALSE;
}
EAPI Eina_Bool
ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
"ecore_evas_aux_hint_val_set");
return EINA_FALSE;
}
Eina_List *ll;
Ecore_Evas_Aux_Hint *aux;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
{
if (id == aux->id)
{
eina_stringshare_del(aux->val);
aux->val = eina_stringshare_add(val);
aux->allowed = 0;
aux->notified = 0;
Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
if (buf)
{
if (ee->engine.func->fn_aux_hints_set)
ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
return EINA_TRUE;
}
break;
}
}
return EINA_TRUE;
}
EAPI void
ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
{
@ -2854,6 +3015,7 @@ _ecore_evas_free(Ecore_Evas *ee)
ee->prop.wm_rot.available_rots = NULL;
if (ee->prop.wm_rot.manual_mode.timer)
ecore_timer_del(ee->prop.wm_rot.manual_mode.timer);
_ecore_evas_aux_hint_free(ee);
ee->prop.wm_rot.manual_mode.timer = NULL;
if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
ee->prop.cursor.object = NULL;
@ -3157,6 +3319,48 @@ ecore_evas_input_event_unregister(Ecore_Evas *ee)
ecore_event_window_unregister((Ecore_Window)ee);
}
EAPI Eina_Strbuf *
_ecore_evas_aux_hints_string_get(Ecore_Evas *ee)
{
Eina_Strbuf *buf = eina_strbuf_new();
if (buf)
{
if (eina_list_count(ee->prop.aux_hint.hints) > 0)
{
Eina_List *l;
Ecore_Evas_Aux_Hint *aux;
int i = 0;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
{
/* add delimiter */
if (i > 0) eina_strbuf_append_char(buf, ',');
eina_strbuf_append_printf(buf, "%d:%s:%s", aux->id, aux->hint, aux->val);
i++;
}
}
}
return buf;
}
void
_ecore_evas_aux_hint_free(Ecore_Evas *ee)
{
char *hint;
EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint)
{
eina_stringshare_del(hint);
}
Ecore_Evas_Aux_Hint *aux;
EINA_LIST_FREE(ee->prop.aux_hint.hints, aux)
{
eina_stringshare_del(aux->hint);
eina_stringshare_del(aux->val);
free(aux);
}
}
/**
* @brief Create Ecore_Evas using fb backend.
* @param disp_name The name of the display to be used.

View File

@ -589,7 +589,9 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
static void *

View File

@ -706,7 +706,9 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
void

View File

@ -46,6 +46,7 @@ typedef void (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee);
typedef struct _Ecore_Evas_Engine Ecore_Evas_Engine;
typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func;
typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint;
/* Engines interfaces */
struct _Ecore_Evas_Engine_Func
@ -120,6 +121,8 @@ struct _Ecore_Evas_Engine_Func
void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count);
void (*fn_wm_rot_manual_rotation_done_set) (Ecore_Evas *ee, Eina_Bool set);
void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee);
void (*fn_aux_hints_set) (Ecore_Evas *ee, const char *hints);
};
struct _Ecore_Evas_Interface
@ -206,6 +209,11 @@ struct _Ecore_Evas
Ecore_Timer *timer;
} manual_mode;
} wm_rot;
struct {
Eina_List *supported_list;
Eina_List *hints;
int id;
} aux_hint;
int layer;
Ecore_Window window;
unsigned char avoid_damage;
@ -298,6 +306,15 @@ struct _Ecore_Evas
unsigned char can_async_render : 1;
};
struct _Ecore_Evas_Aux_Hint
{
int id; // ID of aux hint
const char *hint; // hint string
const char *val; // value string
unsigned char allowed : 1; // received allowed event from the window manager
unsigned char notified : 1; // let caller know ee has got response for this aux hint
};
EAPI void _ecore_evas_ref(Ecore_Evas *ee);
EAPI void _ecore_evas_unref(Ecore_Evas *ee);
EAPI int ecore_evas_buffer_render(Ecore_Evas *ee);
@ -363,6 +380,9 @@ int _ecore_evas_ews_shutdown(void);
void _ecore_evas_extn_init(void);
void _ecore_evas_extn_shutdown(void);
EAPI Eina_Strbuf *_ecore_evas_aux_hints_string_get(Ecore_Evas *ee);
void _ecore_evas_aux_hint_free(Ecore_Evas *ee);
Eina_Module *_ecore_evas_engine_load(const char *engine);
const Eina_List *_ecore_evas_available_engines_get(void);
void _ecore_evas_engine_init(void);

View File

@ -322,4 +322,10 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE;
/* E window auxiliary hint */
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED;
#endif /* _ECORE_X_ATOMS_H */

View File

@ -352,6 +352,12 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE = 0;
/* E window auxiliary hint */
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED = 0;
typedef struct _Atom_Item Atom_Item;
struct _Atom_Item
@ -660,6 +666,11 @@ const Atom_Item atom_items[] =
{ "_E_WINDOW_ROTATION_CHANGE_PREPARE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE },
{ "_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE },
{ "_E_WINDOW_ROTATION_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST },
{ "_E_WINDOW_ROTATION_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE }
{ "_E_WINDOW_ROTATION_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE },
{ "_E_WINDOW_AUX_HINT_SUPPORTED_LIST", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST },
{ "_E_WINDOW_AUX_HINT_SUPPORT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT },
{ "_E_WINDOW_AUX_HINT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT },
{ "_E_WINDOW_AUX_HINT_ALLOWED", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED }
};

View File

@ -481,7 +481,9 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
EAPI Ecore_Evas *

View File

@ -104,7 +104,9 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
EAPI Ecore_Evas *

View File

@ -882,7 +882,9 @@ static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
static Eina_Bool
@ -2007,7 +2009,9 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
EAPI Ecore_Evas *

View File

@ -577,7 +577,9 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
EAPI Ecore_Evas *

View File

@ -415,7 +415,9 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
EAPI Ecore_Evas *

View File

@ -455,7 +455,9 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
static Ecore_Evas*

View File

@ -84,7 +84,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
/* external variables */

View File

@ -84,7 +84,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
/* external variables */

View File

@ -1141,7 +1141,9 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
NULL, // wm_rot_preferred_rotation_set
NULL, // wm_rot_available_rotations_set
NULL, // wm_rot_manual_rotation_done_set
NULL // wm_rot_manual_rotation_done
NULL, // wm_rot_manual_rotation_done
NULL // aux_hints_set
};
#endif /* BUILD_ECORE_EVAS_WIN32 */

View File

@ -118,6 +118,7 @@ static Ecore_Evas_Interface_Gl_X11 *_ecore_evas_x_interface_gl_x11_new(void);
static void _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize);
static Eina_Bool _ecore_evas_x_wm_rot_manual_rotation_done_timeout(void *data);
static void _ecore_evas_x_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee);
static void _ecore_evas_x_aux_hints_set(Ecore_Evas *ee, const char *hints);
static void _resize_shape_do(Ecore_Evas *);
static void _shaped_do(Ecore_Evas *, int);
@ -341,6 +342,55 @@ _ecore_evas_x_wm_rot_manual_rotation_done_job(void *data)
edata->wm_rot.done = 0;
}
static void
_ecore_evas_x_aux_hints_supprted_update(Ecore_Evas *ee)
{
Ecore_X_Window root = ecore_x_window_root_first_get();
unsigned char *data = NULL;
unsigned int num = 0, i = 0;
int res = 0, n = 0;
char **str;
const char *hint;
EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint)
{
eina_stringshare_del(hint);
}
res = ecore_x_window_prop_property_get
(root, ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST,
ECORE_X_ATOM_STRING, 0, &data, &n);
if ((res == 8) && (n >0))
{
str = eina_str_split_full((char *)data, ",", -1, &num);
for (i = 0; i < num; i++)
{
hint = eina_stringshare_add(str[i]);
ee->prop.aux_hint.supported_list = eina_list_append(ee->prop.aux_hint.supported_list, hint);
}
if (num > 0)
{
free(str[0]);
free(str);
}
}
free(data);
}
static void
_ecore_evas_x_aux_hints_update(Ecore_Evas *ee)
{
Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
if (buf)
{
_ecore_evas_x_aux_hints_set(ee, eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
}
}
# ifdef BUILD_ECORE_EVAS_OPENGL_X11
static Ecore_X_Window
_ecore_evas_x_gl_window_new(Ecore_Evas *ee, Ecore_X_Window parent, int x, int y, int w, int h, Eina_Bool override, int argb, const int *opt)
@ -1128,6 +1178,28 @@ _ecore_evas_x_event_client_message(void *data EINA_UNUSED, int type EINA_UNUSED,
}
}
}
else if (e->message_type == ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED)
{
ee = ecore_event_window_match(e->win);
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
int id = e->data.l[1]; /* id of aux hint */
Eina_List *l;
Ecore_Evas_Aux_Hint *aux;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
{
if (id == aux->id)
{
aux->allowed = 1;
if (!aux->notified)
{
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
aux->notified = 1;
}
break;
}
}
}
return ECORE_CALLBACK_PASS_ON;
}
@ -2479,6 +2551,8 @@ _alpha_do(Ecore_Evas *ee, int alpha)
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_window_profile_protocol_set(ee);
_ecore_evas_x_wm_rotation_protocol_set(ee);
_ecore_evas_x_aux_hints_supprted_update(ee);
_ecore_evas_x_aux_hints_update(ee);
_ecore_evas_x_sync_set(ee);
_ecore_evas_x_size_pos_hints_update(ee);
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
@ -2631,6 +2705,8 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_window_profile_protocol_set(ee);
_ecore_evas_x_wm_rotation_protocol_set(ee);
_ecore_evas_x_aux_hints_supprted_update(ee);
_ecore_evas_x_aux_hints_update(ee);
_ecore_evas_x_sync_set(ee);
_ecore_evas_x_size_pos_hints_update(ee);
#endif /* BUILD_ECORE_EVAS_OPENGL_X11 */
@ -3403,6 +3479,18 @@ _ecore_evas_x_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee)
(4.0f, _ecore_evas_x_wm_rot_manual_rotation_done_timeout, ee);
}
static void
_ecore_evas_x_aux_hints_set(Ecore_Evas *ee, const char *hints)
{
if (hints)
ecore_x_window_prop_property_set
(ee->prop.window, ECORE_X_ATOM_E_WINDOW_AUX_HINT,
ECORE_X_ATOM_STRING, 8, (void *)hints, strlen(hints) + 1);
else
ecore_x_window_prop_property_del
(ee->prop.window, ECORE_X_ATOM_E_WINDOW_AUX_HINT);
}
static Ecore_Evas_Engine_Func _ecore_x_engine_func =
{
_ecore_evas_x_free,
@ -3473,7 +3561,9 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func =
_ecore_evas_x_wm_rot_preferred_rotation_set,
_ecore_evas_x_wm_rot_available_rotations_set,
_ecore_evas_x_wm_rot_manual_rotation_done_set,
_ecore_evas_x_wm_rot_manual_rotation_done
_ecore_evas_x_wm_rot_manual_rotation_done,
_ecore_evas_x_aux_hints_set
};
/*
@ -3873,6 +3963,8 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_window_profile_protocol_set(ee);
_ecore_evas_x_wm_rotation_protocol_set(ee);
_ecore_evas_x_aux_hints_supprted_update(ee);
_ecore_evas_x_aux_hints_update(ee);
_ecore_evas_x_sync_set(ee);
ee->engine.func->fn_render = _ecore_evas_x_render;
@ -4321,6 +4413,8 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_window_profile_protocol_set(ee);
_ecore_evas_x_wm_rotation_protocol_set(ee);
_ecore_evas_x_aux_hints_supprted_update(ee);
_ecore_evas_x_aux_hints_update(ee);
_ecore_evas_x_sync_set(ee);
ee->engine.func->fn_render = _ecore_evas_x_render;