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
Releases
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
Sebastian Mayr
wine
Commits
d1dd56ff
Commit
d1dd56ff
authored
16 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winex11: Only register an XIM callback if we can't open the XIM right away.
(cherry picked from commit
5b7bec34
)
parent
d99ad3ca
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winex11.drv/xim.c
+15
-7
15 additions, 7 deletions
dlls/winex11.drv/xim.c
with
15 additions
and
7 deletions
dlls/winex11.drv/xim.c
+
15
−
7
View file @
d1dd56ff
...
...
@@ -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
p
tr
,
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
();
}
...
...
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