Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
4a373083
Commit
4a373083
authored
16 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winex11: Register IME classes only when needed.
parent
64e64d65
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/winex11.drv/ime.c
+37
-31
37 additions, 31 deletions
dlls/winex11.drv/ime.c
dlls/winex11.drv/x11drv.h
+2
-2
2 additions, 2 deletions
dlls/winex11.drv/x11drv.h
dlls/winex11.drv/x11drv_main.c
+3
-2
3 additions, 2 deletions
dlls/winex11.drv/x11drv_main.c
with
42 additions
and
35 deletions
dlls/winex11.drv/ime.c
+
37
−
31
View file @
4a373083
...
...
@@ -123,6 +123,42 @@ static BOOL UnlockRealIMC(HIMC hIMC)
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
)
{
HIMCC
rc
;
...
...
@@ -520,6 +556,7 @@ BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass,
LPCWSTR
lpszOption
)
{
TRACE
(
"
\n
"
);
IME_RegisterClasses
();
lpIMEInfo
->
dwPrivateDataSize
=
sizeof
(
IMEPRIVATE
);
lpIMEInfo
->
fdwProperty
=
IME_PROP_UNICODE
|
IME_PROP_AT_CARET
;
lpIMEInfo
->
fdwConversionCaps
=
IME_CMODE_NATIVE
;
...
...
@@ -907,37 +944,6 @@ DWORD WINAPI ImeGetImeMenuItems(HIMC hIMC, DWORD dwFlags, DWORD dwType,
/* 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
)
{
LPINPUTCONTEXT
lpIMC
;
...
...
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/x11drv.h
+
2
−
2
View file @
4a373083
...
...
@@ -274,8 +274,7 @@ extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
extern
BOOL
destroy_glxpixmap
(
Display
*
display
,
XID
glxpixmap
);
/* IME support */
extern
void
IME_RegisterClasses
(
HINSTANCE
hImeInst
);
extern
void
IME_UnregisterClasses
(
HINSTANCE
hImeInst
);
extern
void
IME_UnregisterClasses
(
void
);
extern
void
IME_SetOpenStatus
(
BOOL
fOpen
);
extern
LRESULT
IME_SendMessageToSelectedHWND
(
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
INT
IME_GetCursorPos
();
...
...
@@ -555,6 +554,7 @@ extern int primary_monitor;
extern
int
copy_default_colors
;
extern
int
alloc_system_colors
;
extern
int
xrender_error_base
;
extern
HMODULE
x11drv_module
;
extern
BYTE
key_state_table
[
256
];
extern
POINT
cursor_pos
;
...
...
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/x11drv_main.c
+
3
−
2
View file @
4a373083
...
...
@@ -93,6 +93,7 @@ int copy_default_colors = 128;
int
alloc_system_colors
=
256
;
DWORD
thread_data_tls_index
=
TLS_OUT_OF_INDEXES
;
int
xrender_error_base
=
0
;
HMODULE
x11drv_module
=
0
;
static
x11drv_error_callback
err_callback
;
/* current callback for error */
static
Display
*
err_callback_display
;
/* display callback is set for */
...
...
@@ -582,6 +583,7 @@ static void process_detach(void)
/* cleanup GDI */
X11DRV_GDI_Finalize
();
IME_UnregisterClasses
();
DeleteCriticalSection
(
&
X11DRV_CritSection
);
TlsFree
(
thread_data_tls_index
);
}
...
...
@@ -674,15 +676,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
x11drv_module
=
hinst
;
ret
=
process_attach
();
IME_RegisterClasses
(
hinst
);
break
;
case
DLL_THREAD_DETACH
:
thread_detach
();
break
;
case
DLL_PROCESS_DETACH
:
process_detach
();
IME_UnregisterClasses
(
hinst
);
break
;
}
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment