mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +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:
@ -283,10 +283,8 @@ struct Nit_fb::Main : View_updater
|
|||||||
return Point(0, 0);
|
return Point(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_config_update()
|
void _update_size()
|
||||||
{
|
{
|
||||||
config_rom.update();
|
|
||||||
|
|
||||||
Xml_node const config = config_rom.xml();
|
Xml_node const config = config_rom.xml();
|
||||||
|
|
||||||
Framebuffer::Mode const nit_mode = nitpicker.mode();
|
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(),
|
Genode::log("using xywh=(", position.x(), ",", position.y(),
|
||||||
",", fb_session.size().w(),
|
",", fb_session.size().w(),
|
||||||
",", fb_session.size().h(), ")");
|
",", fb_session.size().h(), ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
void handle_config_update()
|
||||||
|
{
|
||||||
|
config_rom.update();
|
||||||
|
|
||||||
|
_update_size();
|
||||||
|
|
||||||
update_view();
|
update_view();
|
||||||
}
|
}
|
||||||
@ -325,9 +330,7 @@ struct Nit_fb::Main : View_updater
|
|||||||
|
|
||||||
void handle_mode_update()
|
void handle_mode_update()
|
||||||
{
|
{
|
||||||
Framebuffer::Mode const nit_mode = nitpicker.mode();
|
_update_size();
|
||||||
|
|
||||||
fb_session.size(Area(nit_mode.width(), nit_mode.height()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Signal_handler<Main> mode_update_handler =
|
Signal_handler<Main> mode_update_handler =
|
||||||
|
Reference in New Issue
Block a user