]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix border repainting.
authorColin Watson <cjwatson@ubuntu.com>
Mon, 13 Dec 2010 13:58:53 +0000 (13:58 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Mon, 13 Dec 2010 13:58:53 +0000 (13:58 +0000)
* 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.

ChangeLog.parse-color
grub-core/term/gfxterm.c

index ccba06d3cea2064f7a73e7af93ae1342d8d1b70f..941cd5aadecbaadf20d1a3cea40eea3ca13c16e8 100644 (file)
@@ -39,3 +39,9 @@
        function.
        (GRUB_MOD_INIT): Register 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.
index 93367f2bb49376fc0f46ac4161a68dbc4fc373ed..c914f8d2cf390d6f37b16494bddf5c79f5af675d 100644 (file)
@@ -539,10 +539,20 @@ dirty_region_add (int x, int y, unsigned int width, unsigned int height)
 
   if (repaint_scheduled)
     {
-      x = virtual_screen.offset_x;
-      y = virtual_screen.offset_y;
-      width = virtual_screen.width;
-      height = virtual_screen.height;
+      if (x > (int)virtual_screen.offset_x)
+        {
+          width += virtual_screen.offset_x - x;
+          x = virtual_screen.offset_x;
+        }
+      if (y > (int)virtual_screen.offset_y)
+        {
+          height += virtual_screen.offset_y - y;
+          y = virtual_screen.offset_y;
+        }
+      if (width < virtual_screen.width)
+        width = virtual_screen.width;
+      if (height < virtual_screen.height)
+        height = virtual_screen.height;
       repaint_scheduled = 0;
       repaint_was_scheduled = 1;
     }