Revert "scene: ignore outputs with too small intersection with nodes"

This reverts commit 95b2771bfd

...to fix lxqt-panel auto-hiding which is currently broken when the panel size
is greater than 40 (height when panel is in horizontal mode). This is because
lxqt-panel has a `#define PANEL_HIDE_SIZE 4` which means it is ignored by the
compositor because of `if (overlap >= 0.1 * visible_area) { ...` in
`update_node_update_outputs()` in `wlr_scene.c`.

Have tested this patch on the wlroots-0.20 branch with labwc-0.20.0 and confirm
it fixes the auto-hiding issue.

Ref:
- https://github.com/labwc/labwc/issues/3600
- 95b2771bfd
- 78e5e279cc/panel/lxqtpanellimits.h (L34)

Note: `git revert 95b2771` resulted in many conflicts, so this patch includes
significant manual editing.
This commit is contained in:
Johan Malm 2026-06-06 09:27:51 +01:00
parent a94cd29eb1
commit d2a4a638e4

View file

@ -417,8 +417,6 @@ static void update_node_update_outputs(struct wlr_scene_node *node,
uint64_t active_outputs = 0;
if (!pixman_region32_empty(&node->visible)) {
uint32_t visible_area = region_area(&node->visible);
// let's update the outputs in two steps:
// - the primary outputs
// - 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);
pixman_region32_fini(&intersection);
// If the overlap accounts for less than 10% of the visible node area,
// ignore this output
if (overlap >= 0.1 * visible_area) {
if (overlap >= largest_overlap) {
largest_overlap = overlap;
scene_buffer->primary_output = scene_output;
}
active_outputs |= 1ull << scene_output->index;
count++;
if (overlap >= largest_overlap) {
largest_overlap = overlap;
scene_buffer->primary_output = scene_output;
}
active_outputs |= 1ull << scene_output->index;
count++;
}
}