~ubuntu-branches/ubuntu/lucid/qemu-kvm/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/06_set_sdl_title.patch

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-09-18 10:59:44 UTC
  • Revision ID: james.westby@ubuntu.com-20090918105944-sdj0aui4cwe1hea4
Tags: 0.11.0~rc2-0ubuntu5
* debian/patches/06_set_sdl_title.patch: set the sdl title properly
  when using -name, LP: #423076
* debian/patches/07_right_ctrl_grab.patch: support right-ctrl grab
  for improved accessibility, LP: #237635
* debian/08_fix_qemu-ifup.patch: fix positional argument problem in
  qemu-ifup script, LP: #237635
* debian/install, debian/links: install qemu-ifup and qemu-ifdown to
  /usr/bin, and symlink them to the (somewhat silly) location where
  qemu expects to find an executable script, update the ifdown script
  to use the same logic in determining the bridge interface, LP: #430655

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
qemu: improve sdl title information
 
2
 
 
3
Include the `-name XXX` commandline param in the gnome-panel window list
 
4
via icon_title.
 
5
 
 
6
https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/423076
 
7
 
 
8
From: Dominic Evans
 
9
Subject: [Qemu-devel] [PATCH] Set SDL icon_title when using `-name XXX` for proper gnome-panel window list integration
 
10
Date: Thu, 17 Sep 2009 12:09:51 +0100
 
11
 
 
12
diff --git a/sdl.c b/sdl.c
 
13
index de63c7f..42b6f37 100644
 
14
--- a/sdl.c
 
15
+++ b/sdl.c
 
16
@@ -407,7 +407,8 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
 
17
 
 
18
 static void sdl_update_caption(void)
 
19
 {
 
20
-    char buf[1024];
 
21
+    char win_title[1024];
 
22
+    char icon_title[1024];
 
23
     const char *status = "";
 
24
 
 
25
     if (!vm_running)
 
26
@@ -419,12 +420,15 @@ static void sdl_update_caption(void)
 
27
             status = " - Press Ctrl-Alt-Shift to exit grab";
 
28
     }
 
29
 
 
30
-    if (qemu_name)
 
31
-        snprintf(buf, sizeof(buf), "QEMU (%s)%s", qemu_name, status);
 
32
-    else
 
33
-        snprintf(buf, sizeof(buf), "QEMU%s", status);
 
34
+    if (qemu_name) {
 
35
+        snprintf(win_title, sizeof(win_title), "QEMU (%s)%s", qemu_name, status);
 
36
+        snprintf(icon_title, sizeof(icon_title), "QEMU (%s)", qemu_name);
 
37
+    } else {
 
38
+        snprintf(win_title, sizeof(win_title), "QEMU%s", status);
 
39
+        snprintf(icon_title, sizeof(icon_title), "QEMU");
 
40
+    }
 
41
 
 
42
-    SDL_WM_SetCaption(buf, "QEMU");
 
43
+    SDL_WM_SetCaption(win_title, icon_title);
 
44
 }
 
45
 
 
46
 static void sdl_hide_cursor(void)
 
47