mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-12 18:29:02 +00:00
Changed: Minor changes
This commit is contained in:
parent
9883d542ba
commit
70141044c7
1 changed files with 5 additions and 5 deletions
|
@ -153,9 +153,9 @@ bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
|
||||||
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
||||||
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
|
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
|
||||||
NSDictionary *options = [NSDictionary dictionary];
|
NSDictionary *options = [NSDictionary dictionary];
|
||||||
|
|
||||||
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
|
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
|
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
|
||||||
NSString *nstext = [objectsToPaste objectAtIndex:0];
|
NSString *nstext = [objectsToPaste objectAtIndex:0];
|
||||||
|
@ -264,8 +264,8 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server)
|
||||||
mousePos.y /= (float)viewRect.size.height;
|
mousePos.y /= (float)viewRect.size.height;
|
||||||
|
|
||||||
// if the mouse event was placed outside the view, don't tell NeL :)
|
// if the mouse event was placed outside the view, don't tell NeL :)
|
||||||
if((mousePos.x < 0.0 || mousePos.x > 1.0 ||
|
if((mousePos.x < 0.0 || mousePos.x > 1.0 ||
|
||||||
mousePos.y < 0.0 || mousePos.y > 1.0) &&
|
mousePos.y < 0.0 || mousePos.y > 1.0) &&
|
||||||
event.type != NSKeyDown && event.type != NSKeyUp)
|
event.type != NSKeyDown && event.type != NSKeyUp)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -415,7 +415,7 @@ typedef bool (*cocoaProc)(NL3D::IDriver*, const void* e);
|
||||||
|
|
||||||
void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
||||||
{
|
{
|
||||||
// break if there was no event to handle
|
// break if there was no event to handle
|
||||||
// if running embedded in e.g. qt, _eventLoop will be false
|
// if running embedded in e.g. qt, _eventLoop will be false
|
||||||
while(_eventLoop)
|
while(_eventLoop)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue