[tekui-devel] tekui: Bugs fixed and minor correction in X11 display and Visual...
Timm S. Mueller
tmueller at schulze-mueller.de
Fri Nov 21 19:26:14 CET 2008
details: http://hg.teklib.org/tekui/rev/aee2499a02b4
changeset: 42:aee2499a02b4
user: Timm S. Mueller <tmueller at schulze-mueller.de>
date: Fri Nov 21 18:54:17 2008 +0100
description:
Bugs fixed and minor correction in X11 display and Visual; Improved desktop
color import
diffs (truncated from 305 to 100 lines):
diff -r ff5e1974fb75 -r aee2499a02b4 TODO
--- a/TODO Thu Nov 20 22:39:46 2008 +0100
+++ b/TODO Fri Nov 21 18:54:17 2008 +0100
@@ -1,12 +1,5 @@
= TODO =
-
-The scope of the current (alpha) release was determined by the
-smallest reasonable range of features needed for writing simple
-everyday applications. Chances are that the following issues need to
-be worked on:
-
----------------------------------------------------------------------
=== General ===
@@ -22,5 +15,3 @@ be worked on:
* potential memory leak in visual.drawimage
* Antialiased fonts unsupported under X11 with Composite Extension
- * Doubleclick timeout is incorrectly handled when using an
- integer version of Lua
diff -r ff5e1974fb75 -r aee2499a02b4 doc/todo.html
--- a/doc/todo.html Thu Nov 20 22:39:46 2008 +0100
+++ b/doc/todo.html Fri Nov 21 18:54:17 2008 +0100
@@ -10,13 +10,6 @@
<h1>
TODO
</h1>
- <p>
- The scope of the current (alpha) release was determined by the
- smallest reasonable range of features needed for writing simple
- everyday applications. Chances are that the following issues need to
- be worked on:
- </p>
- <hr />
<h3>
General
</h3>
@@ -56,10 +49,6 @@
<li>
Antialiased fonts unsupported under X11 with Composite Extension
</li>
- <li>
- Doubleclick timeout is incorrectly handled when using an
- integer version of Lua
- </li>
</ul>
</blockquote>
</body>
diff -r ff5e1974fb75 -r aee2499a02b4 src/display_x11/display_x11_api.c
--- a/src/display_x11/display_x11_api.c Thu Nov 20 22:39:46 2008 +0100
+++ b/src/display_x11/display_x11_api.c Fri Nov 21 18:54:17 2008 +0100
@@ -3,6 +3,7 @@
static void freepen(TMOD_X11 *mod, VISUAL *v, struct X11Pen *pen);
static int x11_seteventmask(TMOD_X11 *mod, VISUAL *v, TUINT eventmask);
+static void x11_freeimage(TMOD_X11 *mod, VISUAL *v);
#define DEF_WINWIDTH 600
#define DEF_WINHEIGHT 400
@@ -211,6 +212,7 @@ x11_closevisual(TMOD_X11 *mod, struct TV
TRemove(&v->node);
+ x11_freeimage(mod, v);
TExecFree(TGetExecBase(mod), v->tempbuf);
if (mod->x11_use_xft && v->draw)
@@ -1019,8 +1021,13 @@ x11_drawtags(TMOD_X11 *mod, struct TVReq
}
/*****************************************************************************/
-
-/* HACK: */
+/*
+** This is extremely awkward, since we are in a shared library and must
+** check for availability of the extension in an error handler using
+** a global variable. TODO: To fully work around this mess, we would
+** additionally have to enclose XShmAttach() in a mutex.
+*/
+
static TBOOL shm_available = TTRUE;
static int
@@ -1029,6 +1036,26 @@ shm_errhandler(Display *d, XErrorEvent *
TDBPRINTF(TDB_ERROR,("Remote display - fallback to normal XPutImage\n"));
shm_available = TFALSE;
return 0;
+}
+
+/*****************************************************************************/
+
+static void
+x11_freeimage(TMOD_X11 *mod, VISUAL *v)
+{
+ if (v->image)
+ {
+ if (v->image_shm)
+ {
More information about the tekui-devel
mailing list