summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorculler <culler>2024-06-04 18:46:34 (GMT)
committerculler <culler>2024-06-04 18:46:34 (GMT)
commitce6a5945cca949ab5db2ce0ec8a534f4a5fcdd45 (patch)
treef5223141098060e42344601e476737b975e604b0 /macosx/tkMacOSXSubwindows.c
parent8a64061d4a91cfc949aa598b67d455bc5e7e0566 (diff)
downloadtk-ce6a5945cca949ab5db2ce0ec8a534f4a5fcdd45.zip
tk-ce6a5945cca949ab5db2ce0ec8a534f4a5fcdd45.tar.gz
tk-ce6a5945cca949ab5db2ce0ec8a534f4a5fcdd45.tar.bz2
Cleanup
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r--macosx/tkMacOSXSubwindows.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 3c9ebc8..1e9933e 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -181,8 +181,6 @@ XMapWindow(
TkMacOSXApplyWindowAttributes(winPtr, win);
[win setExcludedFromWindowsMenu:NO];
[NSApp activateIgnoringOtherApps:initialized];
- // Not sure this does anything useful for TK_MAC_SYNCHRONOUS_DRAWING
- // [view addTkDirtyRect: [view bounds]];
if (initialized) {
if ([win canBecomeKeyWindow]) {
[win makeKeyAndOrderFront:NSApp];
@@ -228,20 +226,15 @@ XMapWindow(
*/
TKContentView *view = [win contentView];
-#if TK_MAC_SYNCHRONOUS_DRAWING
+
/*
* Do not rely on addTkDirtyRect: to generate Expose events
* (though I’m not sure if this is the place to generate events;
* or if using generateExposeEvents: is the best way;
* what does XMapWindow() do on other platforms?)
*/
- // Probably only needs to use the widget bounds.
+ // Possibly this only needs to use the widget bounds.
[view generateExposeEvents:[view bounds]];
-#else
- // if (view != [NSView focusView]) {
- // [view addTkDirtyRect:[view bounds]];
- // }
-#endif
/*
* Generate VisibilityNotify events for window and all mapped children.
@@ -378,18 +371,6 @@ XUnmapWindow(
TkMacOSXInvalClipRgns((Tk_Window)parentPtr);
TkMacOSXUpdateClipRgn(parentPtr);
}
-#if TK_MAC_SYNCHRONOUS_DRAWING
- /*
- * Anything need to be done here instead?
- * (Not yet aware of reasoning behind [78a3bdc4454f]
- * i.e. why the existing approach uses addTkDirtyRect: here)
- */
-#else
- // TKContentView *view = [win contentView];
- // if (view != [NSView focusView]) {
- // [view addTkDirtyRect:[view bounds]];
- // }
-#endif
return Success;
}
@@ -1044,12 +1025,8 @@ InvalViewRect(
break;
case kHIShapeEnumerateRect:
dirtyRect = NSRectFromCGRect(CGRectApplyAffineTransform(*rect, t));
-#if TK_MAC_SYNCHRONOUS_DRAWING
// Cannot rely on addTkDirtyRect: to force redrawing.
[view generateExposeEvents:dirtyRect];
-#else
- // [view addTkDirtyRect:dirtyRect];
-#endif
break;
}
return noErr;