mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
nitpicker: apply domain constraints to GUI info
If a <domain> is constrained by 'width' or 'height' attributes, clip the capture rects of the panorama info reported to the client. So the client observes the constraint as window size. Issue #5356
This commit is contained in:
parent
5e3b6ee08f
commit
08bf219b28
@ -183,11 +183,11 @@ class Nitpicker::Capture_session : public Session_object<Capture::Session>
|
||||
_policy_changed = true;
|
||||
}
|
||||
|
||||
void gen_capture_attr(Xml_generator &xml) const
|
||||
void gen_capture_attr(Xml_generator &xml, Rect const domain_panorama) const
|
||||
{
|
||||
xml.attribute("name", label());
|
||||
|
||||
gen_attr(xml, bounding_box());
|
||||
gen_attr(xml, Rect::intersect(domain_panorama, bounding_box()));
|
||||
|
||||
unsigned const w_mm = _policy.w_mm.or_default(_buffer_attr.mm.w),
|
||||
h_mm = _policy.h_mm.or_default(_buffer_attr.mm.h);
|
||||
|
@ -361,7 +361,7 @@ class Nitpicker::Capture_root : public Root_component<Capture_session>
|
||||
{
|
||||
gen_attr(xml, domain_panorama);
|
||||
_sessions.for_each([&] (Capture_session const &capture) {
|
||||
xml.node("capture", [&] { capture.gen_capture_attr(xml); }); });
|
||||
xml.node("capture", [&] { capture.gen_capture_attr(xml, domain_panorama); }); });
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user