summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixScale.c
diff options
context:
space:
mode:
authordas <das>2007-04-23 21:15:17 (GMT)
committerdas <das>2007-04-23 21:15:17 (GMT)
commiteed9e6e51c9b315cca0fab5242fb5d5ed79f1d92 (patch)
tree32076caa36b64498e5a51239d238793d593cfd09 /unix/tkUnixScale.c
parentb5c021fb2226984ca793d193dd65e007f6780ea4 (diff)
downloadtk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.zip
tk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.tar.gz
tk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.tar.bz2
* generic/tkCanvas.c: allow -selectforeground option to be None; add
* generic/tkCanvText.c: fallback to fgColor when selFgColor is None * generic/tkEntry.c: (new default on aqua to match native L&F). * generic/tkListbox.c: * generic/tkText.c: * generic/tkCanvas.c: add support for bypassing all of Tk's double * generic/tkEntry.c: buffered drawing into intermediate pixmaps * generic/tkFrame.c: (via TK_NO_DOUBLE_BUFFERING #define), it is * generic/tkListbox.c: unnecessary & wasteful on aqua where all * generic/tkPanedWindow.c: drawing is already double-buffered by the * generic/tkTextDisp.c: window server. (Use of this on other * generic/ttk/ttkWidget.c: platforms would only require implementation * unix/tkUnixScale.c: of TkpClipDrawableToRect()).
Diffstat (limited to 'unix/tkUnixScale.c')
-rw-r--r--unix/tkUnixScale.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index 1d5254d..f7970b5 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixScale.c,v 1.10 2005/11/14 11:54:21 dkf Exp $
+ * RCS: @(#) $Id: tkUnixScale.c,v 1.11 2007/04/23 21:15:17 das Exp $
*/
#include "tkScale.h"
@@ -568,6 +568,7 @@ TkpDisplayScale(
}
Tcl_Release((ClientData) scalePtr);
+#ifndef TK_NO_DOUBLE_BUFFERING
/*
* In order to avoid screen flashes, this function redraws the scale in a
* pixmap, then copies the pixmap to the screen in a single operation.
@@ -577,6 +578,9 @@ TkpDisplayScale(
pixmap = Tk_GetPixmap(scalePtr->display, Tk_WindowId(tkwin),
Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
+#else
+ pixmap = Tk_WindowId(tkwin);
+#endif /* TK_NO_DOUBLE_BUFFERING */
drawnArea.x = 0;
drawnArea.y = 0;
drawnArea.width = Tk_Width(tkwin);
@@ -619,6 +623,7 @@ TkpDisplayScale(
}
}
+#ifndef TK_NO_DOUBLE_BUFFERING
/*
* Copy the information from the off-screen pixmap onto the screen, then
* delete the pixmap.
@@ -628,6 +633,7 @@ TkpDisplayScale(
scalePtr->copyGC, drawnArea.x, drawnArea.y, drawnArea.width,
drawnArea.height, drawnArea.x, drawnArea.y);
Tk_FreePixmap(scalePtr->display, pixmap);
+#endif /* TK_NO_DOUBLE_BUFFERING */
done:
scalePtr->flags &= ~REDRAW_ALL;