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

Commit 178ff3e9466340dbbba8b9585f29f7eb8ae77294
Parent: 441c054ff901a87601202c74e06bfce15b6f17a6
Author: mcol <mcol@posteo.net>
Date: 2021-02-12 10:33:19 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-02-12 10:33:19 +0000

use view_apply_geometry for maximize

src/action.c Modified

@@ -394,13 +394,13 @@
 
     double zoom = wimp.current_desk->zoom;
     int border_width = wimp.current_desk->border_width;
-    view->x = border_width;
-    view->y = border_width;
-    double width = (output->width - border_width * 2) / zoom;
-    double height = (output->height - border_width * 2) / zoom;
-    wlr_xdg_toplevel_set_size(view->surface, width, height);
-    wlr_xdg_toplevel_set_tiled(view->surface, true);
-    damage_all_outputs();
+    struct wlr_box new = {
+	.x = border_width,
+	.y = border_width,
+	.width = (output->width - border_width * 2) / zoom,
+	.height = (output->height - border_width * 2) / zoom,
+    };
+    view_apply_geometry(view, &new);
 }