summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2020-06-06 18:53:04 (GMT)
committerculler <culler>2020-06-06 18:53:04 (GMT)
commitbcf017e94b644b427d704da23be4bbe164978fff (patch)
tree01f8e6bf3332571a7339dead697d4ecfdb4197a1 /macosx
parentf31664f2a7c475db0fcb646accf6f58d78407da8 (diff)
downloadtk-bcf017e94b644b427d704da23be4bbe164978fff.zip
tk-bcf017e94b644b427d704da23be4bbe164978fff.tar.gz
tk-bcf017e94b644b427d704da23be4bbe164978fff.tar.bz2
A different attempt to make sure new windows are completely drawn.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXKeyEvent.c3
-rw-r--r--macosx/tkMacOSXNotify.c3
-rw-r--r--macosx/tkMacOSXWindowEvent.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index e0b0094..bff9e26 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -255,12 +255,11 @@ static NSUInteger textInputModifiers;
*/
if (type == NSKeyDown && [theEvent isARepeat]) {
+
xEvent.xany.type = KeyRelease;
Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL);
xEvent.xany.type = KeyPress;
}
- if (xEvent.xany.type == KeyPress) {
- }
Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL);
return theEvent;
}
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index daa1321..3433e56 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -457,6 +457,9 @@ TkMacOSXEventsSetupProc(
*/
ticker = Tcl_CreateTimerHandler(TICK, Heartbeat, NULL);
+ Tcl_CancelIdleCall(TkMacOSXDrawAllViews, NULL);
+ Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL);
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {}
}
}
}
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index b5e6ee3..debe5b8 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -42,7 +42,6 @@ extern NSString *NSWindowDidOrderOnScreenNotification;
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
extern NSString *NSWindowWillOrderOnScreenNotification;
-extern NSString *NSWindowDidOrderOnScreenNotification;
extern NSString *NSWindowDidOrderOffScreenNotification;
#endif
@@ -216,9 +215,10 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
TkWindow *winPtr = TkMacOSXGetTkWindow(window);
if (winPtr) {
TKContentView *view = [window contentView];
- while(Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {};
[view addTkDirtyRect:[view bounds]];
- TkMacOSXDrawAllViews(NULL);
+ Tcl_CancelIdleCall(TkMacOSXDrawAllViews, NULL);
+ Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL);
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {}
}
}