Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2007 15:43:21 +0600
From:      Alexey Privalov <lubeg@rootshell.be>
To:        ports@freebsd.org
Subject:   misc/hotkeys package
Message-ID:  <20070302154321.1110ddf7@ontario>

next in thread | raw e-mail | index | archive | help
--MP_BIE0oOfv+9+IglbCEYmZZSs
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all,

there is a problem with misc/hotkeys package.. 
while building with XOSD support it doesn't show anything on my desk.

xosd_init which is used is deprecated. here is a little patch to fix it.
also added some config features.

Best regards.
--MP_BIE0oOfv+9+IglbCEYmZZSs
Content-Type: text/x-patch; name=xosd.patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=xosd.patch

--- src/conf.c.orig	Thu Nov 28 01:30:08 2002
+++ src/conf.c	Fri Mar  2 14:53:27 2007
@@ -75,9 +78,14 @@
 //    "osd_font",        "-*-lucidatypewriter-bold-r-normal-*-*-250-*-*-*-*-*-*",
     "osd_font",        "lucidasanstypewriter-bold-24",
     "osd_color",       "LawnGreen",
+    "osd_shadow_color","Black",
+    "osd_shadow_offset","3",
     "osd_timeout",     "3",
     "osd_position",    "bottom",
-    "osd_offset",      "25",
+    "osd_align",       "center",
+    "osd_hoffset",     "25",
+    "osd_voffset",     "25",
+    "osd_bar_length",  "25",
     NULL,              NULL
 };
 
--- src/hotkeys.c.orig	Wed Dec  4 01:26:32 2002
+++ src/hotkeys.c	Fri Mar  2 15:04:12 2007
@@ -1435,15 +1450,16 @@
 #ifdef HAVE_LIBXOSD
     if ( osd )
     {
-        osd = xosd_init(xstrdup(getConfig("osd_font")),
-                        /* I dunno why, but you must call strdup here... */
-                        xstrdup(getConfig("osd_color")),
-                        atoi(getConfig("osd_timeout")),
-                        strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top,
-                        atoi(getConfig("osd_offset")), 
-                        3       /* shadow offset */,
-                        3       /* number_lines */ 
-                        );
+	osd = xosd_create(3);
+	xosd_set_pos(osd, strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top);
+	xosd_set_bar_length(osd, atoi(getConfig("osd_bar_length")));
+	xosd_set_colour(osd, xstrdup(getConfig("osd_color")));
+	xosd_set_shadow_colour(osd, xstrdup(getConfig("osd_shadow_color")));
+	xosd_set_shadow_offset(osd, atoi(getConfig("osd_shadow_offset")));
+	xosd_set_horizontal_offset(osd, atoi(getConfig("osd_hoffset")));
+	xosd_set_vertical_offset(osd, atoi(getConfig("osd_voffset")));
+	xosd_set_font(osd, xstrdup(getConfig("osd_font")));
+        xosd_set_align(osd, strncmp(getConfig("osd_align"),"left",4)?((!strncmp(getConfig("osd_align"),"center",6))?XOSD_center:XOSD_right):XOSD_left);
     }
 #endif
 }

--MP_BIE0oOfv+9+IglbCEYmZZSs--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070302154321.1110ddf7>