qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/7] ui: Add dpy_reset()


From: John Baboval
Subject: [Qemu-devel] [PATCH 5/7] ui: Add dpy_reset()
Date: Thu, 19 Dec 2013 13:40:15 -0500

From: "John V. Baboval" <address@hidden>

To be called by graphics adapter to have the ui re-initialize monitor state.

Signed-off-by: John V. Baboval <address@hidden>
---
 include/ui/console.h |    3 +++
 ui/console.c         |    8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/include/ui/console.h b/include/ui/console.h
index a69ac3d..a7171cc 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -176,6 +176,8 @@ typedef struct DisplayChangeListenerOps {
     void (*dpy_text_update)(DisplayChangeListener *dcl,
                             int x, int y, int w, int h);
 
+    void (*dpy_reset)(DisplayChangeListener *dcl);
+
     void (*dpy_mouse_set)(DisplayChangeListener *dcl,
                           int x, int y, int on);
     void (*dpy_cursor_define)(DisplayChangeListener *dcl,
@@ -230,6 +232,7 @@ void dpy_text_resize(QemuConsole *con, int w, int h);
 void dpy_mouse_set(QemuConsole *con, int x, int y, int on);
 void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor);
 bool dpy_cursor_define_supported(QemuConsole *con);
+void dpy_reset(QemuConsole *con);
 
 static inline int surface_stride(DisplaySurface *s)
 {
diff --git a/ui/console.c b/ui/console.c
index 0919973..201e602 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1560,6 +1560,17 @@ bool dpy_cursor_define_supported(QemuConsole *con)
     return false;
 }
 
+void dpy_reset(QemuConsole *con)
+{
+    DisplayState *s = con->ds;
+    struct DisplayChangeListener *dcl;
+    QLIST_FOREACH(dcl, &s->listeners, next) {
+        if (dcl->ops->dpy_reset) {
+            dcl->ops->dpy_reset(dcl);
+        }
+    }
+}
+
 /***********************************************************/
 /* register display */
 
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]