mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
view: add function to damage whole view
This commit is contained in:
parent
aa4b27ec20
commit
1308c0ffc3
4 changed files with 20 additions and 0 deletions
12
output.c
12
output.c
|
|
@ -391,6 +391,18 @@ output_damage_view_surface(struct cg_output *cg_output, struct cg_view *view)
|
|||
view_for_each_surface(view, damage_surface, &data);
|
||||
}
|
||||
|
||||
void
|
||||
output_damage_view_whole(struct cg_output *cg_output, struct cg_view *view)
|
||||
{
|
||||
struct damage_data data = {
|
||||
.output = cg_output,
|
||||
.x = view->x,
|
||||
.y = view->y,
|
||||
.whole = true,
|
||||
};
|
||||
view_for_each_surface(view, damage_surface, &data);
|
||||
}
|
||||
|
||||
void
|
||||
output_damage_drag_icon(struct cg_output *cg_output, struct cg_drag_icon *drag_icon)
|
||||
{
|
||||
|
|
|
|||
1
output.h
1
output.h
|
|
@ -23,6 +23,7 @@ struct cg_output {
|
|||
|
||||
void handle_new_output(struct wl_listener *listener, void *data);
|
||||
void output_damage_view_surface(struct cg_output *output, struct cg_view *view);
|
||||
void output_damage_view_whole(struct cg_output *cg_output, struct cg_view *view);
|
||||
void output_damage_drag_icon(struct cg_output *output, struct cg_drag_icon *icon);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
6
view.c
6
view.c
|
|
@ -139,6 +139,12 @@ view_damage_surface(struct cg_view *view)
|
|||
output_damage_view_surface(view->server->output, view);
|
||||
}
|
||||
|
||||
void
|
||||
view_damage_whole(struct cg_view *view)
|
||||
{
|
||||
output_damage_view_whole(view->server->output, view);
|
||||
}
|
||||
|
||||
void
|
||||
view_activate(struct cg_view *view, bool activate)
|
||||
{
|
||||
|
|
|
|||
1
view.h
1
view.h
|
|
@ -70,6 +70,7 @@ char *view_get_title(struct cg_view *view);
|
|||
bool view_is_primary(struct cg_view *view);
|
||||
bool view_is_transient_for(struct cg_view *child, struct cg_view *parent);
|
||||
void view_damage_surface(struct cg_view *view);
|
||||
void view_damage_whole(struct cg_view *view);
|
||||
void view_activate(struct cg_view *view, bool activate);
|
||||
void view_position(struct cg_view *view);
|
||||
void view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue