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
5b7bec34
Commit
5b7bec34
authored
Jun 21, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Only register an XIM callback if we can't open the XIM right away.
parent
bc0acd1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
xim.c
dlls/winex11.drv/xim.c
+15
-7
No files found.
dlls/winex11.drv/xim.c
View file @
5b7bec34
...
...
@@ -359,7 +359,7 @@ BOOL X11DRV_InitXIM( const char *input_style )
}
static
void
X11DRV_OpenIM
(
Display
*
display
,
XPointer
p
,
XPointer
data
);
static
void
open_xim_callback
(
Display
*
display
,
XPointer
ptr
,
XPointer
data
);
static
void
X11DRV_DestroyIM
(
XIM
xim
,
XPointer
p
,
XPointer
data
)
{
...
...
@@ -369,7 +369,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
thread_data
->
xim
=
NULL
;
ximStyle
=
0
;
wine_tsx11_lock
();
XRegisterIMInstantiateCallback
(
thread_data
->
display
,
NULL
,
NULL
,
NULL
,
X11DRV_OpenIM
,
NULL
);
XRegisterIMInstantiateCallback
(
thread_data
->
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
wine_tsx11_unlock
();
}
...
...
@@ -378,7 +378,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
*
* Should always be called with the x11 lock held
*/
static
void
X11DRV_OpenIM
(
Display
*
display
,
XPointer
ptr
,
XPointer
data
)
static
BOOL
open_xim
(
Display
*
display
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
XIMStyle
ximStyleCallback
,
ximStyleNone
;
...
...
@@ -391,7 +391,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
if
(
xim
==
NULL
)
{
WARN
(
"Could not open input method.
\n
"
);
return
;
return
FALSE
;
}
destroy
.
client_data
=
NULL
;
...
...
@@ -410,7 +410,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
{
WARN
(
"Could not find supported input style.
\n
"
);
XCloseIM
(
xim
);
return
;
return
FALSE
;
}
else
{
...
...
@@ -471,18 +471,26 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
}
thread_data
->
xim
=
xim
;
XUnregisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
X11DRV_OpenIM
,
NULL
);
wine_tsx11_unlock
();
IME_UpdateAssociation
(
NULL
);
wine_tsx11_lock
();
return
TRUE
;
}
static
void
open_xim_callback
(
Display
*
display
,
XPointer
ptr
,
XPointer
data
)
{
if
(
open_xim
(
display
))
XUnregisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
}
void
X11DRV_SetupXIM
(
void
)
{
Display
*
display
=
thread_display
();
wine_tsx11_lock
();
XRegisterIMInstantiateCallback
(
thread_display
(),
NULL
,
NULL
,
NULL
,
X11DRV_OpenIM
,
NULL
);
if
(
!
open_xim
(
display
))
XRegisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
wine_tsx11_unlock
();
}
...
...
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