gimp but for windows: a wayland compositor
git clone https://github.com/m-col/wimp
Files | Refs | Readme

Commit 4b5efe4c5719e333a433296fc23a163a02e23773
Parent: 5bcebdde3eba4212adb37c60460140ee95913f51
Author: mcol <mcol@posteo.net>
Date: 2021-02-12 14:34:06 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-02-12 14:34:06 +0000

scale borders when zooming

src/output.c Modified

@@ -1,3 +1,4 @@
+#include <math.h>
 #include <time.h>
 #include <pixman.h>
 #include <wlr/types/wlr_gamma_control_v1.h>
@@ -44,10 +45,10 @@
     if (rdata->bordered == surface) {
 	int border_width = wimp.current_desk->border_width;
 	struct wlr_box borders = {
-	    .x = x - border_width,
-	    .y = y - border_width,
-	    .width = width + border_width * 2,
-	    .height = height + border_width * 2,
+	    .x = x - border_width * rdata->zoom,
+	    .y = y - border_width * rdata->zoom,
+	    .width = width + ceil(border_width * 2 * rdata->zoom),
+	    .height = height + ceil(border_width * 2 * rdata->zoom),
 	};
 	wlr_render_rect(
 	    rdata->renderer,

Makefile Modified

@@ -7,7 +7,8 @@
 	    $(shell pkg-config --cflags --libs xkbcommon) \
 	    $(shell pkg-config --cflags --libs libinput) \
 	    $(shell pkg-config --cflags --libs cairo) \
-	    $(shell pkg-config --cflags --libs pixman-1)
+	    $(shell pkg-config --cflags --libs pixman-1) \
+	    -lm
 
 PREFIX    ?= /usr/local
 BINPREFIX ?= $(PREFIX)/bin