<div dir="ltr"><div>This patch fixes :<br><br><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71015">https://bugs.freedesktop.org/show_bug.cgi?id=71015</a><br><br></div>Regards,<br>Manuel<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-04-17 14:04 GMT+02:00 Manuel Bachmann <span dir="ltr"><<a href="mailto:manuel.bachmann@open.eurogiciel.org" target="_blank">manuel.bachmann@open.eurogiciel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We now dynamically move the input panel (i.e. virtual<br>
keyboard) surface to the output containing the currently<br>
focused surface.<br>
<br>
Signed-off-by: Manuel Bachmann <<a href="mailto:manuel.bachmann@open.eurogiciel.org">manuel.bachmann@open.eurogiciel.org</a>><br>
---<br>
 desktop-shell/input-panel.c |   14 ++++++++++++++<br>
 1 file changed, 14 insertions(+)<br>
<br>
diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c<br>
index 12fe686..d5e7d71 100644<br>
--- a/desktop-shell/input-panel.c<br>
+++ b/desktop-shell/input-panel.c<br>
@@ -54,6 +54,9 @@ show_input_panels(struct wl_listener *listener, void *data)<br>
                container_of(listener, struct desktop_shell,<br>
                             show_input_panel_listener);<br>
        struct input_panel_surface *ipsurf, *next;<br>
+       struct weston_seat *seat;<br>
+       struct weston_surface *focus;<br>
+       float x, y;<br>
<br>
        shell->text_input.surface = (struct weston_surface*)data;<br>
<br>
@@ -70,6 +73,17 @@ show_input_panels(struct wl_listener *listener, void *data)<br>
                              &shell->input_panel.surfaces, link) {<br>
                if (ipsurf->surface->width == 0)<br>
                        continue;<br>
+<br>
+               wl_list_for_each(seat, &shell->compositor->seat_list, link) {<br>
+                       if (!seat->keyboard)<br>
+                               continue;<br>
+                       focus = weston_surface_get_main_surface(seat->keyboard->focus);<br>
+                       ipsurf->output = focus->output;<br>
+                       x = ipsurf->output->x + (ipsurf->output->width - ipsurf->surface->width) / 2;<br>
+                       y = ipsurf->output->y + ipsurf->output->height - ipsurf->surface->height;<br>
+                       weston_view_set_position(ipsurf->view, x, y);<br>
+               }<br>
+<br>
                wl_list_insert(&shell->input_panel_layer.view_list,<br>
                               &ipsurf->view->layer_link);<br>
                weston_view_geometry_dirty(ipsurf->view);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.10.4<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><font>Regards,<br>
<br>
<i><b>Manuel BACHMANN</b><br>
Tizen Project<br>
VANNES-FR</i><br>
</font></div>
</div>