mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-17 08:56:28 -05:00
rootston: replace view_damage with view_apply_damage and view_damage_whole
This commit is contained in:
parent
7f5a538cb7
commit
96d6f34edd
7 changed files with 35 additions and 17 deletions
|
|
@ -255,7 +255,7 @@ bool view_center(struct roots_view *view) {
|
|||
}
|
||||
|
||||
void view_destroy(struct roots_view *view) {
|
||||
view_damage(view);
|
||||
view_damage_whole(view);
|
||||
wl_signal_emit(&view->events.destroy, view);
|
||||
|
||||
if (view->fullscreen_output) {
|
||||
|
|
@ -268,7 +268,7 @@ void view_destroy(struct roots_view *view) {
|
|||
void view_init(struct roots_view *view, struct roots_desktop *desktop) {
|
||||
view->desktop = desktop;
|
||||
wl_signal_init(&view->events.destroy);
|
||||
view_damage(view);
|
||||
view_damage_whole(view);
|
||||
}
|
||||
|
||||
void view_setup(struct roots_view *view) {
|
||||
|
|
@ -283,18 +283,25 @@ void view_setup(struct roots_view *view) {
|
|||
view_update_output(view, NULL);
|
||||
}
|
||||
|
||||
void view_damage(struct roots_view *view) {
|
||||
void view_apply_damage(struct roots_view *view) {
|
||||
struct roots_output *output;
|
||||
wl_list_for_each(output, &view->desktop->outputs, link) {
|
||||
output_damage_view(output, view);
|
||||
output_damage_from_view(output, view);
|
||||
}
|
||||
}
|
||||
|
||||
void view_damage_whole(struct roots_view *view) {
|
||||
struct roots_output *output;
|
||||
wl_list_for_each(output, &view->desktop->outputs, link) {
|
||||
output_damage_whole_view(output, view);
|
||||
}
|
||||
}
|
||||
|
||||
void view_update_position(struct roots_view *view, double x, double y) {
|
||||
view_damage(view);
|
||||
view_damage_whole(view);
|
||||
view->x = x;
|
||||
view->y = y;
|
||||
view_damage(view);
|
||||
view_damage_whole(view);
|
||||
}
|
||||
|
||||
static bool view_at(struct roots_view *view, double lx, double ly,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue