summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2014-12-28 05:24:34 (GMT)
committerKevin Walzer <kw@codebykevin.com>2014-12-28 05:24:34 (GMT)
commit226cb2b752c57912f6b32e77b467e7e77d619079 (patch)
tree9f63ae9b8517fcda1ea1b14193ec059077a63b08 /macosx/tkMacOSXWindowEvent.c
parentf89598e2f9eb0611fe6fc4ec6631fb283504c9d4 (diff)
downloadtk-226cb2b752c57912f6b32e77b467e7e77d619079.zip
tk-226cb2b752c57912f6b32e77b467e7e77d619079.tar.gz
tk-226cb2b752c57912f6b32e77b467e7e77d619079.tar.bz2
Refinement of redraw during window resizing in Cocoa; refinement of button display
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 7207859..bce64f2 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -817,7 +817,6 @@ ExposeRestrictProc(
while (rectsBeingDrawnCount--) {
CGRect r = NSRectToCGRect(*rectsBeingDrawn++);
-
r.origin.y = height - (r.origin.y + r.size.height);
HIShapeUnionWithRect(drawShape, &r);
}
@@ -838,6 +837,13 @@ ExposeRestrictProc(
/*Provide more fine-grained control over resizing of content to reduce flicker after removal of private API's.*/
+-(void) viewWillDraw
+{
+
+ [super viewWillDraw];
+}
+
+
- (BOOL) preservesContentDuringLiveResize
{
return YES;
@@ -845,21 +851,24 @@ ExposeRestrictProc(
- (void)viewWillStartLiveResize
{
+ NSDisableScreenUpdates();
[super viewWillStartLiveResize];
[self setNeedsDisplay:NO];
+ [self setHidden:YES];
}
- (void)viewDidEndLiveResize
{
+ NSEnableScreenUpdates();
+ [self setHidden:NO];
[self setNeedsDisplay:YES];
[super setNeedsDisplay:YES];
[super viewDidEndLiveResize];
}
-
/*Core function of this class, generates expose events for redrawing.*/
- (void) generateExposeEvents: (HIMutableShapeRef) shape
{
@@ -872,6 +881,7 @@ ExposeRestrictProc(
return;
}
+
HIShapeGetBounds(shape, &updateBounds);
serial = LastKnownRequestProcessed(Tk_Display(winPtr));
if (GenerateUpdates(shape, &updateBounds, winPtr) &&
@@ -896,6 +906,7 @@ ExposeRestrictProc(
while (Tcl_ServiceEvent(TCL_WINDOW_EVENTS)) {}
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
+
while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {}
}