void view_set_fullscreen(struct view *view, bool fullscreen,
struct wlr_output *wlr_output);
void view_toggle_maximize(struct view *view);
+void view_toggle_decorations(struct view *view);
+void view_toggle_fullscreen(struct view *view);
void view_for_each_surface(struct view *view,
wlr_surface_iterator_func_t iterator, void *user_data);
void view_for_each_popup_surface(struct view *view,
if (view) {
view_toggle_maximize(view);
}
+ } else if (!strcasecmp(action, "ToggleFullscreen")) {
+ struct view *view = topmost_mapped_view(server);
+ if (view) {
+ view_toggle_fullscreen(view);
+ }
+ } else if (!strcasecmp(action, "ToggleDecorations")) {
+ struct view *view = topmost_mapped_view(server);
+ if (view) {
+ view_toggle_decorations(view);
+ }
} else {
wlr_log(WLR_ERROR, "action (%s) not supported", action);
}
view_maximize(view, !view->maximized);
}
+void
+view_toggle_decorations(struct view *view)
+{
+ view->ssd.enabled = !view->ssd.enabled;
+ ssd_update_geometry(view, true);
+}
+
+void
+view_toggle_fullscreen(struct view *view)
+{
+ view_set_fullscreen(view, !view->fullscreen, NULL);
+}
+
void
view_set_fullscreen(struct view *view, bool fullscreen,
struct wlr_output *wlr_output)