mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
Merge pull request #2260 from emersion/fix-has-opaque-lockscreen
Fix output_has_opaque_lockscreen
This commit is contained in:
commit
671a202c94
|
@ -204,11 +204,11 @@ bool output_has_opaque_lockscreen(struct sway_output *output,
|
||||||
};
|
};
|
||||||
pixman_region32_t surface_opaque_box;
|
pixman_region32_t surface_opaque_box;
|
||||||
pixman_region32_init(&surface_opaque_box);
|
pixman_region32_init(&surface_opaque_box);
|
||||||
pixman_region32_copy(&surface_opaque_box, &wlr_surface->current.opaque);
|
pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region);
|
||||||
pixman_region32_translate(&surface_opaque_box,
|
pixman_region32_translate(&surface_opaque_box,
|
||||||
sway_layer_surface->geo.x, sway_layer_surface->geo.y);
|
sway_layer_surface->geo.x, sway_layer_surface->geo.y);
|
||||||
bool contains = pixman_region32_contains_rectangle(
|
bool contains = pixman_region32_contains_rectangle(&surface_opaque_box,
|
||||||
&wlr_surface->current.opaque, &output_box);
|
&output_box);
|
||||||
pixman_region32_fini(&surface_opaque_box);
|
pixman_region32_fini(&surface_opaque_box);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue