]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: Reuse view_set_decorations() in view_toggle_decorations()
authorJohn Lindgren <john@jlindgren.net>
Wed, 16 Nov 2022 21:42:37 +0000 (16:42 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 20 Nov 2022 19:10:05 +0000 (19:10 +0000)
This simply deduplicates some near-identical code.

src/view.c

index 71de74cc347f39d04df3cf8a4f7083bc1926927f..0f3ef3c645d98f3818b40d0d362560bee4aa52b2 100644 (file)
@@ -466,15 +466,7 @@ view_toggle_maximize(struct view *view)
 void
 view_toggle_decorations(struct view *view)
 {
-       if (!view->fullscreen) {
-               view->ssd.enabled = !view->ssd.enabled;
-               ssd_update_geometry(view);
-               if (view->maximized) {
-                       view_apply_maximized_geometry(view);
-               } else if (view->tiled) {
-                       view_apply_tiled_geometry(view, NULL);
-               }
-       }
+       view_set_decorations(view, !view->ssd.enabled);
 }
 
 static bool