forked from enlightenment/enlightenment
e_menu_grab_window_get() -> e_menu_is_active()
0 is a valid canvas window id, and this function was no longer being used for its original purpose
This commit is contained in:
parent
ec601e49d1
commit
a117c977dd
|
@ -1732,13 +1732,13 @@ e_comp_ungrab_input(Eina_Bool mouse, Eina_Bool kbd)
|
|||
E_API Eina_Bool
|
||||
e_comp_util_kbd_grabbed(void)
|
||||
{
|
||||
return e_menu_grab_window_get() || e_client_action_get() || e_grabinput_key_win_get();
|
||||
return e_menu_is_active() || e_client_action_get() || e_grabinput_key_win_get();
|
||||
}
|
||||
|
||||
E_API Eina_Bool
|
||||
e_comp_util_mouse_grabbed(void)
|
||||
{
|
||||
return e_menu_grab_window_get() || e_client_action_get() || e_grabinput_mouse_win_get();
|
||||
return e_menu_is_active() || e_client_action_get() || e_grabinput_mouse_win_get();
|
||||
}
|
||||
|
||||
E_API void
|
||||
|
|
|
@ -3252,7 +3252,7 @@ e_comp_wl_key_down(Ecore_Event_Key *ev)
|
|||
*k = keycode;
|
||||
|
||||
if ((!e_client_action_get()) && (!e_comp->input_key_grabs) &&
|
||||
(!e_menu_grab_window_get()))
|
||||
(!e_menu_is_active()))
|
||||
{
|
||||
ec = e_client_focused_get();
|
||||
if (ec && ec->comp_data->surface && e_comp_wl->kbd.focused)
|
||||
|
@ -3302,7 +3302,7 @@ e_comp_wl_key_up(Ecore_Event_Key *ev)
|
|||
(const char *)end - (const char *)e_comp_wl->kbd.keys.data;
|
||||
|
||||
if ((!e_client_action_get()) && (!e_comp->input_key_grabs) &&
|
||||
(!e_menu_grab_window_get()))
|
||||
(!e_menu_is_active()))
|
||||
{
|
||||
ec = e_client_focused_get();
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ static void _e_menu_category_free_cb(E_Menu_Category *cat);
|
|||
static void _e_menu_cb_mouse_evas_down(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Ecore_Window _e_menu_win = 0;
|
||||
static Ecore_Window _e_menu_win = UINT_MAX;
|
||||
static Eina_List *_e_active_menus = NULL;
|
||||
static E_Menu_Item *_e_active_menu_item = NULL;
|
||||
static E_Menu_Item *_e_prev_active_menu_item = NULL;
|
||||
|
@ -1182,19 +1182,19 @@ e_menu_idler_before(void)
|
|||
|
||||
if (!_e_active_menus)
|
||||
{
|
||||
if (_e_menu_win)
|
||||
if (_e_menu_win == e_comp->ee_win)
|
||||
{
|
||||
e_comp_ungrab_input(1, 1);
|
||||
_e_menu_win = 0;
|
||||
_e_menu_win = UINT_MAX;
|
||||
e_bindings_disabled_set(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
E_API Ecore_Window
|
||||
e_menu_grab_window_get(void)
|
||||
E_API Eina_Bool
|
||||
e_menu_is_active(void)
|
||||
{
|
||||
return _e_menu_win;
|
||||
return _e_menu_win == e_comp->ee_win;
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -1873,12 +1873,12 @@ _e_menu_activate_internal(E_Menu *m, E_Zone *zone)
|
|||
m->pre_activate_cb.func(m->pre_activate_cb.data, m);
|
||||
m->fast_mouse = 0;
|
||||
m->pending_new_submenu = 0;
|
||||
if (!_e_menu_win)
|
||||
if (_e_menu_win != e_comp->ee_win)
|
||||
{
|
||||
_e_menu_win = e_comp->ee_win;
|
||||
if (!e_comp_grab_input(1, 1))
|
||||
{
|
||||
_e_menu_win = 0;
|
||||
_e_menu_win = UINT_MAX;
|
||||
return;
|
||||
}
|
||||
e_bindings_disabled_set(1);
|
||||
|
|
|
@ -203,7 +203,7 @@ E_API void e_menu_item_disabled_set(E_Menu_Item *mi, int disable);
|
|||
|
||||
E_API void e_menu_idler_before(void);
|
||||
|
||||
E_API Ecore_Window e_menu_grab_window_get(void);
|
||||
E_API Eina_Bool e_menu_is_active(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue