<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div><br></div><p style="margin: 0px;">Am Mon, 30 Jan 2017 16:50:05 +0400 schrieb marcandre.lureau:<br></p><div><br></div>> From: Marc-AndrĂ© Lureau <marcandre.lureau@redhat.com><br>> <br>> Since 2.8, QEMU now longer creates QXL primary surfaces when using GL.<br>> This change broke client-side mouse mode, because Spice server relies on<br>> primary surface conditions.<br>> <br>> When GL is enabled, use GL scanout informations, similar to what<br>> red_qxl_get_allow_client_mouse() is doing. The main difference is that<br>> the GL surface doesn't have mouse_mode attached (what for?).<br>> <br>> NB: this code looks like it handles only first QXL instance only, and<br>> uses the whole scanout/surface size for the input table size, perhaps<br>> monitor-configs would be a better choice.<br>> <br>> Signed-off-by: Marc-AndrĂ© Lureau <marcandre.lureau@redhat.com><br>> ---<br>>  server/red-qxl.c | 2 ++<br>>  server/reds.c    | 8 +++++++-<br>>  2 files changed, 9 insertions(+), 1 deletion(-)<br>> <br>> diff --git a/server/red-qxl.c b/server/red-qxl.c index<br>> b6b3770b..ba7b641a 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c<br>> @@ -897,6 +897,8 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,<br>>      /* FIXME: find a way to coallesce all pending SCANOUTs */<br>>      dispatcher_send_message(qxl_state->dispatcher,<br>>                              RED_WORKER_MESSAGE_GL_SCANOUT, &payload);<br>> +<br>> +    reds_update_client_mouse_allowed(qxl_state->reds);<br>>  }<br>>  <br>>  SPICE_GNUC_VISIBLE<br>> diff --git a/server/reds.c b/server/reds.c index 40c94851..a89c5e90<br>> 100644 --- a/server/reds.c +++ b/server/reds.c @@ -4256,10 +4256,16 @@<br>> void reds_update_client_mouse_allowed(RedsState *reds)<br>>      if (num_active_workers > 0) {<br>>          GListIter it;<br>>          QXLInstance *qxl;<br>> +        SpiceMsgDisplayGlScanoutUnix *gl;<br>>  <br>>          allow_now = TRUE; FOREACH_QXL_INSTANCE(reds, it, qxl) {<br>> -            if (red_qxl_get_primary_active(qxl)) {<br>> +            if ((gl = red_qxl_get_gl_scanout(qxl))) {<br>> +                x_res = gl->width;<br>> +                y_res = gl->height;<br>> +                red_qxl_put_gl_scanout(qxl, gl);<br>> +                break;<br>> +            } else if (red_qxl_get_primary_active(qxl)) {<br>>                  allow_now = red_qxl_get_allow_client_mouse(qxl, &x_res,<br>>                  &y_res);<br>>                  break;<br>>              }<p style="margin: 0px;">Hi, <br></p><div><br></div>I have tried virgl with qemu 2.8, spice 13.3 and a fedora rawhide guest but the mouse pointer (usbtablet) didn't move, I was just able to get the context menu on the desktop using the right mouse button. Now I applied this patch and it works for me, thank you!</blockquote><div>Does this patch solve the problem too?<br></div><div><br></div><div><br></div><div>diff --git a/server/red-qxl.c b/server/red-qxl.c<br>index b6b3770..1b83c50 100644<br>--- a/server/red-qxl.c<br>+++ b/server/red-qxl.c<br>@@ -897,6 +897,13 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,<br>     /* FIXME: find a way to coallesce all pending SCANOUTs */<br>     dispatcher_send_message(qxl_state->dispatcher,<br>                             RED_WORKER_MESSAGE_GL_SCANOUT, &payload);<br>+<br>+    qxl_state->x_res = width;<br>+    qxl_state->y_res = height;<br>+    qxl_state->use_hardware_cursor = TRUE;<br>+    qxl_state->primary_active = TRUE;<br>+<br>+    reds_update_client_mouse_allowed(qxl_state->reds);<br> }<br> <br> SPICE_GNUC_VISIBLE</div><div><br></div><div><br></div><div>Frediano<br></div><div><br></div></div></body></html>