Three cherry-picked fixes from upstream git:
Zap a use-after-free. Use NETWM for fullscreen windows only. feh(1) manpage fix.
This commit is contained in:
parent
77929860b5
commit
285b65c1f8
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2011/05/02 21:22:58 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2011/05/04 11:43:31 dcoppa Exp $
|
||||
|
||||
COMMENT= lightweight image viewer
|
||||
|
||||
DISTNAME= feh-1.13
|
||||
REVISION= 0
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
CATEGORIES= graphics
|
||||
|
||||
|
12
graphics/feh/patches/patch-man_feh_pre
Normal file
12
graphics/feh/patches/patch-man_feh_pre
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-man_feh_pre,v 1.1 2011/05/04 11:43:31 dcoppa Exp $
|
||||
--- man/feh.pre.orig Wed May 4 13:25:01 2011
|
||||
+++ man/feh.pre Wed May 4 13:25:36 2011
|
||||
@@ -669,7 +669,7 @@ can also be used as a background setter. It will stor
|
||||
necessary to set the background in
|
||||
.Pa ~/.fehbg ,
|
||||
so to have your background restored everytime you start X, you can add
|
||||
-.Qq `cat ~/.fehbg`
|
||||
+.Qq `eval cat ~/.fehbg`
|
||||
to your X startup script
|
||||
.Pq like Pa ~/.xinitrc .
|
||||
.
|
@ -1,10 +1,23 @@
|
||||
$OpenBSD: patch-src_imlib_c,v 1.4 2011/05/02 21:22:58 dcoppa Exp $
|
||||
$OpenBSD: patch-src_imlib_c,v 1.5 2011/05/04 11:43:31 dcoppa Exp $
|
||||
|
||||
Fix use-after-free
|
||||
(commit 1c420e26c23f302e54c28d6e473fe2f95e970a8e)
|
||||
|
||||
Fix rotate arg in error message
|
||||
(commit ef3f1979c2d443823bfc761d98b30c232992494a)
|
||||
|
||||
--- src/imlib.c.orig Thu Oct 7 20:28:39 2010
|
||||
+++ src/imlib.c Fri Oct 15 14:47:36 2010
|
||||
--- src/imlib.c.orig Sat Apr 23 22:02:31 2011
|
||||
+++ src/imlib.c Wed May 4 13:22:06 2011
|
||||
@@ -291,8 +291,8 @@ char *feh_http_load_image(char *url)
|
||||
return sfn;
|
||||
} else {
|
||||
weprintf("open url: fdopen failed:");
|
||||
- free(sfn);
|
||||
unlink(sfn);
|
||||
+ free(sfn);
|
||||
close(fd);
|
||||
}
|
||||
} else {
|
||||
@@ -857,7 +857,7 @@ void feh_edit_inplace_lossless_rotate(winwidget w, int
|
||||
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||
weprintf("lossless rotate: Got exitcode %d from jpegtran."
|
||||
|
34
graphics/feh/patches/patch-src_winwidget_c
Normal file
34
graphics/feh/patches/patch-src_winwidget_c
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-src_winwidget_c,v 1.3 2011/05/04 11:43:31 dcoppa Exp $
|
||||
|
||||
Use NETWM for fullscreen windows only
|
||||
(commit bce956523f56b88ec04c074cd55041c5b9a81c90)
|
||||
|
||||
--- src/winwidget.c.orig Wed May 4 13:20:06 2011
|
||||
+++ src/winwidget.c Wed May 4 13:20:06 2011
|
||||
@@ -774,15 +774,17 @@ void winwidget_resize(winwidget winwid, int w, int h)
|
||||
winwid->w = (w > scr->width) ? scr->width : w;
|
||||
winwid->h = (h > scr->height) ? scr->height : h;
|
||||
}
|
||||
- /* XResizeWindow(disp, winwid->win, winwid->w, winwid->h); */
|
||||
- XGetWindowAttributes(disp, winwid->win, &attributes);
|
||||
- XTranslateCoordinates(disp, winwid->win, attributes.root,
|
||||
- -attributes.border_width -
|
||||
- attributes.x,
|
||||
- -attributes.border_width - attributes.y, &tc_x, &tc_y, &ignored_window);
|
||||
- winwid->x = tc_x;
|
||||
- winwid->y = tc_y;
|
||||
- XMoveResizeWindow(disp, winwid->win, tc_x, tc_y, winwid->w, winwid->h);
|
||||
+ if (winwid->full_screen) {
|
||||
+ XGetWindowAttributes(disp, winwid->win, &attributes);
|
||||
+ XTranslateCoordinates(disp, winwid->win, attributes.root,
|
||||
+ -attributes.border_width -
|
||||
+ attributes.x,
|
||||
+ -attributes.border_width - attributes.y, &tc_x, &tc_y, &ignored_window);
|
||||
+ winwid->x = tc_x;
|
||||
+ winwid->y = tc_y;
|
||||
+ XMoveResizeWindow(disp, winwid->win, tc_x, tc_y, winwid->w, winwid->h);
|
||||
+ } else
|
||||
+ XResizeWindow(disp, winwid->win, winwid->w, winwid->h);
|
||||
|
||||
winwid->had_resize = 1;
|
||||
XFlush(disp);
|
Loading…
Reference in New Issue
Block a user