summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-25 12:00:27 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-25 12:00:27 +0100
commitf247f8340bd10844d65de9e3e52ba5f6b2fd02e6 (patch)
treea553d2e518e85c50f4009e1d00d69f86c70ba9d8 /platform/linuxbsd
parent15264ce5d94f1f0263df212e467bd8730a6464d3 (diff)
parent5ebb60e0cfc5bc720cc629dd3ae3173cb9b75f19 (diff)
Merge pull request #72025 from bruvzg/x11_ime_focus_bg
[X11] Make IME focus window input only.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index f1159c3981..aad0680f8c 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -4859,7 +4859,11 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
{
wd.x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo.screen), win_rect.position.x, win_rect.position.y, win_rect.size.width > 0 ? win_rect.size.width : 1, win_rect.size.height > 0 ? win_rect.size.height : 1, 0, visualInfo.depth, InputOutput, visualInfo.visual, valuemask, &windowAttributes);
- wd.x11_xim_window = XCreateWindow(x11_display, wd.x11_window, 0, 0, 1, 1, 0, visualInfo.depth, InputOutput, visualInfo.visual, valuemask, &windowAttributes);
+
+ XSetWindowAttributes window_attributes_ime = {};
+ window_attributes_ime.event_mask = KeyPressMask | KeyReleaseMask | StructureNotifyMask | ExposureMask;
+
+ wd.x11_xim_window = XCreateWindow(x11_display, wd.x11_window, 0, 0, 1, 1, 0, CopyFromParent, InputOnly, CopyFromParent, CWEventMask, &window_attributes_ime);
// Enable receiving notification when the window is initialized (MapNotify)
// so the focus can be set at the right time.