turn off live-reflow during resize until cmd-key is down.

This commit is contained in:
pinkerton%netscape.com 1999-09-22 00:39:37 +00:00
parent 6c23f4f233
commit 6fa8f72c61

View File

@ -63,7 +63,7 @@
#include "macstdlibextras.h"
#endif
#define DRAW_ON_RESIZE 1 // if 1, enable live-resize except when the command key is down
#define DRAW_ON_RESIZE 0 // if 1, enable live-resize except when the command key is down
const short kMinWindowWidth = 125;
const short kMinWindowHeight = 150;
@ -445,11 +445,9 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
::SetPort(whichWindow);
#endif
//#if DEBUG
Boolean drawOnResize = (DRAW_ON_RESIZE && ((anEvent.modifiers & cmdKey) == 0));
//#else
// Boolean drawOnResize = false;
//#endif
// use the cmd-key to do the opposite of the DRAW_ON_RESIZE setting.
Boolean cmdKeyDown = (anEvent.modifiers & cmdKey) != 0;
Boolean drawOnResize = DRAW_ON_RESIZE ? !cmdKeyDown : cmdKeyDown;
if (drawOnResize)
{
Point oldPt = anEvent.where;