Hi!

It seems that Agar 1.4.1 and Agar trunk have some very peculiar bugs when
using the sdlfb-driver.
I'm running Ubuntu 10.04 and XUbuntu 11.10 (so it's SDL under X).

Moving Agar windows is invisible. You don't see the window being moved but
it did move. A patch (based on Agar 1.4.1) setting the dirty-flag on a
window that is moved is attached.
Also, resizing the "display" (the SDL X-window) results in a blank
screen/X-window (it is not redrawn). I've attached a patch for this as
well (it sets the window dirty-flag on all windows when the display
is resized).

I wonder if I'm missing something obvious here, since I couldn't find any
such reports in the mailing list or bug tracker. These bugs are
easily reproduced using any Agar program running under sdlfb. At least
on my systems...

When we're at it. Some other random notes about Agar:
 * I had to update the ./configure using the latest BSDBuild
   since the BSDBuild perl scripts used to generate ./configure
   were outdated, resulting in false-negative ./configure check results.
   This is probably related to the (frequent) changes in gcc's
   definition of what warnings belong to -Wall.
   Short story: the distribution's ./configure is incompatible with
   gcc-v4.6.1. In my case the 64-bit type check unnecessarily failed.
    * btw. the fallback code for !HAVE_64BIT is broken. There's a header
      file defining the 64-bit integer types as structures and it's included
      twice.
  * btw. you should really use header guards. not using header guards
    is evil :-)
  * btw. the build system's libtool generation didn't work (so it's
    BSDBuild-related) but I didn't look at this in more detail since
    I simply generated it on my own and specified the libtool to use
    manually.
  * drv_sw.c:165:
    Doesn't the critical section extend over the read access on 'win' at
    the beginning of the loop? I think the AG_ObjectLock must be moved
    to the beginning of the loop or around the loop.

Best regards,
Robin Haberkorn
--- gui/drv_sw.c	2012-01-10 03:00:38.615475081 +0100
+++ gui/drv_sw.c	2012-01-10 02:49:46.355510627 +0100
@@ -278,6 +278,8 @@
 			AGDRIVER_CLASS(dsw)->updateRegion(dsw, rFill2);
 	}
 
+	win->dirty = 1;
+
 	AG_PostEvent(NULL, win, "window-user-move", "%d,%d",
 	    WIDGET(win)->x, WIDGET(win)->y);
 }
--- gui/drv_sw.c	2012-01-10 16:39:51.552957092 +0100
+++ gui/drv_sw.c	2012-01-10 16:39:57.333055086 +0100
@@ -202,6 +202,10 @@
 			AG_WidgetSizeAlloc(win, &a);
 			AG_WindowUpdate(win);
 		}
+
+		/* redraw all windows */
+		win->dirty = 1;
+
 		AG_ObjectUnlock(win);
 	}
 	if (agVideoResizeCallback != NULL) {
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to