openbsd-ports/x11/osd_clock/patches/patch-osd_clock_c
2004-12-01 06:46:35 +00:00

36 lines
987 B
Plaintext

$OpenBSD: patch-osd_clock_c,v 1.1.1.1 2004/12/01 06:46:35 jolan Exp $
--- osd_clock.c.orig Sat Apr 7 17:50:01 2001
+++ osd_clock.c Wed Dec 1 00:34:21 2004
@@ -109,7 +109,15 @@ int main (int argc, char *argv[])
}
}
- osd = xosd_init (font, color, delay, pos, offset, shadow);
+ osd = xosd_create(1);
+
+ xosd_set_font(osd, font);
+ xosd_set_colour(osd, color);
+ xosd_set_timeout(osd, delay);
+ xosd_set_pos(osd, pos);
+ xosd_set_vertical_offset(osd, offset);
+ xosd_set_shadow_offset(osd, shadow);
+
if (!osd)
{
fprintf (stderr, "Error initializing osd\n");
@@ -126,11 +134,12 @@ int main (int argc, char *argv[])
strftime(output, 255, format, localtime(&curr_time));
- xosd_display (osd, 1, XOSD_string, output);
+ if ((xosd_display (osd, 0, XOSD_string, output)) == -1)
+ (void)fprintf(stderr, "xosd_display() failed\n");
sleep(interval);
}
- xosd_uninit (osd);
+ xosd_destroy (osd);
return EXIT_SUCCESS;
}