From a68f075c0d16e47f09aee15e670e22fc7f5dde09 Mon Sep 17 00:00:00 2001 From: dcoppa Date: Thu, 12 Dec 2013 09:20:52 +0000 Subject: [PATCH] Fix '--borderless' not working on 64bit systems (upstream git commit b5a719d0dc475066eafc5810c2bdc49bca18713a) Use '%F' since feh supports multiple files (upstream git commit 865a78510ff53db952ec5de98c934b60bfc664c8) --- graphics/feh/Makefile | 4 +-- .../patches/patch-share_applications_feh_pre | 16 ++++++++++++ graphics/feh/patches/patch-src_winwidget_c | 25 +++++++++++++++++++ graphics/feh/patches/patch-src_winwidget_h | 24 ++++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 graphics/feh/patches/patch-share_applications_feh_pre create mode 100644 graphics/feh/patches/patch-src_winwidget_c create mode 100644 graphics/feh/patches/patch-src_winwidget_h diff --git a/graphics/feh/Makefile b/graphics/feh/Makefile index 654c3408714..f9c2f7e62b3 100644 --- a/graphics/feh/Makefile +++ b/graphics/feh/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.55 2013/12/03 07:37:44 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.56 2013/12/12 09:20:52 dcoppa Exp $ COMMENT= lightweight image viewer DISTNAME= feh-2.9.3 -REVISION= 1 +REVISION= 2 EXTRACT_SUFX= .tar.bz2 CATEGORIES= graphics diff --git a/graphics/feh/patches/patch-share_applications_feh_pre b/graphics/feh/patches/patch-share_applications_feh_pre new file mode 100644 index 00000000000..aeda1056aee --- /dev/null +++ b/graphics/feh/patches/patch-share_applications_feh_pre @@ -0,0 +1,16 @@ +$OpenBSD: patch-share_applications_feh_pre,v 1.1 2013/12/12 09:20:52 dcoppa Exp $ + +Use '%F' since feh supports multiple files +(upstream git commit 865a78510ff53db952ec5de98c934b60bfc664c8) + +--- share/applications/feh.pre.orig Thu Dec 12 10:02:32 2013 ++++ share/applications/feh.pre Thu Dec 12 10:02:49 2013 +@@ -1,7 +1,7 @@ + [Desktop Entry] + Name=Feh + Comment=Fast Imlib2-based Image Viewer +-Exec=feh %f ++Exec=feh %F + Terminal=false + Type=Application + Icon=$IMAGEDIR$/feh.png diff --git a/graphics/feh/patches/patch-src_winwidget_c b/graphics/feh/patches/patch-src_winwidget_c new file mode 100644 index 00000000000..31230c9a892 --- /dev/null +++ b/graphics/feh/patches/patch-src_winwidget_c @@ -0,0 +1,25 @@ +$OpenBSD: patch-src_winwidget_c,v 1.15 2013/12/12 09:20:52 dcoppa Exp $ + +Fix '--borderless' not working on 64bit systems +(upstream git commit b5a719d0dc475066eafc5810c2bdc49bca18713a) + +--- src/winwidget.c.orig Tue Jun 11 08:28:26 2013 ++++ src/winwidget.c Thu Dec 12 09:59:49 2013 +@@ -228,6 +228,7 @@ void winwidget_create_window(winwidget ret, int w, int + KeyPressMask | KeyReleaseMask | ButtonMotionMask | ExposureMask + | FocusChangeMask | PropertyChangeMask | VisibilityChangeMask; + ++ memset(&mwmhints, 0, sizeof(mwmhints)); + if (opt.borderless || ret->full_screen) { + prop = XInternAtom(disp, "_MOTIF_WM_HINTS", True); + if (prop == None) { +@@ -240,8 +241,7 @@ void winwidget_create_window(winwidget ret, int w, int + mwmhints.flags = MWM_HINTS_DECORATIONS; + mwmhints.decorations = 0; + } +- } else +- mwmhints.flags = 0; ++ } + + ret->win = + XCreateWindow(disp, DefaultRootWindow(disp), x, y, w, h, 0, diff --git a/graphics/feh/patches/patch-src_winwidget_h b/graphics/feh/patches/patch-src_winwidget_h new file mode 100644 index 00000000000..1bef2929a36 --- /dev/null +++ b/graphics/feh/patches/patch-src_winwidget_h @@ -0,0 +1,24 @@ +$OpenBSD: patch-src_winwidget_h,v 1.1 2013/12/12 09:20:52 dcoppa Exp $ + +Fix '--borderless' not working on 64bit systems +(upstream git commit b5a719d0dc475066eafc5810c2bdc49bca18713a) + +--- src/winwidget.h.orig Tue Jun 11 08:28:26 2013 ++++ src/winwidget.h Thu Dec 12 09:59:49 2013 +@@ -61,11 +61,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALI + + /* Motif window hints */ + typedef struct _mwmhints { +- CARD32 flags; +- CARD32 functions; +- CARD32 decorations; +- INT32 input_mode; +- CARD32 status; ++ unsigned long flags; ++ unsigned long functions; ++ unsigned long decorations; ++ long input_mode; ++ unsigned long status; + } MWMHints; + + enum win_type {