summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAiraYumi <aira.youme@airanyumi.net>2024-05-16 14:16:37 +0900
committerGitHub <noreply@github.com>2024-05-16 08:16:37 +0300
commit732b4cd60a53d390e413a7791c29a4a4628fa4f2 (patch)
tree2a4a590cb1206bee59ab7eb9ccec067ca2fbdd39 /indra/llwindow
parent2f25f87ee719a79efc8316079f3c881eddb4d266 (diff)
Correcting the display position of the input dialog (#1480)
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowsdl.cpp15
-rw-r--r--indra/llwindow/llwindowsdl.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 255d89af77..218f953c7f 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -647,6 +647,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
{
{SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR,"0"},
{SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH,"1"},
+ {SDL_HINT_IME_INTERNAL_EDITING,"1"}
};
for( auto hint: hintList )
@@ -2619,3 +2620,17 @@ U32 LLWindowSDL::getAvailableVRAMMegabytes()
{
return 4096;
}
+
+void LLWindowSDL::setLanguageTextInput(const LLCoordGL& position)
+{
+ LLCoordWindow win_pos;
+ convertCoords( position, &win_pos );
+
+ SDL_Rect r;
+ r.x = win_pos.mX;
+ r.y = win_pos.mY;
+ r.w = 500;
+ r.h = 16;
+
+ SDL_SetTextInputRect(&r);
+}
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index e922ce592c..d24739cbda 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -171,6 +171,8 @@ public:
void *getPlatformWindow() override;
void bringToFront() override;
+
+ void setLanguageTextInput(const LLCoordGL& pos) override;
void spawnWebBrowser(const std::string &escaped_url, bool async) override;