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
4390b011
Commit
4390b011
authored
Apr 02, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Create the thread XFontSet on thread attach.
parent
cc8a6b13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
31 deletions
+15
-31
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-2
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-2
xim.c
dlls/winex11.drv/xim.c
+11
-27
No files found.
dlls/winex11.drv/x11drv.h
View file @
4390b011
...
@@ -820,9 +820,9 @@ extern BOOL X11DRV_DisplayDevices_SupportEventHandlers(void) DECLSPEC_HIDDEN;
...
@@ -820,9 +820,9 @@ extern BOOL X11DRV_DisplayDevices_SupportEventHandlers(void) DECLSPEC_HIDDEN;
extern
struct
x11drv_display_device_handler
desktop_handler
DECLSPEC_HIDDEN
;
extern
struct
x11drv_display_device_handler
desktop_handler
DECLSPEC_HIDDEN
;
/* XIM support */
/* XIM support */
extern
BOOL
X11DRV_InitXIM
(
const
WCHAR
*
input_style
)
DECLSPEC_HIDDEN
;
extern
BOOL
xim_init
(
const
WCHAR
*
input_style
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_CreateIC
(
XIM
xim
,
HWND
hwnd
,
struct
x11drv_win_data
*
data
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_CreateIC
(
XIM
xim
,
HWND
hwnd
,
struct
x11drv_win_data
*
data
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_SetupXIM
(
void
)
DECLSPEC_HIDDEN
;
extern
void
xim_thread_attach
(
struct
x11drv_thread_data
*
data
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
UINT
count
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
UINT
count
)
DECLSPEC_HIDDEN
;
#define XEMBED_MAPPED (1 << 0)
#define XEMBED_MAPPED (1 << 0)
...
...
dlls/winex11.drv/x11drv_main.c
View file @
4390b011
...
@@ -707,7 +707,7 @@ static NTSTATUS x11drv_init( void *arg )
...
@@ -707,7 +707,7 @@ static NTSTATUS x11drv_init( void *arg )
XkbUseExtension
(
gdi_display
,
NULL
,
NULL
);
XkbUseExtension
(
gdi_display
,
NULL
,
NULL
);
X11DRV_InitKeyboard
(
gdi_display
);
X11DRV_InitKeyboard
(
gdi_display
);
if
(
use_xim
)
use_xim
=
X11DRV_InitXIM
(
input_style
);
if
(
use_xim
)
use_xim
=
xim_init
(
input_style
);
init_user_driver
();
init_user_driver
();
X11DRV_DisplayDevices_Init
(
FALSE
);
X11DRV_DisplayDevices_Init
(
FALSE
);
...
@@ -791,7 +791,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
...
@@ -791,7 +791,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
set_queue_display_fd
(
data
->
display
);
set_queue_display_fd
(
data
->
display
);
NtUserGetThreadInfo
()
->
driver_data
=
(
UINT_PTR
)
data
;
NtUserGetThreadInfo
()
->
driver_data
=
(
UINT_PTR
)
data
;
if
(
use_xim
)
X11DRV_SetupXIM
(
);
if
(
use_xim
)
xim_thread_attach
(
data
);
return
data
;
return
data
;
}
}
...
...
dlls/winex11.drv/xim.c
View file @
4390b011
...
@@ -288,13 +288,10 @@ NTSTATUS x11drv_xim_preedit_state( void *arg )
...
@@ -288,13 +288,10 @@ NTSTATUS x11drv_xim_preedit_state( void *arg )
return
0
;
return
0
;
}
}
/***********************************************************************
/***********************************************************************
* X11DRV_InitXIM
* xim_init
*
* Process-wide XIM initialization.
*/
*/
BOOL
X11DRV_InitXIM
(
const
WCHAR
*
input_style
)
BOOL
xim_init
(
const
WCHAR
*
input_style
)
{
{
static
const
WCHAR
offthespotW
[]
=
{
'o'
,
'f'
,
'f'
,
't'
,
'h'
,
'e'
,
's'
,
'p'
,
'o'
,
't'
,
0
};
static
const
WCHAR
offthespotW
[]
=
{
'o'
,
'f'
,
'f'
,
't'
,
'h'
,
'e'
,
's'
,
'p'
,
'o'
,
't'
,
0
};
static
const
WCHAR
overthespotW
[]
=
{
'o'
,
'v'
,
'e'
,
'r'
,
't'
,
'h'
,
'e'
,
's'
,
'p'
,
'o'
,
't'
,
0
};
static
const
WCHAR
overthespotW
[]
=
{
'o'
,
'v'
,
'e'
,
'r'
,
't'
,
'h'
,
'e'
,
's'
,
'p'
,
'o'
,
't'
,
0
};
...
@@ -416,26 +413,6 @@ static BOOL open_xim( Display *display )
...
@@ -416,26 +413,6 @@ static BOOL open_xim( Display *display )
thread_data
->
xim
=
xim
;
thread_data
->
xim
=
xim
;
if
((
ximStyle
&
(
XIMPreeditNothing
|
XIMPreeditNone
))
==
0
||
(
ximStyle
&
(
XIMStatusNothing
|
XIMStatusNone
))
==
0
)
{
char
**
list
;
int
count
;
thread_data
->
font_set
=
XCreateFontSet
(
display
,
"fixed"
,
&
list
,
&
count
,
NULL
);
TRACE
(
"ximFontSet = %p
\n
"
,
thread_data
->
font_set
);
TRACE
(
"list = %p, count = %d
\n
"
,
list
,
count
);
if
(
list
!=
NULL
)
{
int
i
;
for
(
i
=
0
;
i
<
count
;
++
i
)
TRACE
(
"list[%d] = %s
\n
"
,
i
,
list
[
i
]);
XFreeStringList
(
list
);
}
}
else
thread_data
->
font_set
=
NULL
;
x11drv_client_call
(
client_ime_update_association
,
0
);
x11drv_client_call
(
client_ime_update_association
,
0
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -446,9 +423,16 @@ static void open_xim_callback( Display *display, XPointer ptr, XPointer data )
...
@@ -446,9 +423,16 @@ static void open_xim_callback( Display *display, XPointer ptr, XPointer data )
XUnregisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
XUnregisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
}
}
void
X11DRV_SetupXIM
(
void
)
void
xim_thread_attach
(
struct
x11drv_thread_data
*
data
)
{
{
Display
*
display
=
thread_display
();
Display
*
display
=
data
->
display
;
int
i
,
count
;
char
**
list
;
data
->
font_set
=
XCreateFontSet
(
display
,
"fixed"
,
&
list
,
&
count
,
NULL
);
TRACE
(
"created XFontSet %p, list %p, count %d
\n
"
,
data
->
font_set
,
list
,
count
);
for
(
i
=
0
;
list
&&
i
<
count
;
++
i
)
TRACE
(
" %d: %s
\n
"
,
i
,
list
[
i
]
);
if
(
list
)
XFreeStringList
(
list
);
if
(
!
open_xim
(
display
))
if
(
!
open_xim
(
display
))
XRegisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
NULL
);
XRegisterIMInstantiateCallback
(
display
,
NULL
,
NULL
,
NULL
,
open_xim_callback
,
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