+++ /dev/null
-diff -ur wmcliphist-0.6.orig/Makefile wmcliphist-0.6/Makefile
---- wmcliphist-0.6.orig/Makefile 2003-06-24 01:35:45.000000000 +0300
-+++ wmcliphist-0.6/Makefile 2008-03-12 16:13:34.000000000 +0200
-@@ -1,22 +1,18 @@
--CC = gcc
--
--INCLUDES = `gtk-config --cflags` -I. -Ifoodock -g
--
--DESTDIR = "/usr/local/bin"
-+CC ?= gcc
-+PREFIX = /usr
-+INCLUDES = `pkg-config --cflags gtk+-2.0` -I. -Ifoodock
-
- # for normal use
--CFLAGS = -Wall -O2 -ansi -pedantic $(INCLUDES)
-+CFLAGS += -Wall -ansi -pedantic $(INCLUDES)
- DEBUG =
-
- # for debuggind purposes
- # ISO doesn't support macros with variable number of arguments so -pedantic
- # must not be used
--#CFLAGS = -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG
-+#CFLAGS += -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG
- #DEBUG = debug.o
-
--
--LFLAGS = `gtk-config --libs`
--
-+LIBS = `pkg-config --libs gtk+-2.0`
-
- OBJECTS = wmcliphist.o clipboard.o gui.o rcconfig.o history.o hotkeys.o $(DEBUG)
- TARGET = wmcliphist
-@@ -27,7 +23,7 @@
- lclint $(INCLUDES) +posixlib *.c >lclint.log
-
- wmcliphist: $(OBJECTS) foodock/foodock.o
-- $(CC) $(LFLAGS) -o $@ $(OBJECTS) foodock/foodock.o
-+ $(CC) $(LDFLAGS) $(OBJECTS) foodock/foodock.o $(LIBS) -o $@
-
- wmcliphist.o: wmcliphist.c wmcliphist.h \
- icon/ico_60x60_black.xpm icon/ico_60x60_gray.xpm \
-@@ -54,4 +50,4 @@
- @(cd foodock && make clean)
-
- install:
-- cp wmcliphist $(DESTDIR)
-+ cp wmcliphist $(DESTDIR)$(PREFIX)/bin
+++ /dev/null
-diff -ru orig/wmcliphist-0.6/foodock/foodock.c wmcliphist-0.6/foodock/foodock.c
---- orig/wmcliphist-0.6/foodock/foodock.c 2001-03-16 01:59:46.000000000 +0100
-+++ wmcliphist-0.6/foodock/foodock.c 2007-08-12 16:34:44.818138390 +0200
-@@ -21,6 +21,8 @@
- * before calling foo_create_main_icon_window. Returned event box
- * will be realized by foo_create_main_icon_window. You should to show
- * icon window as well as main window before gtk_main().
-+ *
-+ * Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
- *
- * Input:
- * mw Pointer to main window
-@@ -34,20 +36,37 @@
- char *margv[]) {
-
- GtkWidget *foobox; /* This will become icon box */
-- Window xmw;
-- XWMHints *wm_hints;
--
-- xmw = GDK_WINDOW_XWINDOW(mw->window);
-
- foobox = gtk_event_box_new();
- gtk_widget_set_usize(foobox, s, s);
- gtk_container_add (GTK_CONTAINER (mw), foobox);
- gtk_widget_realize(foobox);
--
-+
-+ return foobox;
-+}
-+
-+/*
-+ * Set WMHints on the dockapp (icon) window. Needs to be called after
-+ * the main window is shown, due to changes in GTK+ 2.4.
-+ *
-+ * Input:
-+ * mw Pointer to main window
-+ * dw Pointer to icon (dockapp) window
-+ * margc, margv argc and argv of main program for XSetCommand
-+ */
-+void foo_set_wmhints(GtkWidget *mw,
-+ GtkWidget *dw,
-+ int margc,
-+ char *margv[]) {
-+ Window xmw;
-+ XWMHints *wm_hints;
-+
-+ xmw = GDK_WINDOW_XWINDOW(mw->window);
-+
- /* Time for game with Xlib */
- wm_hints = XAllocWMHints();
- wm_hints->window_group = xmw;
-- wm_hints->icon_window = GDK_WINDOW_XWINDOW(foobox->window);
-+ wm_hints->icon_window = GDK_WINDOW_XWINDOW(dw->window);
- wm_hints->icon_x = 0;
- wm_hints->icon_y = 0;
- wm_hints->initial_state = WithdrawnState;
-@@ -60,6 +79,4 @@
- XSetCommand(GDK_DISPLAY(), xmw, margv, margc);
-
- XFree(wm_hints);
--
-- return foobox;
- }
-diff -ru orig/wmcliphist-0.6/foodock/foodock.h wmcliphist-0.6/foodock/foodock.h
---- orig/wmcliphist-0.6/foodock/foodock.h 2001-03-16 01:59:52.000000000 +0100
-+++ wmcliphist-0.6/foodock/foodock.h 2007-08-12 16:34:40.317881934 +0200
-@@ -15,6 +15,8 @@
- * before calling foo_create_main_icon_window. Returned event box
- * will be realized by foo_create_main_icon_window. You should to show
- * icon window as well as main window before gtk_main().
-+ *
-+ * Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
- *
- * Input:
- * mw Pointer to main window
-@@ -25,3 +27,17 @@
- unsigned int size,
- int main_argc,
- char *main_argv[]);
-+
-+/*
-+ * Set WMHints on the dockapp (icon) window. Needs to be called after
-+ * the main window is shown, due to changes in GTK+ 2.4.
-+ *
-+ * Input:
-+ * mw Pointer to main window
-+ * dw Pointer to icon (dockapp) window
-+ * margc, margv argc and argv of main program for XSetCommand
-+ */
-+void foo_set_wmhints(GtkWidget *mw,
-+ GtkWidget *dw,
-+ int margc,
-+ char *margv[]);
-diff -ru orig/wmcliphist-0.6/wmcliphist.c wmcliphist-0.6/wmcliphist.c
---- orig/wmcliphist-0.6/wmcliphist.c 2003-06-23 23:24:24.000000000 +0200
-+++ wmcliphist-0.6/wmcliphist.c 2007-08-12 16:31:20.806512430 +0200
-@@ -333,6 +333,10 @@
- /* show icon */
- gtk_widget_show(dock_app);
- gtk_widget_show(main_window);
-+
-+ /* Set WMHints - after gtk_widget_show() due to changes in GTK+ 2.4 */
-+ foo_set_wmhints(main_window, dock_app, argc, argv);
-+
- gdk_window_shape_combine_mask(main_window->window, icon_mask, 0, 0);
- gdk_window_shape_combine_mask(dock_app->window, icon_mask, 0, 0);
-