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
5c30e9ae
Commit
5c30e9ae
authored
Apr 10, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Separate the XIM process-wide setup from the IME creation.
parent
bd324db0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
21 deletions
+35
-21
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+4
-3
xim.c
dlls/winex11.drv/xim.c
+29
-17
No files found.
dlls/winex11.drv/x11drv.h
View file @
5c30e9ae
...
...
@@ -274,8 +274,9 @@ extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
extern
BOOL
destroy_glxpixmap
(
Display
*
display
,
XID
glxpixmap
);
/* XIM support */
extern
BOOL
X11DRV_InitXIM
(
const
char
*
input_style
);
extern
XIC
X11DRV_CreateIC
(
XIM
xim
,
Display
*
display
,
Window
win
);
extern
XIM
X11DRV_SetupXIM
(
Display
*
display
,
const
char
*
input_style
);
extern
XIM
X11DRV_SetupXIM
(
Display
*
display
);
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
DWORD
count
);
extern
void
X11DRV_ForceXIMReset
(
HWND
hwnd
);
...
...
dlls/winex11.drv/x11drv_main.c
View file @
5c30e9ae
...
...
@@ -538,6 +538,7 @@ static BOOL process_attach(void)
X11DRV_InitKeyboard
(
gdi_display
);
X11DRV_InitClipboard
();
if
(
use_xim
)
use_xim
=
X11DRV_InitXIM
(
input_style
);
return
TRUE
;
}
...
...
@@ -649,12 +650,12 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if
(
TRACE_ON
(
synchronous
))
XSynchronize
(
data
->
display
,
True
);
wine_tsx11_unlock
();
if
(
use_xim
&&
!
(
data
->
xim
=
X11DRV_SetupXIM
(
data
->
display
,
input_style
)))
WARN
(
"Input Method is not available
\n
"
);
set_queue_display_fd
(
data
->
display
);
TlsSetValue
(
thread_data_tls_index
,
data
);
if
(
use_xim
)
data
->
xim
=
X11DRV_SetupXIM
(
data
->
display
);
X11DRV_SetCursor
(
NULL
);
return
data
;
}
...
...
dlls/winex11.drv/xim.c
View file @
5c30e9ae
...
...
@@ -37,9 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
BOOL
ximInComposeMode
=
FALSE
;
static
XIMStyle
ximStyle
=
0
;
static
XIMStyle
ximStyleRoot
=
0
;
/* moved here from imm32 for dll separation */
static
DWORD
dwCompStringLength
=
0
;
static
LPBYTE
CompositionString
=
NULL
;
...
...
@@ -56,6 +53,10 @@ static DWORD dwPreeditPos = 0;
/* inorder to enable deadkey support */
#define STYLE_NONE (XIMPreeditNothing | XIMStatusNothing)
static
XIMStyle
ximStyle
=
0
;
static
XIMStyle
ximStyleRoot
=
0
;
static
XIMStyle
ximStyleRequest
=
STYLE_CALLBACK
;
static
BOOL
X11DRV_ImmSetInternalString
(
DWORD
dwIndex
,
DWORD
dwOffset
,
DWORD
selLength
,
LPWSTR
lpComp
,
DWORD
dwCompLen
)
{
...
...
@@ -327,16 +328,13 @@ void X11DRV_ForceXIMReset(HWND hwnd)
}
/***********************************************************************
* X11DRV Ime creation
*/
XIM
X11DRV_SetupXIM
(
Display
*
display
,
const
char
*
input_style
)
* X11DRV_InitXIM
*
* Process-wide XIM initialization.
*/
BOOL
X11DRV_InitXIM
(
const
char
*
input_style
)
{
XIMStyle
ximStyleRequest
,
ximStyleCallback
,
ximStyleNone
;
XIMStyles
*
ximStyles
=
NULL
;
INT
i
;
XIM
xim
;
ximStyleRequest
=
STYLE_CALLBACK
;
BOOL
ret
;
if
(
!
strcasecmp
(
input_style
,
"offthespot"
))
ximStyleRequest
=
STYLE_OFFTHESPOT
;
...
...
@@ -346,17 +344,31 @@ XIM X11DRV_SetupXIM(Display *display, const char *input_style)
ximStyleRequest
=
STYLE_ROOT
;
wine_tsx11_lock
();
if
(
!
XSupportsLocale
())
if
(
!
(
ret
=
XSupportsLocale
()))
{
WARN
(
"X does not support locale.
\n
"
);
goto
err
;
}
if
(
XSetLocaleModifiers
(
""
)
==
NULL
)
else
if
(
XSetLocaleModifiers
(
""
)
==
NULL
)
{
WARN
(
"Could not set locale modifiers.
\n
"
);
goto
err
;
ret
=
FALSE
;
}
wine_tsx11_unlock
();
return
ret
;
}
/***********************************************************************
* X11DRV Ime creation
*/
XIM
X11DRV_SetupXIM
(
Display
*
display
)
{
XIMStyle
ximStyleCallback
,
ximStyleNone
;
XIMStyles
*
ximStyles
=
NULL
;
INT
i
;
XIM
xim
;
wine_tsx11_lock
();
xim
=
XOpenIM
(
display
,
NULL
,
NULL
,
NULL
);
if
(
xim
==
NULL
)
...
...
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