<div class="gmail_quote">On Fri Dec 05 2014 at 10:47:03 PM Derek Foreman <<a href="mailto:derekf@osg.samsung.com">derekf@osg.samsung.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With multi-seat, multiple entries can occur on the text inputs in the<br>
editor.  Also, the panel shouldn't be hidden by the editor if either<br>
text entry is still active.<br>
<br>
Signed-off-by: Derek Foreman <<a href="mailto:derekf@osg.samsung.com" target="_blank">derekf@osg.samsung.com</a>><br>
---<br>
 clients/editor.c | 12 ++++++++----<br>
 1 file changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/clients/editor.c b/clients/editor.c<br>
index db7be2a..6bbc104 100644<br>
--- a/clients/editor.c<br>
+++ b/clients/editor.c<br>
@@ -72,6 +72,7 @@ struct text_entry {<br>
        uint32_t click_to_show;<br>
        char *preferred_language;<br>
        bool button_pressed;<br>
+       struct text_entry *sibling;<br>
 };<br>
<br>
 struct editor {<br>
@@ -473,7 +474,7 @@ text_input_enter(void *data,<br>
        if (surface != window_get_wl_surface(entry-><u></u>window))<br>
                return;<br>
<br>
-       entry->active = 1;<br>
+       entry->active++;<br>
<br>
        text_entry_update(entry);<br>
        entry->reset_serial = entry->serial;<br>
@@ -488,10 +489,10 @@ text_input_leave(void *data,<br>
        struct text_entry *entry = data;<br>
<br>
        text_entry_commit_and_reset(<u></u>entry);<br>
+       entry->active--;<br>
<br>
-       entry->active = 0;<br>
-<br>
-       wl_text_input_hide_input_<u></u>panel(text_input);<br>
+       if (!entry->active && !entry->sibling->active)<br>
+               wl_text_input_hide_input_<u></u>panel(text_input);<br>
<br></blockquote><div><br></div><div>Increment/decrement active is right. </div><div><br></div><div>The sibling handling should be fixed inside the compositor instead (emit hide_input_panel_signal in text_input_hide_input_panel() only when all text_input's input panels are hidden)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        widget_schedule_redraw(entry-><u></u>widget);<br>
 }<br>
@@ -1375,6 +1376,9 @@ main(int argc, char *argv[])<br>
        editor.editor->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_<u></u>NUMBER;<br>
        editor.editor->click_to_show = click_to_show;<br>
<br>
+       editor.entry->sibling = editor.editor;<br>
+       editor.editor->sibling = editor.entry;<br>
+<br>
        window_set_title(editor.<u></u>window, "Text Editor");<br>
        window_set_key_handler(editor.<u></u>window, key_handler);<br>
        window_set_keyboard_focus_<u></u>handler(editor.window,<br>
--<br>
2.1.3<br>
<br>
______________________________<u></u>_________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/wayland-devel</a><br>
</blockquote></div>