mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-11 21:32:57 +00:00
nit_fb: fix resizing on framebuffer-mode change
Respect relative width/height configuration if the underlying framebuffer dimensions change.
This commit is contained in:
parent
81ada6b4f2
commit
2b711f59ed
@ -283,10 +283,8 @@ struct Nit_fb::Main : View_updater
|
||||
return Point(0, 0);
|
||||
}
|
||||
|
||||
void handle_config_update()
|
||||
void _update_size()
|
||||
{
|
||||
config_rom.update();
|
||||
|
||||
Xml_node const config = config_rom.xml();
|
||||
|
||||
Framebuffer::Mode const nit_mode = nitpicker.mode();
|
||||
@ -316,6 +314,13 @@ struct Nit_fb::Main : View_updater
|
||||
Genode::log("using xywh=(", position.x(), ",", position.y(),
|
||||
",", fb_session.size().w(),
|
||||
",", fb_session.size().h(), ")");
|
||||
}
|
||||
|
||||
void handle_config_update()
|
||||
{
|
||||
config_rom.update();
|
||||
|
||||
_update_size();
|
||||
|
||||
update_view();
|
||||
}
|
||||
@ -325,9 +330,7 @@ struct Nit_fb::Main : View_updater
|
||||
|
||||
void handle_mode_update()
|
||||
{
|
||||
Framebuffer::Mode const nit_mode = nitpicker.mode();
|
||||
|
||||
fb_session.size(Area(nit_mode.width(), nit_mode.height()));
|
||||
_update_size();
|
||||
}
|
||||
|
||||
Signal_handler<Main> mode_update_handler =
|
||||
|
Loading…
x
Reference in New Issue
Block a user