From:
[email protected]
Hello Tim!
My boss will kill me for spending so much time on xosd :-)
On Fri, Aug 20, 2004 at 10:24:49AM +0200, Philipp Matthias Hahn wrote:
Now I can. 3 chunks from 26_one_line.diff got lost. Please revert to 2.2.9-pre2 and apply the missing chunks:
You'd better apply 26_one_line_addon.diff on 2.2.9-pre3, or you'll loose
your XOSD_MAX_PRINTF_BUF_SIZE extraction.
I also was contacted about another bug related to xosd: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265757
There is a potential deadlock with synchronous calls like xsod_show(),
which block until the X11 thread has painted the last changes. After
display, is uses pthread_broadcast() to signal the "waiting" thread, but nobody sais it's already waiting. If the scheduling is poor, the signal
would get lost and the thread calling xosd_show() would block until the display is hidden. If the scheduling is even poorer, that signal can
also get lost and we'll get a deadlock.
35_synchronous.diff addresses the first concern and greatly improves
speed, but there's still a potential deadlock.
Debs are available from
http://pint.pmhahn.de/pmhahn/debian/sid/x/xosd/,
might be from
http://incoming.debina.org/ or will be in Debians
Experimental.
BYtE
Philipp
--
Philipp Matthias Hahn <
[email protected]>
GPG/PGP: 9A540E39 @ keyrings.debian.org
#DPATCHLEVEL=0
# Revert broken upstream changes and apply missing parts from my patch
--- src/libxosd/xosd.c
+++ src/libxosd/xosd.c
@@ -143,9 +143,6 @@
DEBUG(Dvalue, "percent=%d, nbars=%d, on=%d", l->value, nbars, on);
- /* adjust the y coordinate based on the line number */
- p.y += line*osd->line_height;
-
/* Outline */
if (osd->outline_offset) {
m.x = m.y = -osd->outline_offset;
@@ -210,9 +207,6 @@
break;
}
- /* adjust the y coordinate based on the line number */
- y += line*osd->line_height;
-
if (osd->shadow_offset) {
XSetForeground(osd->display, osd->gc, osd->shadow_pixel);
_draw_text(osd, l->string, x + osd->shadow_offset,
@@ -309,14 +303,14 @@
DEBUG(Dupdate, "UPD_lines");
for (line = 0; line < osd->number_lines; line++) {
int y = osd->line_height * line;
-#if 0 /* Turn on for debugging */
+#ifdef DEBUG_XSHAPE
XSetForeground(osd->display, osd->gc, osd->outline_pixel);
XFillRectangle(osd->display, osd->line_bitmap, osd->gc, 0,
-