summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authordas <das>2007-05-31 13:42:11 (GMT)
committerdas <das>2007-05-31 13:42:11 (GMT)
commitb2961e1a86c13f6505e843476369d46550b31eab (patch)
tree8f1cac3f58c6abcf28008a0d482ae193fb90b43d /macosx/tkMacOSXWindowEvent.c
parenteb5bb113c80470c68abe015d2b9c755f3127e38b (diff)
downloadtk-b2961e1a86c13f6505e843476369d46550b31eab.zip
tk-b2961e1a86c13f6505e843476369d46550b31eab.tar.gz
tk-b2961e1a86c13f6505e843476369d46550b31eab.tar.bz2
* macosx/tkMacOSXWindowEvent.c (GenerateUpdateEvent): complete all
pending idle-time redraws before newly posted Expose events are processed; add bounds of redrawn windows to update region to ensure all child windows overdrawn by parents are redrawn. * macosx/tkMacOSXWindowEvent.c: centralize clip and window invalidation * macosx/tkMacOSXSubwindows.c: after location/size changes in the * macosx/tkMacOSXWm.c: BoundsChanged carbon event handler; correct/add window invalidation after window attribute changes. * macosx/tkMacOSXSubwindows.c (XResizeWindow, XMoveResizeWindow, XMoveWindow): factor out common code dealing with embedded and non-toplevel windows; remove unnecessary clip and window invalidation. * macosx/tkMacOSXButton.c (TkpDisplayButton): move clip setup closer to native button drawing calls. * macosx/tkMacOSXWm.c (TkMacOSXIsWindowZoomed, TkMacOSXZoomToplevel): correct handle gridded windows in max size calculations. * macosx/tkMacOSXEvent.c (TkMacOSXFlushWindows): use HIWindowFlush API when available. * macosx/tkMacOSXColor.c: cleanup whitespace and formatting. * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 69c8ebb..41966da 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.20 2007/05/30 06:39:38 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.21 2007/05/31 13:42:12 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -314,6 +314,9 @@ TkMacOSXProcessWindowEvent(
height = bounds.bottom - bounds.top;
flags |= TK_SIZE_CHANGED;
}
+ TkMacOSXInvalClipRgns((Tk_Window) winPtr);
+ TkMacOSXInvalidateWindow((MacDrawable *) window,
+ TK_PARENT_WINDOW);
TkGenWMConfigureEvent((Tk_Window)winPtr, x, y, width,
height, flags);
if (attr & kWindowBoundsChangeUserResize ||
@@ -467,6 +470,14 @@ GenerateUpdateEvent(Window window)
result = GenerateUpdates(tkMacOSXtmpRgn1, &updateBounds, winPtr);
EndUpdate(macWindow);
SetEmptyRgn(tkMacOSXtmpRgn1);
+ if (result) {
+ /*
+ * Ensure there are no pending idle-time redraws that could prevent
+ * the just posted Expose events from generating new redraws.
+ */
+
+ Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT);
+ }
return result;
}
@@ -522,6 +533,9 @@ GenerateUpdates(
SectRgn(damageRgn, updateRgn, damageRgn);
OffsetRgn(damageRgn, -bounds.left, -bounds.top);
GetRegionBounds(damageRgn, &damageBounds);
+ RectRgn(damageRgn, &bounds);
+ UnionRgn(damageRgn, updateRgn, updateRgn);
+ GetRegionBounds(updateRgn, updateBounds);
SetEmptyRgn(damageRgn);
event.xany.serial = Tk_Display(winPtr)->request;