Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9d72a71f
Commit
9d72a71f
authored
Feb 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove now unnecessary user locale change checks.
parent
c0366cbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
57 deletions
+0
-57
keyboard.c
dlls/winex11.drv/keyboard.c
+0
-57
No files found.
dlls/winex11.drv/keyboard.c
View file @
9d72a71f
...
@@ -1514,39 +1514,6 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
...
@@ -1514,39 +1514,6 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
TRACE
(
"detected layout is
\"
%s
\"\n
"
,
main_key_tab
[
kbd_layout
].
comment
);
TRACE
(
"detected layout is
\"
%s
\"\n
"
,
main_key_tab
[
kbd_layout
].
comment
);
}
}
static
HKL
get_locale_kbd_layout
(
void
)
{
LCID
layout
;
LANGID
langid
;
/* FIXME:
*
* layout = main_key_tab[kbd_layout].lcid;
*
* Winword uses return value of GetKeyboardLayout as a codepage
* to translate ANSI keyboard messages to unicode. But we have
* a problem with it: for instance Polish keyboard layout is
* identical to the US one, and therefore instead of the Polish
* locale id we return the US one.
*/
NtQueryDefaultLocale
(
TRUE
,
&
layout
);
/*
* Microsoft Office expects this value to be something specific
* for Japanese and Korean Windows with an IME the value is 0xe001
* We should probably check to see if an IME exists and if so then
* set this word properly.
*/
langid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
layout
));
if
(
langid
==
LANG_CHINESE
||
langid
==
LANG_JAPANESE
||
langid
==
LANG_KOREAN
)
layout
=
MAKELONG
(
layout
,
0xe001
);
/* IME */
else
layout
|=
layout
<<
16
;
return
(
HKL
)(
UINT_PTR
)
layout
;
}
/**********************************************************************
/**********************************************************************
* X11DRV_InitKeyboard
* X11DRV_InitKeyboard
...
@@ -1818,18 +1785,6 @@ void X11DRV_InitKeyboard( Display *display )
...
@@ -1818,18 +1785,6 @@ void X11DRV_InitKeyboard( Display *display )
pthread_mutex_unlock
(
&
kbd_mutex
);
pthread_mutex_unlock
(
&
kbd_mutex
);
}
}
static
BOOL
match_x11_keyboard_layout
(
HKL
hkl
)
{
const
DWORD
isIME
=
0xE0000000
;
HKL
xHkl
=
get_locale_kbd_layout
();
/* if the layout is an IME, only match the low word (LCID) */
if
(((
ULONG_PTR
)
hkl
&
isIME
)
==
isIME
)
return
(
LOWORD
(
hkl
)
==
LOWORD
(
xHkl
));
else
return
(
hkl
==
xHkl
);
}
/***********************************************************************
/***********************************************************************
* ActivateKeyboardLayout (X11DRV.@)
* ActivateKeyboardLayout (X11DRV.@)
...
@@ -1845,13 +1800,6 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
...
@@ -1845,13 +1800,6 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
return
FALSE
;
return
FALSE
;
}
}
if
(
!
match_x11_keyboard_layout
(
hkl
))
{
RtlSetLastWin32Error
(
ERROR_CALL_NOT_IMPLEMENTED
);
FIXME
(
"setting keyboard of different locales not supported
\n
"
);
return
FALSE
;
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1968,8 +1916,6 @@ UINT X11DRV_MapVirtualKeyEx( UINT wCode, UINT wMapType, HKL hkl )
...
@@ -1968,8 +1916,6 @@ UINT X11DRV_MapVirtualKeyEx( UINT wCode, UINT wMapType, HKL hkl )
Display
*
display
=
thread_init_display
();
Display
*
display
=
thread_init_display
();
TRACE
(
"wCode=0x%x, wMapType=%d, hkl %p
\n
"
,
wCode
,
wMapType
,
hkl
);
TRACE
(
"wCode=0x%x, wMapType=%d, hkl %p
\n
"
,
wCode
,
wMapType
,
hkl
);
if
(
!
match_x11_keyboard_layout
(
hkl
))
FIXME
(
"keyboard layout %p is not supported
\n
"
,
hkl
);
pthread_mutex_lock
(
&
kbd_mutex
);
pthread_mutex_lock
(
&
kbd_mutex
);
...
@@ -2338,9 +2284,6 @@ INT X11DRV_ToUnicodeEx( UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
...
@@ -2338,9 +2284,6 @@ INT X11DRV_ToUnicodeEx( UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
return
0
;
return
0
;
}
}
if
(
!
match_x11_keyboard_layout
(
hkl
))
FIXME_
(
key
)(
"keyboard layout %p is not supported
\n
"
,
hkl
);
if
((
lpKeyState
[
VK_MENU
]
&
0x80
)
&&
(
lpKeyState
[
VK_CONTROL
]
&
0x80
))
if
((
lpKeyState
[
VK_MENU
]
&
0x80
)
&&
(
lpKeyState
[
VK_CONTROL
]
&
0x80
))
{
{
TRACE_
(
key
)(
"Ctrl+Alt+[key] won't generate a character
\n
"
);
TRACE_
(
key
)(
"Ctrl+Alt+[key] won't generate a character
\n
"
);
...
...
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