aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-04-23 15:44:31 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-25 14:45:46 -0500
commit5209089fcd1373c363dc424827593ffaced12203 (patch)
treefe84ffff6e59236542d668b8cb869f4a397af1d3 /ui
parentcdd5b9375744130e2f49548a3cac7be176a931ca (diff)
console: zap ds arg from register_displaychangelistener
We don't have multiple DisplayStates any more, so passing it in as argument is not needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m2
-rw-r--r--ui/console.c10
-rw-r--r--ui/curses.c2
-rw-r--r--ui/gtk.c2
-rw-r--r--ui/sdl.c2
-rw-r--r--ui/spice-display.c2
-rw-r--r--ui/vnc.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index d51462a015..1971d9cb09 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1030,7 +1030,7 @@ void cocoa_display_init(DisplayState *ds, int full_screen)
// register vga output callbacks
dcl->ops = &dcl_ops;
- register_displaychangelistener(ds, dcl);
+ register_displaychangelistener(dcl);
// register cleanup function
atexit(cocoa_cleanup);
diff --git a/ui/console.c b/ui/console.c
index 3835316600..a13fb6463b 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -178,6 +178,7 @@ static int nb_consoles = 0;
static void text_console_do_init(CharDriverState *chr, DisplayState *ds);
static void dpy_refresh(DisplayState *s);
+static DisplayState *get_alloc_displaystate(void);
static void gui_update(void *opaque)
{
@@ -1309,15 +1310,14 @@ void qemu_free_displaysurface(DisplaySurface *surface)
g_free(surface);
}
-void register_displaychangelistener(DisplayState *ds,
- DisplayChangeListener *dcl)
+void register_displaychangelistener(DisplayChangeListener *dcl)
{
QemuConsole *con;
trace_displaychangelistener_register(dcl, dcl->ops->dpy_name);
- dcl->ds = ds;
- QLIST_INSERT_HEAD(&ds->listeners, dcl, next);
- gui_setup_refresh(ds);
+ dcl->ds = get_alloc_displaystate();
+ QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next);
+ gui_setup_refresh(dcl->ds);
if (dcl->con) {
dcl->con->dcls++;
con = dcl->con;
diff --git a/ui/curses.c b/ui/curses.c
index a85a7da316..289a9558de 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -359,7 +359,7 @@ void curses_display_init(DisplayState *ds, int full_screen)
dcl = (DisplayChangeListener *) g_malloc0(sizeof(DisplayChangeListener));
dcl->ops = &dcl_ops;
- register_displaychangelistener(ds, dcl);
+ register_displaychangelistener(dcl);
invalidate = 1;
}
diff --git a/ui/gtk.c b/ui/gtk.c
index 411034262c..42e3c0aad8 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1470,7 +1470,7 @@ void gtk_display_init(DisplayState *ds)
gtk_widget_show_all(s->window);
- register_displaychangelistener(ds, &s->dcl);
+ register_displaychangelistener(&s->dcl);
global_state = s;
}
diff --git a/ui/sdl.c b/ui/sdl.c
index c9f2928f00..39a42d6b0c 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -937,7 +937,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
dcl = g_malloc0(sizeof(DisplayChangeListener));
dcl->ops = &dcl_ops;
- register_displaychangelistener(ds, dcl);
+ register_displaychangelistener(dcl);
mouse_mode_notifier.notify = sdl_mouse_mode_change;
qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier);
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 53c19bea0f..82d8b9f9a5 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -625,7 +625,7 @@ void qemu_spice_display_init(DisplayState *ds)
ssd->dcl.ops = &display_listener_ops;
ssd->dcl.con = qemu_console_lookup_by_index(0);
- register_displaychangelistener(ds, &ssd->dcl);
+ register_displaychangelistener(&ssd->dcl);
qemu_spice_create_host_primary(ssd);
}
diff --git a/ui/vnc.c b/ui/vnc.c
index 8ee66b7d3b..86fe1ddf88 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2832,7 +2832,7 @@ void vnc_display_init(DisplayState *ds)
vnc_start_worker_thread();
vs->dcl.ops = &dcl_ops;
- register_displaychangelistener(ds, &vs->dcl);
+ register_displaychangelistener(&vs->dcl);
}