xscreen

X11 screenshot utility
git clone https://porkepik.fr/xscreen
Log | Files | Refs | README | LICENSE

commit adde0399eaee51a951aeed30622e12a5c1cb8e95
parent ea99da88304f497ee7dceb9ab7aadbc32a4b48a3
Author: Thomas Philippe <dev@porkepik.fr>
Date:   Thu, 15 Aug 2019 13:54:22 +0200

fix makefile for better portability

Diffstat:
MMakefile | 3++-
Mxscreen.c | 6+++---
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -PREFIX ?= /usr/local +PREFIX = /usr/local CFLAGS = -Os -std=c99 -D_DEFAULT_SOURCE -Wall -Wextra -I/usr/X11R6/include LDFLAGS = -L/usr/X11R6/lib LDLIBS = -lX11 @@ -6,6 +6,7 @@ SRC = xscreen.c BIN = xscreen $(BIN): $(SRC) + $(CC) $(CFLAGS) $(SRC) -o $(BIN) $(LDFLAGS) $(LDLIBS) clean: rm -f $(BIN) diff --git a/xscreen.c b/xscreen.c @@ -363,12 +363,12 @@ main(int argc, char **argv) if (img.window_type == RECTANGLE) { win = get_selected_rectangle(img.freeze); delay(img.delay); - } else if (img.window_type == ROOT) { - delay(img.delay); - win = get_root_window(); } else if (img.window_type == FOCUSED) { delay(img.delay); win = get_focused_window(); + } else { + delay(img.delay); + win = get_root_window(); } capture(win, &img);