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
4a373083
Commit
4a373083
authored
May 01, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Register IME classes only when needed.
parent
64e64d65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
35 deletions
+42
-35
ime.c
dlls/winex11.drv/ime.c
+37
-31
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-2
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-2
No files found.
dlls/winex11.drv/ime.c
View file @
4a373083
...
@@ -123,6 +123,42 @@ static BOOL UnlockRealIMC(HIMC hIMC)
...
@@ -123,6 +123,42 @@ static BOOL UnlockRealIMC(HIMC hIMC)
return
FALSE
;
return
FALSE
;
}
}
static
void
IME_RegisterClasses
(
void
)
{
static
int
done
;
WNDCLASSW
wndClass
;
if
(
done
)
return
;
done
=
1
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASSW
));
wndClass
.
style
=
CS_GLOBALCLASS
|
CS_IME
|
CS_HREDRAW
|
CS_VREDRAW
;
wndClass
.
lpfnWndProc
=
IME_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
2
*
sizeof
(
LONG
);
wndClass
.
hInstance
=
x11drv_module
;
wndClass
.
hCursor
=
LoadCursorW
(
NULL
,
(
LPWSTR
)
IDC_ARROW
);
wndClass
.
hIcon
=
LoadIconW
(
NULL
,
(
LPWSTR
)
IDI_APPLICATION
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wndClass
.
lpszMenuName
=
0
;
wndClass
.
lpszClassName
=
UI_CLASS_NAME
;
RegisterClassW
(
&
wndClass
);
WM_MSIME_SERVICE
=
RegisterWindowMessageA
(
"MSIMEService"
);
WM_MSIME_RECONVERTOPTIONS
=
RegisterWindowMessageA
(
"MSIMEReconvertOptions"
);
WM_MSIME_MOUSE
=
RegisterWindowMessageA
(
"MSIMEMouseOperation"
);
WM_MSIME_RECONVERTREQUEST
=
RegisterWindowMessageA
(
"MSIMEReconvertRequest"
);
WM_MSIME_RECONVERT
=
RegisterWindowMessageA
(
"MSIMEReconvert"
);
WM_MSIME_QUERYPOSITION
=
RegisterWindowMessageA
(
"MSIMEQueryPosition"
);
WM_MSIME_DOCUMENTFEED
=
RegisterWindowMessageA
(
"MSIMEDocumentFeed"
);
}
void
IME_UnregisterClasses
(
void
)
{
UnregisterClassW
(
UI_CLASS_NAME
,
x11drv_module
);
}
static
HIMCC
ImeCreateBlankCompStr
(
void
)
static
HIMCC
ImeCreateBlankCompStr
(
void
)
{
{
HIMCC
rc
;
HIMCC
rc
;
...
@@ -520,6 +556,7 @@ BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass,
...
@@ -520,6 +556,7 @@ BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass,
LPCWSTR
lpszOption
)
LPCWSTR
lpszOption
)
{
{
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
IME_RegisterClasses
();
lpIMEInfo
->
dwPrivateDataSize
=
sizeof
(
IMEPRIVATE
);
lpIMEInfo
->
dwPrivateDataSize
=
sizeof
(
IMEPRIVATE
);
lpIMEInfo
->
fdwProperty
=
IME_PROP_UNICODE
|
IME_PROP_AT_CARET
;
lpIMEInfo
->
fdwProperty
=
IME_PROP_UNICODE
|
IME_PROP_AT_CARET
;
lpIMEInfo
->
fdwConversionCaps
=
IME_CMODE_NATIVE
;
lpIMEInfo
->
fdwConversionCaps
=
IME_CMODE_NATIVE
;
...
@@ -907,37 +944,6 @@ DWORD WINAPI ImeGetImeMenuItems(HIMC hIMC, DWORD dwFlags, DWORD dwType,
...
@@ -907,37 +944,6 @@ DWORD WINAPI ImeGetImeMenuItems(HIMC hIMC, DWORD dwFlags, DWORD dwType,
/* Interfaces to XIM and other parts of winex11drv */
/* Interfaces to XIM and other parts of winex11drv */
void
IME_RegisterClasses
(
HINSTANCE
hImeInst
)
{
WNDCLASSW
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASSW
));
wndClass
.
style
=
CS_GLOBALCLASS
|
CS_IME
|
CS_HREDRAW
|
CS_VREDRAW
;
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
IME_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
2
*
sizeof
(
LONG
);
wndClass
.
hInstance
=
hImeInst
;
wndClass
.
hCursor
=
LoadCursorW
(
NULL
,
(
LPWSTR
)
IDC_ARROW
);
wndClass
.
hIcon
=
LoadIconW
(
NULL
,
(
LPWSTR
)
IDI_APPLICATION
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wndClass
.
lpszMenuName
=
0
;
wndClass
.
lpszClassName
=
UI_CLASS_NAME
;
RegisterClassW
(
&
wndClass
);
WM_MSIME_SERVICE
=
RegisterWindowMessageA
(
"MSIMEService"
);
WM_MSIME_RECONVERTOPTIONS
=
RegisterWindowMessageA
(
"MSIMEReconvertOptions"
);
WM_MSIME_MOUSE
=
RegisterWindowMessageA
(
"MSIMEMouseOperation"
);
WM_MSIME_RECONVERTREQUEST
=
RegisterWindowMessageA
(
"MSIMEReconvertRequest"
);
WM_MSIME_RECONVERT
=
RegisterWindowMessageA
(
"MSIMEReconvert"
);
WM_MSIME_QUERYPOSITION
=
RegisterWindowMessageA
(
"MSIMEQueryPosition"
);
WM_MSIME_DOCUMENTFEED
=
RegisterWindowMessageA
(
"MSIMEDocumentFeed"
);
}
void
IME_UnregisterClasses
(
HINSTANCE
hImeInst
)
{
UnregisterClassW
(
UI_CLASS_NAME
,
hImeInst
);
}
void
IME_SetOpenStatus
(
BOOL
fOpen
)
void
IME_SetOpenStatus
(
BOOL
fOpen
)
{
{
LPINPUTCONTEXT
lpIMC
;
LPINPUTCONTEXT
lpIMC
;
...
...
dlls/winex11.drv/x11drv.h
View file @
4a373083
...
@@ -274,8 +274,7 @@ extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
...
@@ -274,8 +274,7 @@ extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
extern
BOOL
destroy_glxpixmap
(
Display
*
display
,
XID
glxpixmap
);
extern
BOOL
destroy_glxpixmap
(
Display
*
display
,
XID
glxpixmap
);
/* IME support */
/* IME support */
extern
void
IME_RegisterClasses
(
HINSTANCE
hImeInst
);
extern
void
IME_UnregisterClasses
(
void
);
extern
void
IME_UnregisterClasses
(
HINSTANCE
hImeInst
);
extern
void
IME_SetOpenStatus
(
BOOL
fOpen
);
extern
void
IME_SetOpenStatus
(
BOOL
fOpen
);
extern
LRESULT
IME_SendMessageToSelectedHWND
(
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
LRESULT
IME_SendMessageToSelectedHWND
(
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
INT
IME_GetCursorPos
();
extern
INT
IME_GetCursorPos
();
...
@@ -555,6 +554,7 @@ extern int primary_monitor;
...
@@ -555,6 +554,7 @@ extern int primary_monitor;
extern
int
copy_default_colors
;
extern
int
copy_default_colors
;
extern
int
alloc_system_colors
;
extern
int
alloc_system_colors
;
extern
int
xrender_error_base
;
extern
int
xrender_error_base
;
extern
HMODULE
x11drv_module
;
extern
BYTE
key_state_table
[
256
];
extern
BYTE
key_state_table
[
256
];
extern
POINT
cursor_pos
;
extern
POINT
cursor_pos
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
4a373083
...
@@ -93,6 +93,7 @@ int copy_default_colors = 128;
...
@@ -93,6 +93,7 @@ int copy_default_colors = 128;
int
alloc_system_colors
=
256
;
int
alloc_system_colors
=
256
;
DWORD
thread_data_tls_index
=
TLS_OUT_OF_INDEXES
;
DWORD
thread_data_tls_index
=
TLS_OUT_OF_INDEXES
;
int
xrender_error_base
=
0
;
int
xrender_error_base
=
0
;
HMODULE
x11drv_module
=
0
;
static
x11drv_error_callback
err_callback
;
/* current callback for error */
static
x11drv_error_callback
err_callback
;
/* current callback for error */
static
Display
*
err_callback_display
;
/* display callback is set for */
static
Display
*
err_callback_display
;
/* display callback is set for */
...
@@ -582,6 +583,7 @@ static void process_detach(void)
...
@@ -582,6 +583,7 @@ static void process_detach(void)
/* cleanup GDI */
/* cleanup GDI */
X11DRV_GDI_Finalize
();
X11DRV_GDI_Finalize
();
IME_UnregisterClasses
();
DeleteCriticalSection
(
&
X11DRV_CritSection
);
DeleteCriticalSection
(
&
X11DRV_CritSection
);
TlsFree
(
thread_data_tls_index
);
TlsFree
(
thread_data_tls_index
);
}
}
...
@@ -674,15 +676,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
...
@@ -674,15 +676,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
switch
(
reason
)
switch
(
reason
)
{
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
x11drv_module
=
hinst
;
ret
=
process_attach
();
ret
=
process_attach
();
IME_RegisterClasses
(
hinst
);
break
;
break
;
case
DLL_THREAD_DETACH
:
case
DLL_THREAD_DETACH
:
thread_detach
();
thread_detach
();
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
process_detach
();
process_detach
();
IME_UnregisterClasses
(
hinst
);
break
;
break
;
}
}
return
ret
;
return
ret
;
...
...
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