summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEvent.c
diff options
context:
space:
mode:
authordas <das>2007-05-31 13:38:13 (GMT)
committerdas <das>2007-05-31 13:38:13 (GMT)
commit374e000a01924c7de4eb44cdec25581214de0630 (patch)
treee2d1166c8c3d68d89d570e6d4a60e2fa5bd33f82 /macosx/tkMacOSXEvent.c
parente9883bba4b0507959e2d037aca5db25e08a298cc (diff)
downloadtk-374e000a01924c7de4eb44cdec25581214de0630.zip
tk-374e000a01924c7de4eb44cdec25581214de0630.tar.gz
tk-374e000a01924c7de4eb44cdec25581214de0630.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/tkMacOSXEvent.c')
-rw-r--r--macosx/tkMacOSXEvent.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index dcd06fb..77d3cb5 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.17 2007/05/30 06:35:54 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.18 2007/05/31 13:38:13 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -41,9 +41,21 @@ TkMacOSXFlushWindows(void)
WindowRef wRef = GetWindowList();
while (wRef) {
- CGrafPtr portPtr = GetWindowPort(wRef);
- if (QDIsPortBuffered(portPtr)) {
- QDFlushPortBuffer(portPtr, NULL);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ if (1
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
+ && HIWindowFlush != NULL
+#endif
+ ) {
+ ChkErr(HIWindowFlush, wRef);
+ } else
+#endif
+ {
+ CGrafPtr portPtr = GetWindowPort(wRef);
+
+ if (QDIsPortBuffered(portPtr)) {
+ QDFlushPortBuffer(portPtr, NULL);
+ }
}
wRef = GetNextWindow(wRef);
}