提交 b4ed5d18 编写于 作者: D Dominic Evans 提交者: Aurelien Jarno

Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration

qemu: improve sdl title information

Include the `-name XXX` commandline param in the gnome-panel window list
via icon_title.

https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/423076Signed-off-by: NDominic Evans <oldmanuk@gmail.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 1f5c1775
......@@ -407,7 +407,8 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
static void sdl_update_caption(void)
{
char buf[1024];
char win_title[1024];
char icon_title[1024];
const char *status = "";
if (!vm_running)
......@@ -419,12 +420,15 @@ static void sdl_update_caption(void)
status = " - Press Ctrl-Alt-Shift to exit grab";
}
if (qemu_name)
snprintf(buf, sizeof(buf), "QEMU (%s)%s", qemu_name, status);
else
snprintf(buf, sizeof(buf), "QEMU%s", status);
if (qemu_name) {
snprintf(win_title, sizeof(win_title), "QEMU (%s)%s", qemu_name, status);
snprintf(icon_title, sizeof(icon_title), "QEMU (%s)", qemu_name);
} else {
snprintf(win_title, sizeof(win_title), "QEMU%s", status);
snprintf(icon_title, sizeof(icon_title), "QEMU");
}
SDL_WM_SetCaption(buf, "QEMU");
SDL_WM_SetCaption(win_title, icon_title);
}
static void sdl_hide_cursor(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册