ui/console: Check console before emitting GL event
PATCH 1/1 ui/console: Check console before emitting GL event
Signed-off-by Akihiko Odaki <[email protected]>
--- ui/console.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
ui/console.c +21 -0
@@ -1886,6 +1886,9 @@ void dpy_gl_scanout_disable(QemuConsole *con) con->scanout.kind =SCANOUT_NONE ; } QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_disable) { dcl->ops->dpy_gl_scanout_disable (dcl); }
@@ -1909,6 +1912,9 @@ void dpy_gl_scanout_texture(QemuConsole *con, x, y, width, height }; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_texture) { dcl->ops->dpy_gl_scanout_texture(dcl, backing_id, backing_y_0_top,
@@ -1927,6 +1933,9 @@ void dpy_gl_scanout_dmabuf(QemuConsole *con, con->scanout.kind =SCANOUT_DMABUF ; con->scanout.dmabuf = dmabuf; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_dmabuf) { dcl->ops->dpy_gl_scanout_dmabuf (dcl, dmabuf); }
@@ -1940,6 +1949,9 @@ void dpy_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf,DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_cursor_dmabuf) { dcl->ops->dpy_gl_cursor_dmabuf (dcl, dmabuf, have_hot, hot_x, hot_y);
@@ -1954,6 +1966,9 @@ void dpy_gl_cursor_position(QemuConsole *con,DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_cursor_position) { dcl->ops->dpy_gl_cursor_position (dcl, pos_x, pos_y); }
@@ -1967,6 +1982,9 @@ void dpy_gl_release_dmabuf(QemuConsole *con,DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_release_dmabuf) { dcl->ops->dpy_gl_release_dmabuf (dcl, dmabuf); }
@@ -1983,6 +2001,9 @@ void dpy_gl_update(QemuConsole *con,graphic_hw_gl_block (con, true); QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_update) { dcl->ops->dpy_gl_update (dcl, x, y, w, h); }
Signature · 1 line
2.32.0 (Apple Git-132)
Hi
Quoted 2 lines · Akihiko Odaki
Signed-off-by Akihiko Odaki <[email protected]>
Reviewed-by Marc-André Lureau <[email protected]>
Akihiko, is this fixing a visible bug? If so, it would be nice you detail it in the commit message and someone should queue it for 7.0
thanks
Quoted 84 lines
--- ui/console.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)ui/console.c +12
-0@@ -1886,6 +1886,9 @@ void dpy_gl_scanout_disable(QemuConsole *con) con->scanout.kind =SCANOUT_NONE ; } QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_disable) { dcl->ops->dpy_gl_scanout_disable (dcl); }@@ -1909,6 +1912,9 @@ void dpy_gl_scanout_texture(QemuConsole *con, x, y, width, height }; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_texture) { dcl->ops->dpy_gl_scanout_texture(dcl, backing_id, backing_y_0_top,@@ -1927,6 +1933,9 @@ void dpy_gl_scanout_dmabuf(QemuConsole *con, con->scanout.kind =SCANOUT_DMABUF ; con->scanout.dmabuf = dmabuf; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_scanout_dmabuf) { dcl->ops->dpy_gl_scanout_dmabuf (dcl, dmabuf); }@@ -1940,6 +1949,9 @@ void dpy_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf, DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_cursor_dmabuf) { dcl->ops->dpy_gl_cursor_dmabuf(dcl, dmabuf,have_hot, hot_x, hot_y);ui/console.c +9
-1@@ -1954,6 +1966,9 @@ void dpy_gl_cursor_position(QemuConsole *con,DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_cursor_position) { dcl->ops->dpy_gl_cursor_position (dcl, pos_x, pos_y); }@@ -1967,6 +1982,9 @@ void dpy_gl_release_dmabuf(QemuConsole *con,DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_release_dmabuf) { dcl->ops->dpy_gl_release_dmabuf (dcl, dmabuf); }@@ -1983,6 +2001,9 @@ void dpy_gl_update(QemuConsole *con,graphic_hw_gl_block (con, true); QLIST_FOREACH(dcl, &s->listeners, next) { +if (con != (dcl->con ? dcl->con : active_console)) { +continue ; + }if (dcl->ops->dpy_gl_update) { dcl->ops->dpy_gl_update (dcl, x, y, w, h); } --2.32.0 (Apple Git-132)
Signature · 1 line
Marc-André Lureau