* [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
@ 2009-09-17 11:09 Dominic Evans
2009-09-17 15:25 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Dominic Evans @ 2009-09-17 11:09 UTC (permalink / raw)
To: qemu-devel
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
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)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
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
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2009-09-17 15:25 UTC (permalink / raw)
To: Dominic Evans; +Cc: qemu-devel
Dominic Evans wrote:
> 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
>
Please include a Signed-off-by.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
2009-09-17 15:25 ` Anthony Liguori
@ 2009-09-18 0:05 ` Dustin Kirkland
2009-09-18 15:59 ` Dustin Kirkland
0 siblings, 1 reply; 5+ messages in thread
From: Dustin Kirkland @ 2009-09-18 0:05 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Dominic Evans, qemu-devel
On Thu, Sep 17, 2009 at 10:25 AM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Dominic Evans wrote:
>>
>> 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
>>
>
> Please include a Signed-off-by.
Hmm, I tested this patch for inclusion in Ubuntu. It seems to work (-name foo).
However, it seems to either break, or expose a bug in libvirt:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 493, in run_domain
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 558, in startup
self.vm.create()
File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error unable to start guest: /usr/bin/kvm:
invalid option -- '-domid'
I haven't quite made sense of this yet... -domid is not a valid
parameter in kvm, sure. However, when launching VM's in virt-manager
with this patch, this is the behavior I'm seeing...
:-Dustin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
2009-09-18 0:05 ` Dustin Kirkland
@ 2009-09-18 15:59 ` Dustin Kirkland
2009-09-24 11:13 ` Dominic Evans
0 siblings, 1 reply; 5+ messages in thread
From: Dustin Kirkland @ 2009-09-18 15:59 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Dominic Evans, qemu-devel
On Thu, Sep 17, 2009 at 7:05 PM, Dustin Kirkland
<dustin.kirkland@gmail.com> wrote:
> On Thu, Sep 17, 2009 at 10:25 AM, Anthony Liguori <anthony@codemonkey.ws> wrote:
>> Dominic Evans wrote:
>>>
>>> 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
>>>
>>
>> Please include a Signed-off-by.
>
> Hmm, I tested this patch for inclusion in Ubuntu. It seems to work (-name foo).
>
> However, it seems to either break, or expose a bug in libvirt:
>
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/engine.py", line 493, in run_domain
> vm.startup()
> File "/usr/share/virt-manager/virtManager/domain.py", line 558, in startup
> self.vm.create()
> File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in create
> if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
> libvirtError: internal error unable to start guest: /usr/bin/kvm:
> invalid option -- '-domid'
>
> I haven't quite made sense of this yet... -domid is not a valid
> parameter in kvm, sure. However, when launching VM's in virt-manager
> with this patch, this is the behavior I'm seeing...
Sorry, I take this back. My testing was not in a clean environment.
Dominic's patch works for me. I'm adding it to the Ubuntu qemu-kvm
package. Hopefully it will be accepted upstream for 0.12.
Tested-by: Dustin Kirkland <kirkland@canonical.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
2009-09-18 15:59 ` Dustin Kirkland
@ 2009-09-24 11:13 ` Dominic Evans
0 siblings, 0 replies; 5+ messages in thread
From: Dominic Evans @ 2009-09-24 11:13 UTC (permalink / raw)
To: qemu-devel
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)
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-24 11:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).