nitpicker: prevent the pointer from going nowhere

The 'size_changed' handling remained without effect when the (last)
display re-appears (e.g., back from screen blank) because
'Capture_root::bounding_box()' delivered the '_fallback_bounding_box'
in the intermediate phase where no display was present. Unfortunately,
'Capture_root::visible()' failed to apply the same logic. This patch
makes 'visible()' consistent with 'bounding_box()'. It has the
welcome effect that nitpicker remembers the pointer position during
the dark phase.

Fixes #5397
This commit is contained in:
Norman Feske 2024-12-03 15:18:02 +01:00 committed by Christian Helmuth
parent 1d73cf2003
commit 3067a2c51d

View File

@ -319,7 +319,10 @@ class Nitpicker::Capture_root : public Root_component<Capture_session>
[&] (Point const p) { [&] (Point const p) {
_sessions.for_each([&] (Capture_session const &session) { _sessions.for_each([&] (Capture_session const &session) {
if (!result && session.bounding_box().contains(p)) if (!result && session.bounding_box().contains(p))
result = true; }); }, result = true; });
if (!result)
result = _fallback_bounding_box.contains(p);
},
[&] (Nowhere) { }); [&] (Nowhere) { });
return result; return result;
} }