diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-04-16 09:16:53 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-04-16 09:16:53 +0000 |
commit | 5cd5946c8f668a0ddcd515c232fff7bf19aab77f (patch) | |
tree | 36f579be26933ccfec647cf6fd799c2d4f58ebbb /x11/hsetroot/files | |
parent | Fix build on 32-bit platforms. (diff) |
- Update `x11/hsetroot' to version 1.0.5
- Adds -root parameter, to treat the whole desktop as one display,
applying the image over the whole, instead of per each display
- No longer depends on xrandr(1) in the run-time
Found out via: repology.org
Notes
Notes:
svn path=/head/; revision=531832
Diffstat (limited to 'x11/hsetroot/files')
-rw-r--r-- | x11/hsetroot/files/patch-Makefile | 24 | ||||
-rw-r--r-- | x11/hsetroot/files/patch-hsetroot.c | 10 | ||||
-rw-r--r-- | x11/hsetroot/files/patch-outputs__xrandr.c | 12 |
3 files changed, 12 insertions, 34 deletions
diff --git a/x11/hsetroot/files/patch-Makefile b/x11/hsetroot/files/patch-Makefile index c50e99880d5c..1c2452fca0d3 100644 --- a/x11/hsetroot/files/patch-Makefile +++ b/x11/hsetroot/files/patch-Makefile @@ -1,22 +1,12 @@ ---- Makefile.orig 2019-06-28 12:36:55 UTC +--- Makefile.orig 2019-11-15 11:09:41 UTC +++ Makefile -@@ -18,16 +18,16 @@ LDFLAGS+=$(shell $(PKG_CONFIG) x11 --libs) - CFLAGS+=$(shell $(PKG_CONFIG) imlib2 --cflags) - LDFLAGS+=$(shell $(PKG_CONFIG) imlib2 --libs) +@@ -30,8 +30,7 @@ hsetroot: hsetroot.o + hsr-outputs: hsr-outputs.o -+all: hsetroot -+ - hsetroot: hsetroot.o outputs_xrandr.o - - hsetroot.o: hsetroot.c outputs.h - --outputs.o: outputs.c outputs.h -- - outputs_xrandr.o: outputs_xrandr.c outputs.h - - install: hsetroot -- install -st /usr/local/bin/ hsetroot + install: hsetroot hsr-outputs +- install -st $(PREFIX)/bin/ hsetroot +- install -st $(PREFIX)/bin/ hsr-outputs + $(BSD_INSTALL_PROGRAM) $^ $(DESTDIR)$(PREFIX)/bin clean: - rm -f hsetroot *.o + rm -f *.o hsetroot hsr-outputs diff --git a/x11/hsetroot/files/patch-hsetroot.c b/x11/hsetroot/files/patch-hsetroot.c index 8d22bbfa11a8..39fdd57f91d0 100644 --- a/x11/hsetroot/files/patch-hsetroot.c +++ b/x11/hsetroot/files/patch-hsetroot.c @@ -32,7 +32,7 @@ - for (int i = 0; i < noutputs; i++) { + for (i = 0; i < noutputs; i++) { - OutputInfo o = outputs[i]; + XineramaScreenInfo o = outputs[i]; printf("output %d: size(%d, %d) pos(%d, %d)\n", i, o.w, o.h, o.x, o.y); @@ -229,6 +230,20 @@ load_image(ImageMode mode, const char *arg, int alpha, @@ -41,16 +41,16 @@ } + } else if (mode == Sane) { + int newW, newH; -+ double aspect_w = ((double) o.w) / imgW; -+ double aspect_h = ((double) o.h) / imgH; ++ double aspect_w = ((double) o.width) / imgW; ++ double aspect_h = ((double) o.height) / imgH; + if (aspect_h < aspect_w) { + // image is taller -+ newW = o.w; ++ newW = o.width; + newH = (int) (imgH * aspect_w); + } else { + // image is wider + newW = (int) (imgW * aspect_h); -+ newH = o.h; ++ newH = o.height; + } + imlib_blend_image_onto_image(buffer, 0, 0, 0, imgW, imgH, 0, 0, newW, newH); } else { // Center || Tile diff --git a/x11/hsetroot/files/patch-outputs__xrandr.c b/x11/hsetroot/files/patch-outputs__xrandr.c deleted file mode 100644 index ffa443d67e97..000000000000 --- a/x11/hsetroot/files/patch-outputs__xrandr.c +++ /dev/null @@ -1,12 +0,0 @@ ---- outputs_xrandr.c.orig 2016-02-14 00:09:11 UTC -+++ outputs_xrandr.c -@@ -31,7 +31,8 @@ OutputInfo - close(pipefd[0]); - dup2(pipefd[1], STDOUT_FILENO); - -- system("xrandr | grep ' connected' | sed -e 's/^.*\\s\\+\\([0-9]\\+x[0-9]\\+[-+][0-9]\\+[-+][0-9]\\+\\)\\s\\+.*$/\\1/'"); -+ //system("xrandr | grep ' connected' | gsed -e 's/^.*\\s\\+\\([0-9]\\+x[0-9]\\+[-+][0-9]\\+[-+][0-9]\\+\\)\\s\\+.*$/\\1/'"); -+ system("xrandr | grep ' connected' | sed -E -e 's/^.*[[:blank:]]+([0-9]+x[0-9]+[-+][0-9]+[-+][0-9]+)[[:blank:]]+.*$/\\1/'"); - - close(pipefd[1]); - _exit(0); |