Patchwork [06/22] console: init displaychangelisteners on register

login
register
mail settings
Submitter Gerd Hoffmann
Date Nov. 1, 2012, 1:04 p.m.
Message ID <1351775057-3938-7-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/196202/
State New
Headers show

Comments

Gerd Hoffmann - Nov. 1, 2012, 1:04 p.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 console.h |    3 +++
 vl.c      |    1 -
 2 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/console.h b/console.h
index 00e2f03..7e0ac76 100644
--- a/console.h
+++ b/console.h
@@ -241,6 +241,9 @@  static inline void register_displaychangelistener(DisplayState *ds, DisplayChang
 {
     QLIST_INSERT_HEAD(&ds->listeners, dcl, next);
     gui_setup_refresh(ds);
+    if (dcl->dpy_gfx_resize) {
+        dcl->dpy_gfx_resize(ds);
+    }
 }
 
 static inline void unregister_displaychangelistener(DisplayState *ds,
diff --git a/vl.c b/vl.c
index 8716fc0..df776e9 100644
--- a/vl.c
+++ b/vl.c
@@ -3876,7 +3876,6 @@  int main(int argc, char **argv, char **envp)
 #endif
 
     /* display setup */
-    dpy_gfx_resize(ds);
     text_consoles_set_display(ds);
 
     if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {