Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
94c800f3
Commit
94c800f3
authored
Sep 17, 2017
by
zhykzhykzhyk
Committed by
mercury233
Sep 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IME window at correct position (#5)
parent
55e1c13d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
premake/irrlicht/irrlicht-mac.patch
premake/irrlicht/irrlicht-mac.patch
+23
-8
No files found.
premake/irrlicht/irrlicht-mac.patch
View file @
94c800f3
...
...
@@ -94,7 +94,7 @@ index f629588..d2fefae 100644
private:
diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
index ad493fc..
b4b1a3e
100644
index ad493fc..
8692d0c
100644
--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
+++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
@@ -496,7 +496,7 @@
CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
...
...
@@ -154,7 +154,7 @@ index ad493fc..b4b1a3e 100644
}
return (result);
@@ -971,6 +1005,
18
@@
bool CIrrDeviceMacOSX::run()
@@ -971,6 +1005,
33
@@
bool CIrrDeviceMacOSX::run()
os::Timer::tick();
storeMouseLocation();
...
...
@@ -167,13 +167,28 @@ index ad493fc..b4b1a3e 100644
+ }
+ else
+ {
+ [Window makeFirstResponder:(AppDelegate*)[NSApp delegate]];
+ auto textView = (NSTextView*)[NSApp delegate];
+ auto crect = focusElement->getAbsolutePosition();
+
+ // ensure font height enough to fill the rect, otherwize ime window will overlaps the edit box
+ [textView setFont:[NSFont userFontOfSize:crect.getHeight()]];
+
+ // change origin from top left to bottom right
+ NSRect rect = {
+ crect.UpperLeftCorner.X,
+ [[textView superview] frame].size.height - crect.LowerRightCorner.Y,
+ crect.getWidth(), crect.getHeight(),
+ };
+ [textView setFrame:rect];
+
+ // start to receive input events
+ [Window makeFirstResponder:textView];
+ }
+
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if (event != nil)
{
@@ -979,6 +10
25
,13 @@
bool CIrrDeviceMacOSX::run()
@@ -979,6 +10
40
,13 @@
bool CIrrDeviceMacOSX::run()
switch([(NSEvent *)event type])
{
case NSKeyDown:
...
...
@@ -187,7 +202,7 @@ index ad493fc..b4b1a3e 100644
postKeyEvent(event,ievent,true);
break;
@@ -1199,22 +12
52
,22 @@
void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
@@ -1199,22 +12
67
,22 @@
void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment