summaryrefslogtreecommitdiff
path: root/recipes/matchbox-panel/matchbox-panel-0.9.3
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/matchbox-panel/matchbox-panel-0.9.3
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/matchbox-panel/matchbox-panel-0.9.3')
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-battery-repaint-093.patch32
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-system-monitor-crash.patch85
2 files changed, 117 insertions, 0 deletions
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-battery-repaint-093.patch b/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-battery-repaint-093.patch
new file mode 100644
index 0000000000..22cc56e56a
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-battery-repaint-093.patch
@@ -0,0 +1,32 @@
+--- matchbox-panel-0.9.3/applets/mb-applet-battery.c.orig 2006-04-05 12:28:01.883215416 +0200
++++ matchbox-panel-0.9.3/applets/mb-applet-battery.c 2006-04-05 12:29:14.973104064 +0200
+@@ -374,12 +374,6 @@
+
+ MBPixbufImage *img_backing = NULL;
+
+- while (!read_apm(apm_vals))
+- usleep(50000L);
+-
+- if (last_percentage == apm_vals[PERCENTAGE] && last_ac == apm_vals[AC_POWER])
+- return;
+-
+ img_backing = mb_tray_app_get_background (app, pb);
+
+ /* we assume width = height */
+@@ -571,10 +565,12 @@
+
+ }
+
+-void
+-timeout_callback ( MBTrayApp *app )
+-{
+- mb_tray_app_repaint (app);
++void timeout_callback (MBTrayApp *app) {
++ while (!read_apm(apm_vals))
++ usleep(50000L);
++
++ if (last_percentage != apm_vals[PERCENTAGE] || last_ac != apm_vals[AC_POWER])
++ mb_tray_app_repaint (app);
+ }
+
+ void
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-system-monitor-crash.patch b/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-system-monitor-crash.patch
new file mode 100644
index 0000000000..8773003b34
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.3/mb-applet-system-monitor-crash.patch
@@ -0,0 +1,85 @@
+Program received signal SIGSEGV, Segmentation fault.
+0x4002dfbc in mb_pixbuf_img_plot_pixel (pb=<value optimized out>, img=0x1ba40, x=22,
+ y=-434, r=255 'ÿ', g=0 '\0', b=0 '\0') at mbpixbuf.c:2087
+(gdb) bt
+#0 0x4002dfbc in mb_pixbuf_img_plot_pixel (pb=<value optimized out>, img=0x1ba40, x=22,
+ y=-434, r=255 'ÿ', g=0 '\0', b=0 '\0') at mbpixbuf.c:2087
+#1 0x0000966c in paint_callback (app=<value optimized out>, drw=46137348)
+ at mb-applet-system-monitor.c:272
+#2 0x4002b8f6 in handle_expose (mb=0x1ba40, event=<value optimized out>) at mbtray.c:820
+#3 0x4002b922 in mb_tray_app_repaint (mb=0x1ba40) at mbtray.c:833
+#4 0x00008fd4 in timeout_callback (app=0x1ba40) at mb-applet-system-monitor.c:347
+#5 0x4002c580 in mb_tray_app_main (mb=0x14008) at mbtray.c:302
+#6 0x00009878 in main (argc=1, argv=0xbecf1ca4) at mb-applet-system-monitor.c:410
+(gdb) up
+(gdb) print membox_h
+$1 = 20
+(gdb) print mem_pixels
+$2 = 18798069
+(gdb) print memsize
+$3 = 1597228901
+(gdb) print msd
+$4 = {loadIndex = 15, samples = 16, load = 0x18a90, total = 0x18b18,
+ mem_used = 18446744073706139648, mem_max = 63750144, swap_used = 0, swap_max = 0,
+ swap_percent = 0, mem_percent = 1597228901}
+
+Huh, mem_used doesn't look good!
+
+root@zaurus:~# printf %lx\\n -18446744073706139648
+341000
+
+Well, it's negative. The algorithm is a bit stange.
+
+root@zaurus:~# cat /proc/meminfo
+MemTotal: 62256 kB
+MemFree: 8504 kB
+Buffers: 1508 kB
+Cached: 24692 kB
+SwapCached: 8604 kB
+Active: 22632 kB
+Inactive: 21344 kB
+SwapTotal: 131064 kB
+SwapFree: 72060 kB
+Dirty: 0 kB
+Writeback: 0 kB
+AnonPages: 12636 kB
+Mapped: 5532 kB
+Slab: 4300 kB
+SReclaimable: 1456 kB
+SUnreclaim: 2844 kB
+PageTables: 1116 kB
+NFS_Unstable: 0 kB
+Bounce: 0 kB
+WritebackTmp: 0 kB
+CommitLimit: 162192 kB
+Committed_AS: 81568 kB
+VmallocTotal: 581632 kB
+VmallocUsed: 9112 kB
+VmallocChunk: 565244 kB
+
+Now let's compute what's happening:
+
+cache_used = cache_total - cache_free;
+my_mem_used = cache_used + used - cached - buffers;
+12636 - 5532 + 8604 - 24692 - 1508 = -10492
+ ======
+
+Well, I don't know, how to compute a really used memory, but I could at
+least sanitize the value. Here you are:
+
+Index: matchbox-panel-0.9.3/applets/mb-applet-system-monitor.c
+===================================================================
+--- matchbox-panel-0.9.3/applets/mb-applet-system-monitor.c 2006-02-07 22:19:12.000000000 +0000
++++ matchbox-panel-0.9.3/applets/mb-applet-system-monitor.c 2009-02-21 13:19:41.000000000 +0000
+@@ -195,6 +195,11 @@
+ my_mem_max = total;
+ my_swap_max = cache_total;
+ my_mem_used = cache_used + used - cached - buffers;
++ /* Ugly hack! Fix mem-used algorithm is needed. */
++ if (my_mem_used < 0)
++ my_mem_used = 0;
++ if (my_mem_used > my_mem_max)
++ my_mem_used = my_mem_max;
+ msd.mem_used = my_mem_used;
+ msd.mem_max = my_mem_max;
+ msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;