diff --git a/x11/gmtk/Makefile b/x11/gmtk/Makefile index b733b3dc060..3d5ff78d849 100644 --- a/x11/gmtk/Makefile +++ b/x11/gmtk/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.3 2012/01/23 11:01:34 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.4 2012/03/06 08:50:54 dcoppa Exp $ COMMENT = gnome-mplayer toolkit DISTNAME = gmtk-1.0.5 -REVISION = 1 +REVISION = 2 SHARED_LIBS = gmlib 0.0 \ gmtk 0.0 diff --git a/x11/gmtk/patches/patch-src_gmtk_common_c b/x11/gmtk/patches/patch-src_gmtk_common_c new file mode 100644 index 00000000000..a858c6cdb2a --- /dev/null +++ b/x11/gmtk/patches/patch-src_gmtk_common_c @@ -0,0 +1,23 @@ +$OpenBSD: patch-src_gmtk_common_c,v 1.1 2012/03/06 08:50:54 dcoppa Exp $ + +Only allocate a size for the child window if the parent widget is +realized (upstream svn revision r87) + +--- src/gmtk_common.c.orig Tue Mar 6 09:31:14 2012 ++++ src/gmtk_common.c Tue Mar 6 09:33:59 2012 +@@ -51,6 +51,15 @@ gboolean gmtk_get_visible(GtkWidget * widget) + #endif + } + ++gboolean gmtk_widget_get_realized(GtkWidget * widget) ++{ ++#ifdef GTK2_20_ENABLED ++ return gtk_widget_get_realized(widget); ++#else ++ return GTK_WIDGET_REALIZED(widget); ++#endif ++} ++ + const gchar *gmtk_version() + { + #ifdef ENABLE_NLS diff --git a/x11/gmtk/patches/patch-src_gmtk_common_h b/x11/gmtk/patches/patch-src_gmtk_common_h new file mode 100644 index 00000000000..b4f29c627f5 --- /dev/null +++ b/x11/gmtk/patches/patch-src_gmtk_common_h @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_gmtk_common_h,v 1.1 2012/03/06 08:50:54 dcoppa Exp $ + +Only allocate a size for the child window if the parent widget is +realized (upstream svn revision r87) + +--- src/gmtk_common.h.orig Tue Mar 6 09:30:46 2012 ++++ src/gmtk_common.h Tue Mar 6 09:31:08 2012 +@@ -46,6 +46,7 @@ + void gmtk_get_allocation(GtkWidget * widget, GtkAllocation * allocation); + GdkWindow *gmtk_get_window(GtkWidget * widget); + gboolean gmtk_get_visible(GtkWidget * widget); ++gboolean gmtk_widget_get_realized(GtkWidget * widget); + const gchar *gmtk_version(); + + #endif diff --git a/x11/gmtk/patches/patch-src_gmtk_media_player_c b/x11/gmtk/patches/patch-src_gmtk_media_player_c index 3b74bcc69c9..ad5474396d3 100644 --- a/x11/gmtk/patches/patch-src_gmtk_media_player_c +++ b/x11/gmtk/patches/patch-src_gmtk_media_player_c @@ -1,10 +1,22 @@ -$OpenBSD: patch-src_gmtk_media_player_c,v 1.1 2012/01/23 11:01:34 dcoppa Exp $ +$OpenBSD: patch-src_gmtk_media_player_c,v 1.2 2012/03/06 08:50:54 dcoppa Exp $ + +Only allocate a size for the child window if the parent widget is +realized (upstream svn revision r87) Add '-zoom' to mplayer when vo is x11 (upstream svn revision r84) ---- src/gmtk_media_player.c.orig Mon Jan 23 11:52:38 2012 -+++ src/gmtk_media_player.c Mon Jan 23 11:54:58 2012 +--- src/gmtk_media_player.c.orig Tue Dec 20 21:54:35 2011 ++++ src/gmtk_media_player.c Tue Mar 6 09:35:09 2012 +@@ -632,7 +632,7 @@ static void gmtk_media_player_size_allocate(GtkWidget + gdouble widget_aspect; + gfloat xscale, yscale; + +- if (player->video_width == 0 || player->video_height == 0) { ++ if (player->video_width == 0 || player->video_height == 0 || !gmtk_widget_get_realized(widget)) { + gtk_alignment_set(GTK_ALIGNMENT(player->alignment), 0.0, 0.0, 1.0, 1.0); + } else { + switch (player->aspect_ratio) { @@ -2050,6 +2050,9 @@ gpointer launch_mplayer(gpointer data) argv[argn++] = g_strdup_printf("gl_nosw"); } else {