зеркало из https://github.com/mozilla/gecko-dev.git
Add SIOUX event handling in debug mode. Also remove a couple of unnecessary #defines and use the Universal Header versions.
This commit is contained in:
Родитель
2da4e3d447
Коммит
8ca901203b
|
@ -42,10 +42,12 @@
|
||||||
#include <ToolUtils.h>
|
#include <ToolUtils.h>
|
||||||
#include <LowMem.h>
|
#include <LowMem.h>
|
||||||
|
|
||||||
#define DRAW_ON_RESIZE
|
#if DEBUG
|
||||||
|
#include <SIOUX.h>
|
||||||
|
#include "macstdlibextras.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
const char SUSPENDRESUMEMESSAGE = 0x01;
|
#define DRAW_ON_RESIZE
|
||||||
const char MOUSEMOVEDMESSAGE = 0xFA;
|
|
||||||
|
|
||||||
const short kMinWindowWidth = 300;
|
const short kMinWindowWidth = 300;
|
||||||
const short kMinWindowHeight = 150;
|
const short kMinWindowHeight = 150;
|
||||||
|
@ -112,6 +114,12 @@ nsMacMessagePump::DoMessagePump()
|
||||||
|
|
||||||
if (haveEvent)
|
if (haveEvent)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
if (SIOUXHandleOneEvent(&theEvent))
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch(theEvent.what)
|
switch(theEvent.what)
|
||||||
{
|
{
|
||||||
case keyUp:
|
case keyUp:
|
||||||
|
@ -140,14 +148,14 @@ nsMacMessagePump::DoMessagePump()
|
||||||
unsigned char eventType = ((theEvent.message >> 24) & 0x00ff);
|
unsigned char eventType = ((theEvent.message >> 24) & 0x00ff);
|
||||||
switch (eventType)
|
switch (eventType)
|
||||||
{
|
{
|
||||||
case SUSPENDRESUMEMESSAGE:
|
case suspendResumeMessage:
|
||||||
if (theEvent.message & 0x00000001)
|
if ((theEvent.message & 1) == resumeFlag)
|
||||||
mInBackground = PR_FALSE; // resume message
|
mInBackground = PR_FALSE; // resume message
|
||||||
else
|
else
|
||||||
mInBackground = PR_TRUE; // suspend message
|
mInBackground = PR_TRUE; // suspend message
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MOUSEMOVEDMESSAGE:
|
case mouseMovedMessage:
|
||||||
DoMouseMove(theEvent);
|
DoMouseMove(theEvent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +173,7 @@ nsMacMessagePump::DoMessagePump()
|
||||||
LPeriodical::DevoteTimeToRepeaters(theEvent);
|
LPeriodical::DevoteTimeToRepeaters(theEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK; // a PR_BOOL? Should be PR_TRUE or PR_FALSE. Which is unclear
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
Загрузка…
Ссылка в новой задаче