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
e70b1b72
Commit
e70b1b72
authored
May 05, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use ime_comp_buf != NULL instead of ximInComposeMode.
parent
2d4742aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
event.c
dlls/winex11.drv/event.c
+1
-3
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
xim.c
dlls/winex11.drv/xim.c
+8
-4
No files found.
dlls/winex11.drv/event.c
View file @
e70b1b72
...
...
@@ -49,8 +49,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
event
);
WINE_DECLARE_DEBUG_CHANNEL
(
xdnd
);
extern
BOOL
ximInComposeMode
;
#define DndNotDnd -1
/* OffiX drag&drop */
#define DndUnknown 0
#define DndRawData 1
...
...
@@ -810,7 +808,7 @@ static void focus_out( Display *display , HWND hwnd )
int
revert
;
XIC
xic
;
if
(
xim
InComposeMode
)
return
;
if
(
xim
_in_compose_mode
()
)
return
;
x11drv_thread_data
()
->
last_focus
=
hwnd
;
if
((
xic
=
X11DRV_get_ic
(
hwnd
)))
XUnsetICFocus
(
xic
);
...
...
dlls/winex11.drv/x11drv.h
View file @
e70b1b72
...
...
@@ -436,7 +436,6 @@ extern BOOL keyboard_grabbed DECLSPEC_HIDDEN;
extern
unsigned
int
screen_bpp
DECLSPEC_HIDDEN
;
extern
BOOL
usexrandr
DECLSPEC_HIDDEN
;
extern
BOOL
usexvidmode
DECLSPEC_HIDDEN
;
extern
BOOL
ximInComposeMode
DECLSPEC_HIDDEN
;
extern
BOOL
use_take_focus
DECLSPEC_HIDDEN
;
extern
BOOL
use_primary_selection
DECLSPEC_HIDDEN
;
extern
BOOL
use_system_cursors
DECLSPEC_HIDDEN
;
...
...
@@ -824,6 +823,7 @@ extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
/* XIM support */
extern
BOOL
xim_init
(
const
WCHAR
*
input_style
)
DECLSPEC_HIDDEN
;
extern
void
xim_thread_attach
(
struct
x11drv_thread_data
*
data
)
DECLSPEC_HIDDEN
;
extern
BOOL
xim_in_compose_mode
(
void
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
UINT
count
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_get_ic
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/xim.c
View file @
e70b1b72
...
...
@@ -42,8 +42,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xim);
#define XICProc XIMProc
#endif
BOOL
ximInComposeMode
=
FALSE
;
static
WCHAR
*
ime_comp_buf
;
static
XIMStyle
input_style
=
0
;
...
...
@@ -69,6 +67,11 @@ static const char *debugstr_xim_style( XIMStyle style )
return
wine_dbg_sprintf
(
"%s"
,
buffer
);
}
BOOL
xim_in_compose_mode
(
void
)
{
return
!!
ime_comp_buf
;
}
static
void
xim_update_comp_string
(
UINT
offset
,
UINT
old_len
,
const
WCHAR
*
text
,
UINT
new_len
)
{
UINT
len
=
ime_comp_buf
?
wcslen
(
ime_comp_buf
)
:
0
;
...
...
@@ -138,7 +141,9 @@ static int xic_preedit_start( XIC xic, XPointer user, XPointer arg )
TRACE
(
"xic %p, hwnd %p, arg %p
\n
"
,
xic
,
hwnd
,
arg
);
x11drv_client_call
(
client_ime_set_composition_status
,
TRUE
);
ximInComposeMode
=
TRUE
;
if
((
ime_comp_buf
=
realloc
(
ime_comp_buf
,
sizeof
(
WCHAR
)
)))
*
ime_comp_buf
=
0
;
else
ERR
(
"Failed to allocate preedit buffer
\n
"
);
return
-
1
;
}
...
...
@@ -148,7 +153,6 @@ static int xic_preedit_done( XIC xic, XPointer user, XPointer arg )
TRACE
(
"xic %p, hwnd %p, arg %p
\n
"
,
xic
,
hwnd
,
arg
);
ximInComposeMode
=
FALSE
;
free
(
ime_comp_buf
);
ime_comp_buf
=
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