mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
Damage Tracking: Reduce unnecessary code
This commit is contained in:
parent
98f1c3f3d8
commit
1e3a66478d
13
dwl.c
13
dwl.c
@ -774,8 +774,7 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Damage the whole screen
|
// Damage the whole screen
|
||||||
if (selmon)
|
wlr_output_damage_add_whole(m->damage);
|
||||||
wlr_output_damage_add_whole(selmon->damage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1372,7 +1371,6 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||||||
/* Set initial monitor, tags, floating status, and focus */
|
/* Set initial monitor, tags, floating status, and focus */
|
||||||
applyrules(c);
|
applyrules(c);
|
||||||
|
|
||||||
|
|
||||||
// Damage the whole screen
|
// Damage the whole screen
|
||||||
wlr_output_damage_add_whole(c->mon->damage);
|
wlr_output_damage_add_whole(c->mon->damage);
|
||||||
|
|
||||||
@ -1777,16 +1775,11 @@ rendermon(struct wl_listener *listener, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wlr_output_attach_render makes the OpenGL context current. */
|
|
||||||
if (!wlr_output_attach_render(m->wlr_output, NULL))
|
|
||||||
return;
|
|
||||||
|
|
||||||
bool needs_frame;
|
bool needs_frame;
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
pixman_region32_init(&damage);
|
pixman_region32_init(&damage);
|
||||||
if (!wlr_output_damage_attach_render(m->damage, &needs_frame, &damage)) {
|
if (!wlr_output_damage_attach_render(m->damage, &needs_frame, &damage))
|
||||||
BARF("Cannot make damage output current");
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (render && needs_frame) {
|
if (render && needs_frame) {
|
||||||
/* Begin the renderer (calls glViewport and some other GL sanity checks) */
|
/* Begin the renderer (calls glViewport and some other GL sanity checks) */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user