mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
Merge branch 'revert-scene-ignore-small-intersection' into 'master'
Revert "scene: ignore outputs with too small intersection with nodes" See merge request wlroots/wlroots!5392
This commit is contained in:
commit
142516f7db
1 changed files with 6 additions and 12 deletions
|
|
@ -417,8 +417,6 @@ static void update_node_update_outputs(struct wlr_scene_node *node,
|
||||||
uint64_t active_outputs = 0;
|
uint64_t active_outputs = 0;
|
||||||
|
|
||||||
if (!pixman_region32_empty(&node->visible)) {
|
if (!pixman_region32_empty(&node->visible)) {
|
||||||
uint32_t visible_area = region_area(&node->visible);
|
|
||||||
|
|
||||||
// let's update the outputs in two steps:
|
// let's update the outputs in two steps:
|
||||||
// - the primary outputs
|
// - the primary outputs
|
||||||
// - the enter/leave signals
|
// - the enter/leave signals
|
||||||
|
|
@ -449,17 +447,13 @@ static void update_node_update_outputs(struct wlr_scene_node *node,
|
||||||
uint32_t overlap = region_area(&intersection);
|
uint32_t overlap = region_area(&intersection);
|
||||||
pixman_region32_fini(&intersection);
|
pixman_region32_fini(&intersection);
|
||||||
|
|
||||||
// If the overlap accounts for less than 10% of the visible node area,
|
if (overlap >= largest_overlap) {
|
||||||
// ignore this output
|
largest_overlap = overlap;
|
||||||
if (overlap >= 0.1 * visible_area) {
|
scene_buffer->primary_output = scene_output;
|
||||||
if (overlap >= largest_overlap) {
|
|
||||||
largest_overlap = overlap;
|
|
||||||
scene_buffer->primary_output = scene_output;
|
|
||||||
}
|
|
||||||
|
|
||||||
active_outputs |= 1ull << scene_output->index;
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
active_outputs |= 1ull << scene_output->index;
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue