unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26627: [PATCH] gnu: wmfire: Update source code for new GDK versions.
@ 2017-04-23 18:56 Kei Kebreau
  2017-04-24 15:01 ` Marius Bakke
  0 siblings, 1 reply; 3+ messages in thread
From: Kei Kebreau @ 2017-04-23 18:56 UTC (permalink / raw)
  To: 26627; +Cc: Kei Kebreau

* gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnustep.scm (wmfire)[source]: Add patch.
---
 gnu/local.mk                                       |   1 +
 gnu/packages/gnustep.scm                           |   5 +-
 .../wmfire-update-for-new-gdk-versions.patch       | 143 +++++++++++++++++++++
 3 files changed, 148 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 29f6d3516..b6b59d26d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -994,6 +994,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wicd-urwid-1.3.patch			\
   %D%/packages/patches/wicd-wpa2-ttls.patch			\
   %D%/packages/patches/wmctrl-64-fix.patch			\
+  %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch	\
   %D%/packages/patches/woff2-libbrotli.patch			\
   %D%/packages/patches/wordnet-CVE-2008-2149.patch			\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt1.patch			\
diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 6e729165c..e2ee4748f 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -22,6 +22,7 @@
   #:use-module (guix packages)
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
+  #:use-module (gnu packages)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -244,7 +245,9 @@ display, and can run a user-specified program on mouse click.")
                                   name "/" name "-" version ".tar.gz"))
               (sha256
                (base32
-                "101grahd80n97y2dczb629clmcgiavdpbbwy78kk5wgs362m12z3"))))
+                "101grahd80n97y2dczb629clmcgiavdpbbwy78kk5wgs362m12z3"))
+              (patches
+               (search-patches "wmfire-update-for-new-gdk-versions.patch"))))
     (build-system gnu-build-system)
     (inputs
      `(("gtk+" ,gtk+-2)
diff --git a/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
new file mode 100644
index 000000000..84d588783
--- /dev/null
+++ b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
@@ -0,0 +1,143 @@
+This patch comes from Debian and was modified by Kei Kebreau <kei@openmailbox.org>.
+
+Description: Update for newer versions of GDK.
+ In particular, the icon window was not receiving enter and leave events from
+ the pointer.  To fix this, we get rid of the second GdkWindow iconwin entirely
+ and set win to be its own icon.
+ .
+ This also removes the need for the "broken window manager" fix, so we remove it
+ and all references to it.
+Author: Doug Torrance <dtorrance@piedmont.edu>
+
+diff -ur wmfire-1.2.4.old/src/wmfire.c wmfire-1.2.4/src/wmfire.c
+--- wmfire-1.2.4.old/src/wmfire.c	2017-04-23 14:26:58.449487117 -0400
++++ wmfire-1.2.4/src/wmfire.c	2017-04-23 14:32:10.785238671 -0400
+@@ -77,7 +77,6 @@
+ typedef struct {
+ 	Display *display;	/* X11 display */
+ 	GdkWindow *win;		/* Main window */
+-	GdkWindow *iconwin;	/* Icon window */
+ 	GdkGC *gc;		/* Drawing GC */
+ 	GdkPixmap *pixmap;	/* Main pixmap */
+ 	GdkBitmap *mask;	/* Dockapp mask */
+@@ -141,7 +140,6 @@
+ int cmap = 0;
+ int lock = 0;
+ int proximity = 0;
+-int broken_wm = 0;
+ 
+ /******************************************/
+ /* Main                                   */
+@@ -262,12 +260,8 @@
+ 		usleep(REFRESH);
+ 
+ 		/* Draw the rgb buffer to screen */
+-		if (!broken_wm)
+-			gdk_draw_rgb_image(bm.iconwin, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
+-		else
+-			gdk_draw_rgb_image(bm.win, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
++                gdk_draw_rgb_image(bm.win, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
+ 	}
+-
+ 	return 0;
+ }
+ 
+@@ -556,9 +550,7 @@
+ #define MASK GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_HINT_MASK
+ 
+ 	GdkWindowAttr attr;
+-	GdkWindowAttr attri;
+ 	Window win;
+-	Window iconwin;
+ 
+ 	GdkPixmap *icon;
+ 
+@@ -578,10 +570,6 @@
+ 	attr.wmclass_class = "wmfire";
+ 	attr.window_type = GDK_WINDOW_TOPLEVEL;
+ 
+-	/* 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;
+ 	sizehints.height = 64;
+@@ -592,18 +580,11 @@
+ 		exit(1);
+ 	}
+ 
+-	bm.iconwin = gdk_window_new(bm.win, &attri, GDK_WA_TITLE | GDK_WA_WMCLASS);
+-	if (!bm.iconwin) {
+-		fprintf(stderr, "FATAL: Cannot make icon window\n");
+-		exit(1);
+-	}
+-
+ 	win = GDK_WINDOW_XWINDOW(bm.win);
+-	iconwin = GDK_WINDOW_XWINDOW(bm.iconwin);
+ 	XSetWMNormalHints(GDK_WINDOW_XDISPLAY(bm.win), win, &sizehints);
+ 
+ 	wmhints.initial_state = WithdrawnState;
+-	wmhints.icon_window = iconwin;
++	wmhints.icon_window = win;
+ 	wmhints.icon_x = 0;
+ 	wmhints.icon_y = 0;
+ 	wmhints.window_group = win;
+@@ -613,10 +594,8 @@
+ 
+ 	bm.pixmap = gdk_pixmap_create_from_xpm_d(bm.win, &(bm.mask), NULL, master_xpm);
+ 	gdk_window_shape_combine_mask(bm.win, bm.mask, 0, 0);
+-	gdk_window_shape_combine_mask(bm.iconwin, bm.mask, 0, 0);
+ 
+ 	gdk_window_set_back_pixmap(bm.win, bm.pixmap, False);
+-	gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
+ 
+ #if 0
+         gdk_window_set_type_hint(bm.win, GDK_WINDOW_TYPE_HINT_DOCK);
+@@ -626,7 +605,6 @@
+ #endif
+ 
+ 	icon = gdk_pixmap_create_from_xpm_d(bm.win, NULL, NULL, icon_xpm);
+-	gdk_window_set_icon(bm.win, bm.iconwin, icon, NULL);
+ 
+ 	gdk_window_show(bm.win);
+ 
+@@ -721,9 +699,6 @@
+ 		case 'l':
+ 			lock = 1;
+ 			break;
+-		case 'b':
+-			broken_wm = 1;
+-			break;
+ 		case 'h':
+ 		default:
+ 			do_help();
+@@ -766,6 +741,5 @@
+ 	for (i = 0; i < NFLAMES; i++)
+ 		fprintf(stderr, "%d:%s ", i + 1, fire[i].text);
+ 	fprintf(stderr, "\n\t-l\t\t\tlock flame colour and monitor\n");
+-	fprintf(stderr, "\t-b\t\t\tactivate broken window manager fix\n");
+ 	fprintf(stderr, "\t-h\t\t\tprints this help\n");
+ }
+Only in wmfire-1.2.4/src: wmfire.c~
+diff -ur wmfire-1.2.4.old/wmfire.1 wmfire-1.2.4/wmfire.1
+--- wmfire-1.2.4.old/wmfire.1	2017-04-23 14:26:58.449487117 -0400
++++ wmfire-1.2.4/wmfire.1	2017-04-23 14:41:20.697186114 -0400
+@@ -8,7 +8,6 @@
+ 
+ .SH SYNOPSIS
+ .B wmfire
+-[-b]
+ [-c CPU]
+ [-f COLOUR]
+ [-F FILE]
+@@ -54,9 +53,6 @@
+ 
+ .SH OPTIONS
+ .TP
+-.B -b
+-Activate broken window manager fix (if grey box diplayed)
+-.TP
+ .B -c [0..3]
+ .br
+ Monitor SMP CPU number X
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#26627: [PATCH] gnu: wmfire: Update source code for new GDK versions.
  2017-04-23 18:56 bug#26627: [PATCH] gnu: wmfire: Update source code for new GDK versions Kei Kebreau
@ 2017-04-24 15:01 ` Marius Bakke
  2017-04-24 15:24   ` Kei Kebreau
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2017-04-24 15:01 UTC (permalink / raw)
  To: Kei Kebreau, 26627

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

Kei Kebreau <kei@openmailbox.org> writes:

> * gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch: New
> file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/gnustep.scm (wmfire)[source]: Add patch.

[...]

> diff --git a/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
> new file mode 100644
> index 000000000..84d588783
> --- /dev/null
> +++ b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
> @@ -0,0 +1,143 @@
> +This patch comes from Debian and was modified by Kei Kebreau <kei@openmailbox.org>.

Can you add a link to the upstream patch in this area?

Other than that looks good, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#26627: [PATCH] gnu: wmfire: Update source code for new GDK versions.
  2017-04-24 15:01 ` Marius Bakke
@ 2017-04-24 15:24   ` Kei Kebreau
  0 siblings, 0 replies; 3+ messages in thread
From: Kei Kebreau @ 2017-04-24 15:24 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 26627-done

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> Kei Kebreau <kei@openmailbox.org> writes:
>
>> * gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch: New
>> file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>> * gnu/packages/gnustep.scm (wmfire)[source]: Add patch.
>
> [...]
>
>> diff --git
>> a/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
>> b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
>> new file mode 100644
>> index 000000000..84d588783
>> --- /dev/null
>> +++ b/gnu/packages/patches/wmfire-update-for-new-gdk-versions.patch
>> @@ -0,0 +1,143 @@
>> +This patch comes from Debian and was modified by Kei Kebreau
>> <kei@openmailbox.org>.
>
> Can you add a link to the upstream patch in this area?
>

Done!

> Other than that looks good, thanks!

Thanks for the review!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-24 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-23 18:56 bug#26627: [PATCH] gnu: wmfire: Update source code for new GDK versions Kei Kebreau
2017-04-24 15:01 ` Marius Bakke
2017-04-24 15:24   ` Kei Kebreau

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).