summaryrefslogtreecommitdiffstats
path: root/macosx/ttkMacOSXTheme.h
diff options
context:
space:
mode:
authorculler <culler>2021-04-21 14:33:08 (GMT)
committerculler <culler>2021-04-21 14:33:08 (GMT)
commit8ae33ca1eea9508220184d40c48774168f359de5 (patch)
tree3f5609ac20c89c4d1e5a159ddaf09dfd75c8bb67 /macosx/ttkMacOSXTheme.h
parentef5470780da9238e25f58e521c2147e156cf461c (diff)
parent95d45c95314c76807b895482f25ecf432b2896c1 (diff)
downloadtk-8ae33ca1eea9508220184d40c48774168f359de5.zip
tk-8ae33ca1eea9508220184d40c48774168f359de5.tar.gz
tk-8ae33ca1eea9508220184d40c48774168f359de5.tar.bz2
Merge 8.7
Diffstat (limited to 'macosx/ttkMacOSXTheme.h')
-rw-r--r--macosx/ttkMacOSXTheme.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/macosx/ttkMacOSXTheme.h b/macosx/ttkMacOSXTheme.h
index d12286d..2694c72 100644
--- a/macosx/ttkMacOSXTheme.h
+++ b/macosx/ttkMacOSXTheme.h
@@ -13,12 +13,25 @@
* Macros for handling drawing contexts.
*/
-#define BEGIN_DRAWING(d) { \
- TkMacOSXDrawingContext dc; \
- if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) {return;}
-#define END_DRAWING \
+#define BEGIN_DRAWING(d) { \
+ TkMacOSXDrawingContext dc; \
+ if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) { \
+ return; \
+ } \
+
+#define BEGIN_DRAWING_OR_REDRAW(d) { \
+ TkMacOSXDrawingContext dc; \
+ if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) { \
+ NSView *view = TkMacOSXGetNSViewForDrawable(d); \
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} \
+ [(TKContentView *)view addTkDirtyRect:[view bounds]]; \
+ return; \
+ } \
+
+#define END_DRAWING \
TkMacOSXRestoreDrawingContext(&dc);}
+
#define HIOrientation kHIThemeOrientationNormal
#define NoThemeMetric 0xFFFFFFFF