[mutter/wip/carlosg/no-toggle-panel-across-focus: 3/3] wayland: Only toggle input panel if receiving .enable when already active



commit 7af8e4588ca2fb5a996b8a18323e86a5a9bb83ff
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Feb 8 22:51:28 2019 +0100

    wayland: Only toggle input panel if receiving .enable when already active
    
    Only toggle the OSK if receiving .enable consecutively (i.e. the
    ClutterInputFocus was already focused). We specifically want to avoid
    toggling the panel when changing focus within a surface (where the .disable
    request across focus change would previously unfocus the ClutterInputFocus).
    Prior state should be preserved if possible.

 src/wayland/meta-wayland-text-input.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c
index f121bb069..edef47b77 100644
--- a/src/wayland/meta-wayland-text-input.c
+++ b/src/wayland/meta-wayland-text-input.c
@@ -494,9 +494,12 @@ text_input_commit_state (struct wl_client   *client,
               else
                 return;
             }
+          else
+            {
+              toggle_panel = TRUE;
+            }
 
           clutter_input_focus_set_can_show_preedit (focus, TRUE);
-          toggle_panel = TRUE;
         }
       else if (clutter_input_focus_is_focused (focus))
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]