diff mbox series

[06/67] ui/console: console_select() regardless of have_gfx

Message ID 20230830093843.3531473-7-marcandre.lureau@redhat.com
State New
Headers show
Series Make pixman an optional dependency | expand

Commit Message

Marc-André Lureau Aug. 30, 2023, 9:37 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Even if we don't have a gfx listener, we should call
displaychangelistener_display_console() which handle that case correctly.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/console.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Daniel P. Berrangé Aug. 30, 2023, 11:05 a.m. UTC | #1
On Wed, Aug 30, 2023 at 01:37:40PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Even if we don't have a gfx listener, we should call
> displaychangelistener_display_console() which handle that case correctly.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/console.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index bec2d1a40a..14717a6f4d 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1047,13 +1047,11 @@  void console_select(unsigned int index)
         DisplayState *ds = s->ds;
 
         active_console = s;
-        if (ds->have_gfx) {
-            QLIST_FOREACH(dcl, &ds->listeners, next) {
-                if (dcl->con != NULL) {
-                    continue;
-                }
-                displaychangelistener_display_console(dcl, s, NULL);
+        QLIST_FOREACH (dcl, &ds->listeners, next) {
+            if (dcl->con != NULL) {
+                continue;
             }
+            displaychangelistener_display_console(dcl, s, NULL);
         }
         dpy_text_resize(s, s->width, s->height);
         text_console_update_cursor(NULL);