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

Commit 02d45be00ca4a7b66969b6d8ecd2ce34a291dddd
Parent: 0a777ae52efaa44cfaff42f840822ab0f324ee1f
Author: mcol <mcol@posteo.net>
Date: 2021-02-01 18:48:59 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-02-01 18:48:59 +0000

Correctly position windows on additional outputs

src/output.c Modified

@@ -143,10 +143,12 @@
     struct view *focussed = wl_container_of(wimp.current_desk->views.next, focussed, link);
     int border_width = wimp.current_desk->border_width;
     wl_list_for_each_reverse(view, &desk->views, link) {
+	rdata.x = view->x - ox / zoom;
+	rdata.y = view->y - oy / zoom;
 	if (
-		(view->x + view->surface->geometry.width + border_width < 0) ||
-		(view->y + view->surface->geometry.height + border_width < 0) ||
-		(view->x - border_width > width / zoom) || (view->y - border_width > height / zoom)
+		(rdata.x + view->surface->geometry.width + border_width < 0) ||
+		(rdata.y + view->surface->geometry.height + border_width < 0) ||
+		(rdata.x - border_width > width / zoom) || (rdata.y - border_width > height / zoom)
 	) {
 	    continue;
 	}