[PATCH v2 weston] editor: Make editor multi-seat aware

Derek Foreman derekf at osg.samsung.com
Wed Dec 17 07:43:58 PST 2014


With multi-seat, multiple entries can occur on the text inputs in the
editor.  Also, the panel shouldn't be hidden by the editor if either
text entry is still active.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
Removed the "sibling" stuff

 clients/editor.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clients/editor.c b/clients/editor.c
index db7be2a..9299a05 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -473,7 +473,7 @@ text_input_enter(void *data,
 	if (surface != window_get_wl_surface(entry->window))
 		return;
 
-	entry->active = 1;
+	entry->active++;
 
 	text_entry_update(entry);
 	entry->reset_serial = entry->serial;
@@ -488,10 +488,10 @@ text_input_leave(void *data,
 	struct text_entry *entry = data;
 
 	text_entry_commit_and_reset(entry);
+	entry->active--;
 
-	entry->active = 0;
-
-	wl_text_input_hide_input_panel(text_input);
+	if (!entry->active)
+		wl_text_input_hide_input_panel(text_input);
 
 	widget_schedule_redraw(entry->widget);
 }
-- 
2.1.3



More information about the wayland-devel mailing list