Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0ddad356
Commit
0ddad356
authored
Mar 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Update existing input contexts on layout change.
parent
43e22eaa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
6 deletions
+24
-6
imm.c
dlls/imm32/imm.c
+5
-0
imm32.c
dlls/imm32/tests/imm32.c
+10
-5
input.c
dlls/win32u/input.c
+7
-1
ntuser.h
include/ntuser.h
+2
-0
No files found.
dlls/imm32/imm.c
View file @
0ddad356
...
...
@@ -3152,6 +3152,11 @@ static LRESULT ime_internal_msg( WPARAM wparam, LPARAM lparam)
ImmSetActiveContext
(
hwnd
,
himc
,
wparam
==
IME_INTERNAL_ACTIVATE
);
ImmReleaseContext
(
hwnd
,
himc
);
break
;
case
IME_INTERNAL_HKL_ACTIVATE
:
ImmEnumInputContext
(
0
,
enum_activate_layout
,
0
);
break
;
case
IME_INTERNAL_HKL_DEACTIVATE
:
break
;
default:
FIXME
(
"wparam = %Ix
\n
"
,
wparam
);
break
;
...
...
dlls/imm32/tests/imm32.c
View file @
0ddad356
...
...
@@ -4013,12 +4013,12 @@ static void test_ImmActivateLayout(void)
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
IME_SELECT
,
.
select
=
1
,
.
todo
=
TRUE
,
.
flaky_himc
=
TRUE
,
.
flaky_himc
=
TRUE
,
},
{
.
hkl
=
expect_ime
,
.
himc
=
0
/*himc*/
,
.
func
=
IME_SELECT
,
.
select
=
1
,
.
todo
=
TRUE
,
.
flaky_himc
=
TRUE
,
.
flaky_himc
=
TRUE
,
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
...
...
@@ -4067,12 +4067,12 @@ static void test_ImmActivateLayout(void)
{
.
hkl
=
default_hkl
,
.
himc
=
default_himc
,
.
func
=
IME_SELECT
,
.
select
=
0
,
.
todo
=
TRUE
,
.
flaky_himc
=
TRUE
,
.
flaky_himc
=
TRUE
,
},
{
.
hkl
=
default_hkl
,
.
himc
=
0
/*himc*/
,
.
func
=
IME_SELECT
,
.
select
=
0
,
.
todo
=
TRUE
,
.
flaky_himc
=
TRUE
,
.
flaky_himc
=
TRUE
,
},
{
0
},
};
...
...
@@ -4149,7 +4149,6 @@ static void test_ImmActivateLayout(void)
SET_EXPECT
(
ImeInquire
);
ok_eq
(
old_hkl
,
ActivateKeyboardLayout
(
hkl
,
0
),
HKL
,
"%p"
);
todo_wine
CHECK_CALLED
(
ImeInquire
);
activate_with_window_seq
[
1
].
himc
=
himc
;
ok_seq
(
activate_with_window_seq
);
...
...
@@ -4164,7 +4163,9 @@ static void test_ImmActivateLayout(void)
memset
(
ime_calls
,
0
,
sizeof
(
ime_calls
)
);
ime_call_count
=
0
;
todo_ImeDestroy
=
TRUE
;
/* Wine doesn't leak the IME */
ok_eq
(
hkl
,
ActivateKeyboardLayout
(
old_hkl
,
0
),
HKL
,
"%p"
);
todo_ImeDestroy
=
FALSE
;
deactivate_with_window_seq
[
1
].
himc
=
himc
;
deactivate_with_window_seq
[
5
].
himc
=
himc
;
ok_seq
(
deactivate_with_window_seq
);
...
...
@@ -4175,7 +4176,9 @@ static void test_ImmActivateLayout(void)
ok_seq
(
empty_sequence
);
todo_ImeInquire
=
TRUE
;
ok_eq
(
old_hkl
,
ActivateKeyboardLayout
(
hkl
,
0
),
HKL
,
"%p"
);
todo_ImeInquire
=
FALSE
;
ok_eq
(
hkl
,
GetKeyboardLayout
(
0
),
HKL
,
"%p"
);
ok_ret
(
1
,
EnumThreadWindows
(
GetCurrentThreadId
(),
enum_thread_ime_windows
,
(
LPARAM
)
&
ime_windows
)
);
...
...
@@ -4183,7 +4186,9 @@ static void test_ImmActivateLayout(void)
todo_wine
ok
(
!!
ime_windows
.
ime_ui_hwnd
,
"missing IME UI window
\n
"
);
todo_wine
ok_ret
(
(
UINT_PTR
)
ime_windows
.
ime_hwnd
,
(
UINT_PTR
)
GetParent
(
ime_windows
.
ime_ui_hwnd
)
);
todo_ImeDestroy
=
TRUE
;
/* Wine doesn't leak the IME */
ok_eq
(
hkl
,
ActivateKeyboardLayout
(
old_hkl
,
0
),
HKL
,
"%p"
);
todo_ImeDestroy
=
FALSE
;
ok_eq
(
old_hkl
,
GetKeyboardLayout
(
0
),
HKL
,
"%p"
);
...
...
dlls/win32u/input.c
View file @
0ddad356
...
...
@@ -1219,12 +1219,14 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
return
0
;
old_layout
=
info
->
kbd_layout
;
info
->
kbd_layout
=
layout
;
if
(
old_layout
!=
layout
)
{
HWND
ime_hwnd
=
get_default_ime_window
(
0
);
const
NLS_LOCALE_DATA
*
data
;
CHARSETINFO
cs
=
{
0
};
if
(
ime_hwnd
)
send_message
(
ime_hwnd
,
WM_IME_INTERNAL
,
IME_INTERNAL_HKL_DEACTIVATE
,
HandleToUlong
(
old_layout
)
);
if
(
HIWORD
(
layout
)
&
0x8000
)
FIXME
(
"Aliased keyboard layout not yet implemented
\n
"
);
else
if
(
!
(
data
=
get_locale_data
(
HIWORD
(
layout
)
)))
...
...
@@ -1232,7 +1234,11 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
else
translate_charset_info
(
ULongToPtr
(
data
->
idefaultansicodepage
),
&
cs
,
TCI_SRCCODEPAGE
);
info
->
kbd_layout
=
layout
;
info
->
kbd_layout_id
=
0
;
if
(
ime_hwnd
)
send_message
(
ime_hwnd
,
WM_IME_INTERNAL
,
IME_INTERNAL_HKL_ACTIVATE
,
HandleToUlong
(
layout
)
);
if
((
focus
=
get_focus
())
&&
get_window_thread
(
focus
,
NULL
)
==
GetCurrentThreadId
())
send_message
(
focus
,
WM_INPUTLANGCHANGE
,
cs
.
ciCharset
,
(
LPARAM
)
layout
);
}
...
...
include/ntuser.h
View file @
0ddad356
...
...
@@ -487,6 +487,8 @@ enum wine_internal_message
#define WM_IME_INTERNAL 0x287
#define IME_INTERNAL_ACTIVATE 0x17
#define IME_INTERNAL_DEACTIVATE 0x18
#define IME_INTERNAL_HKL_ACTIVATE 0x19
#define IME_INTERNAL_HKL_DEACTIVATE 0x20
#define WM_SYSTIMER 0x0118
...
...
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