From a3cd52ba05c568cbe9cd3a9fb21f8b3bd4f26b78 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 20 Sep 2000 01:14:03 +0000 Subject: [PATCH] Compress expose events --- WINGs/wtext.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/WINGs/wtext.c b/WINGs/wtext.c index d0675d43..260b38f8 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -354,7 +354,7 @@ removeSelection(Text *tPtr) static void paintText(Text *tPtr) -{ +{ TextBlock *tb = tPtr->firstTextBlock; WMFont *font; GC gc, greyGC; @@ -661,8 +661,8 @@ _doneV: if (tPtr->flags.monoFont && tb->graphic) tb = getFirstNonGraphicBlockFor(tb, dir); if (tb) { -if ((dir? tb->sections[s].x >= x : tb->sections[s].x < x)) - goto _doneH; + if ((dir? tb->sections[s].x >= x : tb->sections[s].x < x)) + goto _doneH; #if 0 if(tb->blank) { @@ -1345,12 +1345,12 @@ insertTextInteractively(Text *tPtr, char *text, int len) } #if 0 -if(*text == 'c') { + if(*text == 'c') { WMColor *color = WMCreateNamedColor(W_VIEW_SCREEN(tPtr->view), -"Blue", True); -WMSetTextSelectionColor(tPtr, color); -return; -} + "Blue", True); + WMSetTextSelectionColor(tPtr, color); + return; + } #endif if (len < 1 || !text) @@ -1840,6 +1840,8 @@ handleEvents(XEvent *event, void *data) switch(event->type) { case Expose: + if (event->xexpose.count!=0) + break; if(tPtr->hS) { if (!(W_VIEW(tPtr->hS))->flags.realized) @@ -1866,8 +1868,7 @@ handleEvents(XEvent *event, void *data) if(!tPtr->db) textDidResize(tPtr->view->delegate, tPtr->view); - if (!event->xexpose.count && tPtr->view->flags.realized) - paintText(tPtr); + paintText(tPtr); break; case FocusIn: -- 2.11.4.GIT