Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
cf36b826
Commit
cf36b826
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Hook up more of the IME
parent
91f80f8b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llwindow/llwindowsdl.cpp
+42
-2
42 additions, 2 deletions
indra/llwindow/llwindowsdl.cpp
indra/llwindow/llwindowsdl.h
+3
-0
3 additions, 0 deletions
indra/llwindow/llwindowsdl.h
with
45 additions
and
2 deletions
indra/llwindow/llwindowsdl.cpp
+
42
−
2
View file @
cf36b826
...
@@ -1665,7 +1665,6 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
...
@@ -1665,7 +1665,6 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
}
}
bool
newGrab
=
wantGrab
;
bool
newGrab
=
wantGrab
;
#if LL_X11
if
(
!
mFullscreen
)
/* only bother if we're windowed anyway */
if
(
!
mFullscreen
)
/* only bother if we're windowed anyway */
{
{
if
(
mSDL_Display
)
if
(
mSDL_Display
)
...
@@ -1696,7 +1695,6 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
...
@@ -1696,7 +1695,6 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
}
}
}
}
}
}
#endif // LL_X11
// pretend we got what we wanted, when really we don't care.
// pretend we got what we wanted, when really we don't care.
// return boolean success for whether we ended up in the desired state
// return boolean success for whether we ended up in the desired state
...
@@ -2730,6 +2728,48 @@ void LLWindowSDL::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
...
@@ -2730,6 +2728,48 @@ void LLWindowSDL::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
}
}
}
}
void
LLWindowSDL
::
updateLanguageTextInputArea
()
{
if
(
mLanguageTextInputAllowed
&&
mPreeditor
)
{
LLCoordGL
caret_coord
;
LLRect
preedit_bounds
;
if
(
mPreeditor
->
getPreeditLocation
(
-
1
,
&
caret_coord
,
&
preedit_bounds
,
NULL
))
{
LLCoordWindow
window_pos
;
convertCoords
(
caret_coord
,
&
window_pos
);
SDL_Rect
coords
;
coords
.
x
=
window_pos
.
mX
;
coords
.
y
=
window_pos
.
mY
;
coords
.
w
=
preedit_bounds
.
getWidth
()
-
coords
.
x
;
coords
.
h
=
preedit_bounds
.
getHeight
()
-
coords
.
y
;
SDL_SetTextInputRect
(
&
coords
);
}
}
}
void
LLWindowSDL
::
setLanguageTextInput
(
const
LLCoordGL
&
pos
)
{
if
(
mLanguageTextInputAllowed
&&
mPreeditor
)
{
LLCoordGL
caret_coord
;
LLRect
preedit_bounds
;
if
(
mPreeditor
->
getPreeditLocation
(
-
1
,
&
caret_coord
,
&
preedit_bounds
,
NULL
))
{
LLCoordWindow
window_pos
;
convertCoords
(
pos
,
&
window_pos
);
SDL_Rect
coords
;
coords
.
x
=
window_pos
.
mX
;
coords
.
y
=
window_pos
.
mY
;
coords
.
w
=
preedit_bounds
.
getWidth
()
-
coords
.
x
;
coords
.
h
=
preedit_bounds
.
getHeight
()
-
coords
.
y
;
SDL_SetTextInputRect
(
&
coords
);
}
}
}
//static
//static
std
::
vector
<
std
::
string
>
LLWindowSDL
::
getDynamicFallbackFontList
()
std
::
vector
<
std
::
string
>
LLWindowSDL
::
getDynamicFallbackFontList
()
{
{
...
...
This diff is collapsed.
Click to expand it.
indra/llwindow/llwindowsdl.h
+
3
−
0
View file @
cf36b826
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include
"llwindow.h"
#include
"llwindow.h"
#include
"lltimer.h"
#include
"lltimer.h"
#include
"llpreeditor.h"
#ifndef SDL_MAIN_HANDLED
#ifndef SDL_MAIN_HANDLED
#define SDL_MAIN_HANDLED 1
#define SDL_MAIN_HANDLED 1
...
@@ -127,6 +128,8 @@ class LLWindowSDL final : public LLWindow
...
@@ -127,6 +128,8 @@ class LLWindowSDL final : public LLWindow
/*virtual*/
void
bringToFront
();
/*virtual*/
void
bringToFront
();
void
allowLanguageTextInput
(
LLPreeditor
*
preeditor
,
BOOL
b
)
override
;
void
allowLanguageTextInput
(
LLPreeditor
*
preeditor
,
BOOL
b
)
override
;
/*virtual*/
void
updateLanguageTextInputArea
()
override
;
/*virtual*/
void
setLanguageTextInput
(
const
LLCoordGL
&
pos
)
override
;
/*virtual*/
void
spawnWebBrowser
(
const
std
::
string
&
escaped_url
,
bool
async
);
/*virtual*/
void
spawnWebBrowser
(
const
std
::
string
&
escaped_url
,
bool
async
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment