Update to wmfishtime-1.24, which fixes a gdk memory leak in the

event handling code

Unbreak with GTK+ >= 2.18 (patch stolen from Gentoo Linux)

Regen WANTLIB
This commit is contained in:
dcoppa 2014-10-03 13:28:40 +00:00
parent 56b0526e46
commit 2e1e98d7d0
3 changed files with 50 additions and 17 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.21 2013/10/11 23:51:54 naddy Exp $
# $OpenBSD: Makefile,v 1.22 2014/10/03 13:28:40 dcoppa Exp $
COMMENT= wm-dockapp; clock application with clock, date and fish
DISTNAME= wmfishtime-1.23
REVISION= 4
DISTNAME= wmfishtime-1.24
CATEGORIES= x11 x11/windowmaker
HOMEPAGE= http://www.ne.jp/asahi/linux/timecop/
@ -15,11 +14,11 @@ MASTER_SITES= ${HOMEPAGE}/software/
MODULES= devel/gettext
WANTLIB += X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat fontconfig
WANTLIB += freetype gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 png
WANTLIB += pthread-stubs xcb z gdk_pixbuf-2.0 gdk-x11-2.0 gtk-x11-2.0
WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xrandr Xrender atk-1.0 c cairo fontconfig freetype
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
WANTLIB += gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pthread z
LIB_DEPENDS= x11/gtk+2

View File

@ -1,5 +1,2 @@
MD5 (wmfishtime-1.23.tar.gz) = 7BA3bfubQ+t7UZsgodpx5g==
RMD160 (wmfishtime-1.23.tar.gz) = lDAIOK2ysk2YIZItzAQAYJatkXE=
SHA1 (wmfishtime-1.23.tar.gz) = 1c6VsJNwFKF1c8YE5iaojY9Em1g=
SHA256 (wmfishtime-1.23.tar.gz) = PVqgwoRFkWnwB8rMRsvcnal3DP8fSIJcVa7OPpRT924=
SIZE (wmfishtime-1.23.tar.gz) = 21730
SHA256 (wmfishtime-1.24.tar.gz) = fZKInSlVWKzYr3n010xvp8mArBAQt/BpEkmhF7NLugc=
SIZE (wmfishtime-1.24.tar.gz) = 21895

View File

@ -1,7 +1,18 @@
$OpenBSD: patch-fishmon_c,v 1.2 2002/12/25 11:03:19 wilfried Exp $
--- fishmon.c.orig Sat May 26 22:53:09 2001
+++ fishmon.c Wed Dec 25 11:58:52 2002
@@ -562,7 +562,7 @@ static void prepare_backbuffer(int solid
$OpenBSD: patch-fishmon_c,v 1.3 2014/10/03 13:28:40 dcoppa Exp $
Unbreak with GTK+ >= 2.18
--- fishmon.c.orig Thu May 13 01:55:59 2004
+++ fishmon.c Fri Oct 3 15:11:09 2014
@@ -152,6 +152,7 @@ static char month[12][4] = { "JAN", "FEB", "MAR", "APR
int main(int argc, char **argv)
{
+ setenv("GDK_NATIVE_WINDOWS", "1", 0);
int ch;
GdkEvent *event;
#ifdef PRO
@@ -564,7 +565,7 @@ static void prepare_backbuffer(int solid)
curr_time = time(NULL);
data = localtime(&curr_time);
@ -10,3 +21,29 @@ $OpenBSD: patch-fishmon_c,v 1.2 2002/12/25 11:03:19 wilfried Exp $
data->tm_mday, month[data->tm_mon]);
draw_string(2, 47, buffer);
@@ -648,6 +649,7 @@ static void make_new_fishmon_dockapp(void)
/* make a copy for the iconwin - parameters are the same */
memcpy(&attri, &attr, sizeof(GdkWindowAttr));
+ attri.window_type = GDK_WINDOW_CHILD;
sizehints.flags = USSize;
sizehints.width = 64;
@@ -679,7 +681,6 @@ static void make_new_fishmon_dockapp(void)
wmhints.window_group = win;
wmhints.flags =
StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
- XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
bm.gc = gdk_gc_new(bm.win);
@@ -692,6 +693,9 @@ static void make_new_fishmon_dockapp(void)
gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
gdk_window_show(bm.win);
+
+ XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
+ gdk_window_show(bm.iconwin);
#undef MASK
} /* make_new_fishmon_dockapp */