Skip to contentSkip to conversation

Fixed mouse cursor location for scaled dmabuf

PATCH New Qiming HOU 1 participant 2 messages Jul 7, 2018

lore
Share & tools
lore

Qiming HOU

author
#0 lore raw

cover Fixed mouse cursor location for scaled dmabuf

When a GVT-g virtual machine using dmabuf has its display output scaled by the gtk UI, its mouse cursor is positioned incorrectly.

This patch fixes that.

Qiming HOU (1):
hw/gtk-egl: fixed dmabuf cursor location when the main buffer is
scaled

 ui/gtk-egl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.17.1.windows.2
author
#1 lore raw

PATCH 1/1 hw/gtk-egl: fixed dmabuf cursor location when the main buffer is scaled

---
 ui/gtk-egl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/gtk-egl.c +1 -1
index fb00ad1..e3722c0 100644
@@ -272,7 +272,7 @@ void gd_egl_scanout_flush(DisplayChangeListener *dcl,
                          vc->gfx.y0_top);
         egl_texture_blend(vc->gfx.gls, &vc->gfx.win_fb, &vc->gfx.cursor_fb,
                           vc->gfx.y0_top,
-                          vc->gfx.cursor_x, vc->gfx.cursor_y);
+                          vc->gfx.cursor_x * ww / vc->gfx.w, vc->gfx.cursor_y * wh / vc->gfx.h);
     } else {
         egl_fb_blit(&vc->gfx.win_fb, &vc->gfx.guest_fb, !vc->gfx.y0_top);
     }
Signature · 1 line
2.17.1.windows.2