forked from enlightenment/enlightenment
e - fix desklock + grabs with hiding pointer on screen powerdown/up
This commit is contained in:
parent
b173ed7be6
commit
3fc786413c
|
@ -1821,9 +1821,13 @@ static void
|
|||
_e_comp_pointer_ungrab(void)
|
||||
{
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
if (e_comp->suspend_grabbed)
|
||||
{
|
||||
e_grabinput_release(e_comp->suspend_grabbed, e_comp->suspend_grabbed);
|
||||
ecore_x_window_free(e_comp->suspend_grabbed);
|
||||
e_comp->suspend_grabbed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1841,9 +1845,12 @@ e_comp_screen_suspend(void)
|
|||
{
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
if (!e_desklock_state_get())
|
||||
{
|
||||
_e_comp_pointer_ungrab();
|
||||
_e_comp_pointer_grab();
|
||||
if (!e_comp->suspend_grabbed) return;
|
||||
}
|
||||
if ((e_comp->pointer) && (e_comp->pointer->o_ptr))
|
||||
{
|
||||
const char *s = edje_object_data_get(e_comp->pointer->o_ptr,
|
||||
|
@ -1873,9 +1880,12 @@ e_comp_screen_resume(void)
|
|||
{
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
if (!e_desklock_state_get())
|
||||
{
|
||||
_e_comp_pointer_ungrab();
|
||||
_e_comp_pointer_grab();
|
||||
if (!e_comp->suspend_grabbed) return;
|
||||
}
|
||||
if ((e_comp->pointer) && (e_comp->pointer->o_ptr))
|
||||
{
|
||||
const char *s = edje_object_data_get(e_comp->pointer->o_ptr,
|
||||
|
|
|
@ -1151,6 +1151,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
{
|
||||
_e_sys_susp_hib_check();
|
||||
if (e_config->desklock_on_suspend)
|
||||
// XXX: this desklock - ensure its instant
|
||||
e_desklock_show(EINA_TRUE);
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (systemd_works)
|
||||
|
|
Loading…
Reference in New Issue