summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.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/tkMacOSXButton.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/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 5180734..76906e7 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.16 2007/05/09 12:57:45 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.17 2007/05/31 13:42:11 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -225,15 +225,6 @@ TkpDisplayButton(
}
/*
- * Set up clipping region. Make sure the we are using the port
- * for this button, or we will set the wrong window's clip.
- */
-
- destPort = TkMacOSXGetDrawablePort(pixmap);
- portChanged = QDSwapPort(destPort, &savePort);
- TkMacOSXSetUpClippingRgn(pixmap);
-
- /*
* See the comment in UpdateControlColors as to why we use the
* highlightbackground for the border of Macintosh buttons.
*/
@@ -249,6 +240,15 @@ TkpDisplayButton(
}
/*
+ * Set up clipping region. Make sure the we are using the port
+ * for this button, or we will set the wrong window's clip.
+ */
+
+ destPort = TkMacOSXGetDrawablePort(pixmap);
+ portChanged = QDSwapPort(destPort, &savePort);
+ TkMacOSXSetUpClippingRgn(pixmap);
+
+ /*
* Draw the native portion of the buttons. Start by creating the control
* if it doesn't already exist. Then configure the Macintosh control from
* the Tk info. Finally, we call Draw1Control to draw to the screen.