mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
terminal: fix tiling artifacts in shrinked window
When shriking the terminal window, the view must be shrinked before shriking the pixel buffer. Otherwise, when the buffer becomes smaller than the view, nitpicker fills the excess view area with tiled content of the buffer, which looks funny. Related to issue #5350
This commit is contained in:
parent
8985d8200e
commit
5e3b6ee08f
@ -116,7 +116,17 @@ struct Terminal::Main : Character_consumer
|
||||
|
||||
void _handle_mode_change()
|
||||
{
|
||||
Rect const orig_win_rect = _win_rect;
|
||||
|
||||
_win_rect = _gui_window_rect();
|
||||
|
||||
/* shrink view before shrinking the buffer to prevent tiling artifacts */
|
||||
Rect const intersection = Rect::intersect(orig_win_rect, _win_rect);
|
||||
if (intersection != orig_win_rect) {
|
||||
_gui.enqueue<Gui::Session::Command::Geometry>(_view, intersection);
|
||||
_gui.execute();
|
||||
}
|
||||
|
||||
_handle_config();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user