Commits

Jeff Sickel committed 15dc18b

minimize window flash on resize

  • Participants
  • Parent commits 3a093e1

Comments (0)

Files changed (1)

File gui-osx-cocoa/screen.m

 	termreplacescreenimage(gscreen);
 	drawreplacescreenimage(gscreen);
 
+	sendmouse();
+
 	[win.content setHidden:NO];			/* reenable the flush */
-	flushmemscreen(gscreen->r);
 	qunlock(&win.lk);
-
-//	sendmouse();
 }
 
 static void
 	if(![win.content canDraw])
 		return;
 
-	LOG(@"_flushmemscreen");
-
 	NSRect rect;
 	rect = NSMakeRect(r.min.x, r.min.y, Dx(r), Dy(r));
 	flushimg(rect);		// OS X no longer needs to draw from the main thread
 		resizeimg();
 
 	/* these biild in a slight delay after the resize */
-	/*
 	if([WIN inLiveResize])
+		waitimg(20);
+	else
 		waitimg(100);
-	else
-		waitimg(500);
-	waitimg(50);
-	*/
+
 	[WIN flushWindow];
-	sendmouse();
 }
 
 - (BOOL)isFlipped
 static void
 getmousepos(void)
 {
-	#warning look here to remove resize flash
 	NSPoint p, q;
 
 	p = [WIN mouseLocationOutsideOfEventStream];
 
 	if(win.isnfs || win.isofs)
 		hidebars(1);
-	else if(MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && [WIN inLiveResize]==0){
+	else if(MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && [WIN inLiveResize]==NO){
 		if(p.x<12 && p.y<12 && p.x>2 && p.y>2)
 			acceptresizing(0);
 		else