From: Dominic Evans <oldmanuk@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
Date: Thu, 24 Sep 2009 12:13:56 +0100 [thread overview]
Message-ID: <2ca5c65a0909240413i714044cev35cc1ec39a75fd79@mail.gmail.com> (raw)
In-Reply-To: <d9c105ea0909180859xcdef005qb235f3e7c313895@mail.gmail.com>
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/423076
Signed-off-by: Dominic Evans <oldmanuk@gmail.com>
---
diff --git a/sdl.c b/sdl.c
index de63c7f..42b6f37 100644
--- a/sdl.c
+++ b/sdl.c
@@ -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)
prev parent reply other threads:[~2009-09-24 11:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 11:09 [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration Dominic Evans
2009-09-17 15:25 ` Anthony Liguori
2009-09-18 0:05 ` Dustin Kirkland
2009-09-18 15:59 ` Dustin Kirkland
2009-09-24 11:13 ` Dominic Evans [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ca5c65a0909240413i714044cev35cc1ec39a75fd79@mail.gmail.com \
--to=oldmanuk@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).