void ssd_set_active(struct view *view, bool active);
void ssd_update_title(struct view *view);
void ssd_update_geometry(struct view *view);
-void ssd_reload(struct view *view);
void ssd_destroy(struct view *view);
void ssd_update_button_hover(struct wlr_scene_node *node,
struct ssd_hover_state *hover_state);
const char *view_get_string_prop(struct view *view, const char *prop);
void view_update_title(struct view *view);
void view_update_app_id(struct view *view);
+void view_reload_ssd(struct view *view);
void view_impl_map(struct view *view);
void view_adjust_size(struct view *view, int *w, int *h);
#include "labwc.h"
#include "layers.h"
#include "menu/menu.h"
-#include "ssd.h"
#include "theme.h"
#include "view.h"
#include "workspaces.h"
struct view *view;
wl_list_for_each(view, &g_server->views, link) {
- if (!view->mapped || !view->ssd_enabled) {
- continue;
- }
- ssd_reload(view);
+ view_reload_ssd(view);
}
menu_reconfigure(g_server);
view->ssd.state.y = view->y;
}
-void ssd_reload(struct view *view)
-{
- if (!view->ssd.tree) {
- return;
- }
-
- ssd_destroy(view);
- ssd_create(view);
-}
-
void
ssd_destroy(struct view *view)
{
view->toplevel_handle, app_id);
}
+void
+view_reload_ssd(struct view *view)
+{
+ assert(view);
+ if (view->ssd_enabled) {
+ ssd_destroy(view);
+ ssd_create(view);
+ }
+}
+
void
view_destroy(struct view *view)
{