diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2019-08-01 09:08:22 +0200 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2019-08-01 09:09:13 +0200 |
commit | e3ec600e13b239a4bb53c6b4f40228cb2e89453a (patch) | |
tree | abad4d316b553b0f56b18305a3717475f9675009 /src/runxdg.cpp | |
parent | da4fc1efac827ac209c4d7c83968e0433c681298 (diff) |
Change keyboard focus setting on visible/invisible eventsneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.1lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish_9.99.1jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.2jellyfish/9.99.1icefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.19.99.49.99.39.99.29.99.18.99.58.99.48.99.38.99.28.99.113.93.012.93.012.92.012.91.012.90.111.92.011.91.010.93.010.92.010.91.0
Keyboard focus was set and unset on activation events. This had the
side effect of keeping the keyboard attached to the window even if it
was invisible. Using the visibility events to perform this task looks
like a more natural way to deal with it.
Besides, activate/deactivate callbacks are not being called in
halibut or master, effectively stopping keyboard focus from working.
Bug-AGL: SPEC-2657
Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Change-Id: I65cc54c89db56bda1da4ea562151e3a30e10d068
Diffstat (limited to 'src/runxdg.cpp')
-rw-r--r-- | src/runxdg.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runxdg.cpp b/src/runxdg.cpp index 8582023..e4ec1c9 100644 --- a/src/runxdg.cpp +++ b/src/runxdg.cpp @@ -283,22 +283,22 @@ int RunXDG::init_wm (void) std::function< void(json_object*) > h_active = [this](json_object* object) { AGL_DEBUG("Got Event_Active"); - t_ilm_surface s_ids[1] = { this->m_ivi_id }; - ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_TRUE); }; std::function< void(json_object*) > h_inactive = [this](json_object* object) { AGL_DEBUG("Got Event_Inactive"); - t_ilm_surface s_ids[1] = { this->m_ivi_id }; - ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_FALSE); }; - std::function< void(json_object*) > h_visible = [](json_object* object) { + std::function< void(json_object*) > h_visible = [this](json_object* object) { AGL_DEBUG("Got Event_Visible"); + t_ilm_surface s_ids[1] = { this->m_ivi_id }; + ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_TRUE); }; - std::function< void(json_object*) > h_invisible = [](json_object* object) { + std::function< void(json_object*) > h_invisible = [this](json_object* object) { AGL_DEBUG("Got Event_Invisible"); + t_ilm_surface s_ids[1] = { this->m_ivi_id }; + ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_FALSE); }; std::function< void(json_object*) > h_syncdraw = |