Fix border repainting.
* grub-core/term/gfxterm.c (dirty_region_add): When a repaint is already scheduled, merge the virtual screen with the requested region rather than repainting only the virtual screen.
This commit is contained in:
parent
9c55cbe8e7
commit
198cae0c96
2 changed files with 20 additions and 4 deletions
|
@ -39,3 +39,9 @@
|
||||||
function.
|
function.
|
||||||
(GRUB_MOD_INIT): Register background_color command.
|
(GRUB_MOD_INIT): Register background_color command.
|
||||||
(GRUB_MOD_FINI): Unregister background_color command.
|
(GRUB_MOD_FINI): Unregister background_color command.
|
||||||
|
|
||||||
|
Fix border repainting.
|
||||||
|
|
||||||
|
* grub-core/term/gfxterm.c (dirty_region_add): When a repaint is
|
||||||
|
already scheduled, merge the virtual screen with the requested
|
||||||
|
region rather than repainting only the virtual screen.
|
||||||
|
|
|
@ -539,9 +539,19 @@ dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
||||||
|
|
||||||
if (repaint_scheduled)
|
if (repaint_scheduled)
|
||||||
{
|
{
|
||||||
|
if (x > (int)virtual_screen.offset_x)
|
||||||
|
{
|
||||||
|
width += virtual_screen.offset_x - x;
|
||||||
x = virtual_screen.offset_x;
|
x = virtual_screen.offset_x;
|
||||||
|
}
|
||||||
|
if (y > (int)virtual_screen.offset_y)
|
||||||
|
{
|
||||||
|
height += virtual_screen.offset_y - y;
|
||||||
y = virtual_screen.offset_y;
|
y = virtual_screen.offset_y;
|
||||||
|
}
|
||||||
|
if (width < virtual_screen.width)
|
||||||
width = virtual_screen.width;
|
width = virtual_screen.width;
|
||||||
|
if (height < virtual_screen.height)
|
||||||
height = virtual_screen.height;
|
height = virtual_screen.height;
|
||||||
repaint_scheduled = 0;
|
repaint_scheduled = 0;
|
||||||
repaint_was_scheduled = 1;
|
repaint_was_scheduled = 1;
|
||||||
|
|
Loading…
Reference in a new issue