[teklib-general] teklib: imported patch refresh
hg-notify at neoscientists.org
hg-notify at neoscientists.org
Wed Jan 16 10:34:25 CET 2008
details: http://hg.teklib.org/teklib/rev/91bd282ac18c
changeset: 148:91bd282ac18c
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Tue Dec 18 21:29:33 2007 +0100
description:
imported patch refresh
diffs (94 lines):
diff -r dea3be24b43a -r 91bd282ac18c src/display_x11/display_x11_api.c
--- a/src/display_x11/display_x11_api.c Tue Dec 18 21:26:37 2007 +0100
+++ b/src/display_x11/display_x11_api.c Tue Dec 18 21:29:33 2007 +0100
@@ -72,7 +72,7 @@ x11_openvisual(TMOD_X11 *mod, struct TVR
break;
swa.colormap = v->colormap;
- swa.event_mask = StructureNotifyMask;
+ swa.event_mask = StructureNotifyMask | ExposureMask;
TDBPRINTF(TDB_INFO,("x: %d - y: %d - w: %d - y: %d\n",
v->winleft, v->wintop, v->winwidth, v->winheight));
@@ -137,6 +137,7 @@ x11_openvisual(TMOD_X11 *mod, struct TVR
if (!v->draw) break;
}
+#if 0
do
{
XNextEvent(mod->x11_Display, &ev);
@@ -148,6 +149,11 @@ x11_openvisual(TMOD_X11 *mod, struct TVR
v->winheight = ((XConfigureEvent *) &ev)->height;
}
} while (ev.type != MapNotify);
+#endif
+
+ /* TODO/HACK: refresh is on right from the start (see also
+ ExposureMask above): */
+ v->eventmask = TITYPE_REFRESH;
v->base_mask = swa.event_mask;
v->bgpen = TVPEN_UNDEFINED;
diff -r dea3be24b43a -r 91bd282ac18c src/display_x11/display_x11_inst.c
--- a/src/display_x11/display_x11_inst.c Tue Dec 18 21:26:37 2007 +0100
+++ b/src/display_x11/display_x11_inst.c Tue Dec 18 21:29:33 2007 +0100
@@ -490,6 +490,7 @@ x11_processevent(TMOD_X11 *mod)
continue;
}
+ /* lookup window: */
w = ((XAnyEvent *) &ev)->window;
v = TNULL;
node = mod->x11_vlist.tlh_Head;
@@ -563,6 +564,7 @@ x11_processvisualevent(TMOD_X11 *mod, VI
{
if (getimsg(mod, v, &imsg, TITYPE_NEWSIZE))
TAddTail(&v->imsgqueue, &imsg->timsg_Node);
+ TDBPRINTF(TDB_TRACE,("Configure: NEWSIZE\n"));
}
}
break;
@@ -579,10 +581,11 @@ x11_processvisualevent(TMOD_X11 *mod, VI
}
break;
+#if 0
case MapNotify:
/* remap everything */
- if ((v->eventmask & TITYPE_REFRESH) &&
- ((XExposeEvent *) ev)->count == 0)
+ if ((v->eventmask & TITYPE_REFRESH) /*&&
+ ((XExposeEvent *) ev)->count == 0*/)
{
if (getimsg(mod, v, &imsg, TITYPE_REFRESH))
{
@@ -591,9 +594,11 @@ x11_processvisualevent(TMOD_X11 *mod, VI
imsg->timsg_Width = v->winwidth;
imsg->timsg_Height = v->winheight;
TAddTail(&v->imsgqueue, &imsg->timsg_Node);
- }
- }
- break;
+ TDBPRINTF(TDB_TRACE,("Map: REFRESH\n"));
+ }
+ }
+ break;
+#endif
case Expose:
/* remap an area */
@@ -607,8 +612,11 @@ x11_processvisualevent(TMOD_X11 *mod, VI
imsg->timsg_Width = ((XExposeEvent *) ev)->width;
imsg->timsg_Height = ((XExposeEvent *) ev)->height;
TAddTail(&v->imsgqueue, &imsg->timsg_Node);
- }
- }
+ TDBPRINTF(TDB_TRACE,("Expose: REFRESH\n"));
+ }
+ }
+ else
+ TDBPRINTF(TDB_TRACE,("Map: TITYPE_REFRESH NOT SET\n"));
break;
case FocusIn:
More information about the teklib-general
mailing list