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

Commit 04f47ac77b7cb1e6dde281eb18693841e0a95fb6
Parent: 84db95bd6be7604ea9dddb210b1ab3cf172e30c3
Author: mcol <mcol@posteo.net>
Date: 2021-01-20 20:16:47 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-01-20 20:16:47 +0000

Don't fail if fullscreen client requests don't specify an output

src/shell.c Modified

@@ -64,6 +64,14 @@
     if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
 	return;
 
+    if (!output) {
+	double x = xdg_surface->geometry.width / 2;
+	double y = xdg_surface->geometry.height / 2;
+	double lx, ly;
+	wlr_output_layout_closest_point(server->output_layout, NULL, x, y, &lx, &ly);
+	output = wlr_output_layout_output_at(server->output_layout, lx, ly);
+    }
+
     server->current_desk->fullscreened = xdg_surface;
     server->current_desk->fullscreened_saved_geo.width = xdg_surface->geometry.width;
     server->current_desk->fullscreened_saved_geo.height = xdg_surface->geometry.height;

src/action.c Modified

@@ -196,17 +196,6 @@
     struct wlr_surface *surface = server->seat->keyboard_state.focused_surface;
     if (!surface)
 	return;
-
     struct wlr_xdg_surface *xdg_surface = wlr_xdg_surface_from_wlr_surface(surface);
-    double x = xdg_surface->geometry.width / 2;
-    double y = xdg_surface->geometry.height / 2;
-
-    struct wlr_output *output = wlr_output_layout_output_at(server->output_layout, x, y);
-    if (output == NULL) {
-	double lx, ly;
-	wlr_output_layout_closest_point(server->output_layout, NULL, x, y, &lx, &ly);
-	output = wlr_output_layout_output_at(server->output_layout, lx, ly);
-    }
-
-    fullscreen_xdg_surface(server, xdg_surface, output);
+    fullscreen_xdg_surface(server, xdg_surface, NULL);
 }