Workaround a segfault with new gtk+3.
reported by and ok dcoppa@
This commit is contained in:
parent
5b237cc087
commit
efd90e4d8c
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2012/06/08 14:58:05 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2012/10/04 13:48:28 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -7,7 +7,7 @@ COMMENT= Unico GTK+3 engine
|
||||
V= 1.0.2
|
||||
DISTNAME= unico-${V}
|
||||
PKGNAME= gtk3-unico-engine-${V}
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
CATEGORIES= x11
|
||||
|
||||
@ -19,13 +19,14 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
|
||||
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 cairo cairo-gobject
|
||||
WANTLIB += drm expat ffi fontconfig freetype gdk-3 gdk_pixbuf-2.0
|
||||
WANTLIB += GL ICE SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp
|
||||
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0
|
||||
WANTLIB += atk-bridge-2.0 atspi cairo cairo-gobject dbus-1 drm
|
||||
WANTLIB += expat ffi fontconfig freetype gdk-3 gdk_pixbuf-2.0
|
||||
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
|
||||
WANTLIB += gtk-3 m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre
|
||||
WANTLIB += pixman-1 png pthread-stubs stdc++ xcb xcb-render xcb-shm
|
||||
WANTLIB += z
|
||||
WANTLIB += gtk-3 harfbuzz icudata icule icuuc m pango-1.0 pangocairo-1.0
|
||||
WANTLIB += pangoft2-1.0 pcre pixman-1 png pthread pthread-stubs
|
||||
WANTLIB += stdc++ xcb xcb-render xcb-shm z
|
||||
|
||||
MASTER_SITES= http://launchpad.net/unico/1.0/${V}/+download/
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
$OpenBSD: patch-unico_gtkroundedbox_c,v 1.1 2012/06/08 14:58:05 dcoppa Exp $
|
||||
$OpenBSD: patch-unico_gtkroundedbox_c,v 1.2 2012/10/04 13:48:28 ajacoutot Exp $
|
||||
|
||||
Disable rounded corner code that crashes on newer gtk+3.
|
||||
|
||||
Fix segfault in draw_background(GtkThemingEngine *engine, ...)
|
||||
|
||||
--- unico/gtkroundedbox.c.orig Thu Mar 29 16:26:20 2012
|
||||
+++ unico/gtkroundedbox.c Fri Jun 8 16:41:41 2012
|
||||
@@ -85,10 +85,10 @@ gtk_rounded_box_clamp_border_radius (GtkRoundedBox *bo
|
||||
--- unico/gtkroundedbox.c.orig Thu Oct 4 15:27:41 2012
|
||||
+++ unico/gtkroundedbox.c Thu Oct 4 15:27:44 2012
|
||||
@@ -85,21 +85,22 @@ gtk_rounded_box_clamp_border_radius (GtkRoundedBox *bo
|
||||
}
|
||||
|
||||
void
|
||||
@ -17,5 +19,20 @@ Fix segfault in draw_background(GtkThemingEngine *engine, ...)
|
||||
+ GtkStateFlags state,
|
||||
+ GtkJunctionSides junction)
|
||||
{
|
||||
GtkCssBorderCornerRadius *corner[4];
|
||||
- GtkCssBorderCornerRadius *corner[4];
|
||||
+ GtkCssBorderCornerRadius *corner[4] = { NULL, NULL, NULL, NULL };
|
||||
guint i;
|
||||
|
||||
+ /* NOTE: Border radius is disabled due to it not working in GTK+ 3.5 */
|
||||
gtk_theming_engine_get (engine, state,
|
||||
/* Can't use border-radius as it's an int for
|
||||
* backwards compat */
|
||||
- "border-top-left-radius", &corner[GTK_CSS_TOP_LEFT],
|
||||
+ /*"border-top-left-radius", &corner[GTK_CSS_TOP_LEFT],
|
||||
"border-top-right-radius", &corner[GTK_CSS_TOP_RIGHT],
|
||||
"border-bottom-right-radius", &corner[GTK_CSS_BOTTOM_RIGHT],
|
||||
- "border-bottom-left-radius", &corner[GTK_CSS_BOTTOM_LEFT],
|
||||
+ "border-bottom-left-radius", &corner[GTK_CSS_BOTTOM_LEFT],*/
|
||||
NULL);
|
||||
|
||||
if (corner[GTK_CSS_TOP_LEFT] && (junction & GTK_JUNCTION_CORNER_TOPLEFT) == 0)
|
||||
|
103
x11/gtk3-unico-engine/patches/patch-unico_unico-draw_c
Normal file
103
x11/gtk3-unico-engine/patches/patch-unico_unico-draw_c
Normal file
@ -0,0 +1,103 @@
|
||||
$OpenBSD: patch-unico_unico-draw_c,v 1.1 2012/10/04 13:48:28 ajacoutot Exp $
|
||||
|
||||
Disable rounded corner code that crashes on newer gtk+3.
|
||||
|
||||
--- unico/unico-draw.c.orig Thu Mar 29 16:26:20 2012
|
||||
+++ unico/unico-draw.c Thu Oct 4 15:27:44 2012
|
||||
@@ -531,8 +531,8 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
{
|
||||
GtkBorder border;
|
||||
GtkBorder *outer_border;
|
||||
- GtkCssBorderCornerRadius *top_left_radius, *top_right_radius;
|
||||
- GtkCssBorderCornerRadius *bottom_left_radius, *bottom_right_radius;
|
||||
+ /*GtkCssBorderCornerRadius *top_left_radius, *top_right_radius;
|
||||
+ GtkCssBorderCornerRadius *bottom_left_radius, *bottom_right_radius;*/
|
||||
GtkJunctionSides junction;
|
||||
GtkStateFlags state;
|
||||
gboolean has_outer_stroke = FALSE;
|
||||
@@ -544,13 +544,14 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
|
||||
state = gtk_theming_engine_get_state (engine);
|
||||
|
||||
+ /* NOTE: Border radius is disabled due to it not working in GTK+ 3.5 */
|
||||
gtk_theming_engine_get (engine, state,
|
||||
/* Can't use border-radius as it's an int for
|
||||
* backwards compat */
|
||||
- "border-top-left-radius", &top_left_radius,
|
||||
+ /*"border-top-left-radius", &top_left_radius,
|
||||
"border-top-right-radius", &top_right_radius,
|
||||
"border-bottom-right-radius", &bottom_right_radius,
|
||||
- "border-bottom-left-radius", &bottom_left_radius,
|
||||
+ "border-bottom-left-radius", &bottom_left_radius,*/
|
||||
"-unico-outer-stroke-width", &outer_border,
|
||||
NULL);
|
||||
gtk_theming_engine_get_border (engine, state, &border);
|
||||
@@ -575,11 +576,11 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
hc += outer_border->top;
|
||||
}
|
||||
|
||||
- if (xy0_gap < _gtk_css_number_get (&top_left_radius->horizontal, width))
|
||||
+ /*if (xy0_gap < _gtk_css_number_get (&top_left_radius->horizontal, width))
|
||||
junction |= GTK_JUNCTION_CORNER_TOPLEFT;
|
||||
|
||||
if (xy1_gap > width - _gtk_css_number_get (&top_right_radius->horizontal, width))
|
||||
- junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
|
||||
+ junction |= GTK_JUNCTION_CORNER_TOPRIGHT;*/
|
||||
|
||||
break;
|
||||
default:
|
||||
@@ -597,11 +598,11 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
hc += outer_border->bottom;
|
||||
}
|
||||
|
||||
- if (xy0_gap < _gtk_css_number_get (&bottom_left_radius->horizontal, width))
|
||||
+ /*if (xy0_gap < _gtk_css_number_get (&bottom_left_radius->horizontal, width))
|
||||
junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
|
||||
|
||||
if (xy1_gap > width - _gtk_css_number_get (&bottom_right_radius->horizontal, width))
|
||||
- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
|
||||
+ junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;*/
|
||||
|
||||
break;
|
||||
case GTK_POS_LEFT:
|
||||
@@ -617,11 +618,11 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
hc = MAX (xy1_gap - xy0_gap - (outer_border->top + outer_border->bottom) - (border.top + border.bottom), 0);
|
||||
}
|
||||
|
||||
- if (xy0_gap < _gtk_css_number_get (&top_left_radius->vertical, height))
|
||||
+ /*if (xy0_gap < _gtk_css_number_get (&top_left_radius->vertical, height))
|
||||
junction |= GTK_JUNCTION_CORNER_TOPLEFT;
|
||||
|
||||
if (xy1_gap > height - _gtk_css_number_get (&bottom_left_radius->vertical, height))
|
||||
- junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
|
||||
+ junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;*/
|
||||
|
||||
break;
|
||||
case GTK_POS_RIGHT:
|
||||
@@ -638,11 +639,11 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
hc = MAX (xy1_gap - xy0_gap - (outer_border->top + outer_border->bottom) - (border.top + border.bottom), 0);
|
||||
}
|
||||
|
||||
- if (xy0_gap < _gtk_css_number_get (&top_right_radius->vertical, height))
|
||||
+ /*if (xy0_gap < _gtk_css_number_get (&top_right_radius->vertical, height))
|
||||
junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
|
||||
|
||||
if (xy1_gap > height - _gtk_css_number_get (&bottom_right_radius->vertical, height))
|
||||
- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
|
||||
+ junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;*/
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -660,10 +661,10 @@ unico_draw_frame_gap (DRAW_ARGS,
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
- g_free (top_left_radius);
|
||||
+ /*g_free (top_left_radius);
|
||||
g_free (top_right_radius);
|
||||
g_free (bottom_right_radius);
|
||||
- g_free (bottom_left_radius);
|
||||
+ g_free (bottom_left_radius);*/
|
||||
gtk_border_free (outer_border);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user