struct wlr_box view_get_surface_geometry(struct view *view);
struct wlr_box view_geometry(struct view *view);
void view_resize(struct view *view, struct wlr_box geo);
+void view_minimize(struct view *view);
+void view_unminimize(struct view *view);
void view_focus(struct view *view);
struct view *view_next(struct server *server, struct view *current);
bool view_hasfocus(struct view *view);
view->impl->close(view);
break;
case LAB_DECO_BUTTON_ICONIFY:
- view->impl->unmap(view);
+ view_minimize(view);
break;
case LAB_DECO_PART_TITLE:
interactive_begin(view, LAB_CURSOR_MOVE, 0);
} else {
fprintf(stderr, "-");
}
- fprintf(stderr, " %p.4 %s {%d,%d,%d,%d}\n", (void *)view,
+ fprintf(stderr, " %p %s {%d,%d,%d,%d}\n", (void *)view,
view->xwayland_surface->class, view->xwayland_surface->x,
view->xwayland_surface->y, view->xwayland_surface->width,
view->xwayland_surface->height);
view->impl->configure(view, box);
}
+void view_minimize(struct view *view)
+{
+ if (view->minimized == true)
+ return;
+ view->minimized = true;
+ view->impl->unmap(view);
+}
+
+void view_unminimize(struct view *view)
+{
+ if (view->minimized == false)
+ return;
+ view->minimized = false;
+ view->impl->map(view);
+}
+
static void move_to_front(struct view *view)
{
wl_list_remove(&view->link);
return;
/* TODO: messy - sort out */
- if (!view->mapped) {
- view->impl->map(view);
+ if (!view->mapped && view->minimized) {
+ view_unminimize(view);
return;
}
*/
struct view *view;
wl_list_for_each (view, &server->views, link) {
+ if (!view->mapped)
+ continue;
if (_view_at(view, lx, ly, surface, sx, sy))
return view;
if (!view->show_server_side_deco)