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
2be535a2
Commit
2be535a2
authored
Apr 02, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Set x11drv_win_data XIC out of X11DRV_CreateIC.
parent
d84f8dcc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
29 deletions
+18
-29
window.c
dlls/winex11.drv/window.c
+0
-22
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-2
xim.c
dlls/winex11.drv/xim.c
+17
-5
No files found.
dlls/winex11.drv/window.c
View file @
2be535a2
...
...
@@ -2312,28 +2312,6 @@ Window X11DRV_get_whole_window( HWND hwnd )
/***********************************************************************
* X11DRV_get_ic
*
* Return the X input context associated with a window
*/
XIC
X11DRV_get_ic
(
HWND
hwnd
)
{
struct
x11drv_win_data
*
data
=
get_win_data
(
hwnd
);
XIM
xim
;
XIC
ret
=
0
;
if
(
data
)
{
x11drv_thread_data
()
->
last_xic_hwnd
=
hwnd
;
ret
=
data
->
xic
;
if
(
!
ret
&&
(
xim
=
x11drv_thread_data
()
->
xim
))
ret
=
X11DRV_CreateIC
(
xim
,
hwnd
,
data
);
release_win_data
(
data
);
}
return
ret
;
}
/***********************************************************************
* X11DRV_GetDC (X11DRV.@)
*/
void
X11DRV_GetDC
(
HDC
hdc
,
HWND
hwnd
,
HWND
top
,
const
RECT
*
win_rect
,
...
...
dlls/winex11.drv/x11drv.h
View file @
2be535a2
...
...
@@ -641,7 +641,6 @@ struct x11drv_win_data
extern
struct
x11drv_win_data
*
get_win_data
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
release_win_data
(
struct
x11drv_win_data
*
data
)
DECLSPEC_HIDDEN
;
extern
Window
X11DRV_get_whole_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_get_ic
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
Window
get_dummy_parent
(
void
)
DECLSPEC_HIDDEN
;
extern
void
sync_gl_drawable
(
HWND
hwnd
,
BOOL
known_child
)
DECLSPEC_HIDDEN
;
...
...
@@ -820,9 +819,9 @@ extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
/* XIM support */
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
void
xim_thread_attach
(
struct
x11drv_thread_data
*
data
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
UINT
count
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_get_ic
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
#define XEMBED_MAPPED (1 << 0)
...
...
dlls/winex11.drv/xim.c
View file @
2be535a2
...
...
@@ -448,7 +448,7 @@ static BOOL xic_destroy( XIC xic, XPointer user, XPointer arg )
return
TRUE
;
}
XIC
X11DRV_CreateIC
(
XIM
xim
,
HWND
hwnd
,
struct
x11drv_win_data
*
data
)
static
XIC
xic_create
(
XIM
xim
,
HWND
hwnd
,
Window
win
)
{
XICCallback
destroy
=
{.
callback
=
xic_destroy
,
.
client_data
=
(
XPointer
)
hwnd
};
XICCallback
preedit_caret
=
{.
callback
=
xic_preedit_caret
,
.
client_data
=
(
XPointer
)
hwnd
};
...
...
@@ -462,10 +462,9 @@ XIC X11DRV_CreateIC( XIM xim, HWND hwnd, struct x11drv_win_data *data )
XPoint
spot
=
{
0
};
XVaNestedList
preedit
,
status
;
XIC
xic
;
Window
win
=
data
->
whole_window
;
XFontSet
fontSet
=
x11drv_thread_data
()
->
font_set
;
TRACE
(
"xim %p, hwnd %p
, data %p
\n
"
,
xim
,
hwnd
,
data
);
TRACE
(
"xim %p, hwnd %p
/%lx
\n
"
,
xim
,
hwnd
,
win
);
preedit
=
XVaCreateNestedList
(
0
,
XNFontSet
,
fontSet
,
XNPreeditCaretCallback
,
&
preedit_caret
,
...
...
@@ -483,10 +482,23 @@ XIC X11DRV_CreateIC( XIM xim, HWND hwnd, struct x11drv_win_data *data )
XNClientWindow
,
win
,
XNFocusWindow
,
win
,
XNDestroyCallback
,
&
destroy
,
NULL
);
TRACE
(
"created XIC %p
\n
"
,
xic
);
data
->
xic
=
xic
;
XFree
(
preedit
);
XFree
(
status
);
return
xic
;
}
XIC
X11DRV_get_ic
(
HWND
hwnd
)
{
struct
x11drv_win_data
*
data
;
XIM
xim
;
XIC
ret
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
0
;
x11drv_thread_data
()
->
last_xic_hwnd
=
hwnd
;
if
(
!
(
ret
=
data
->
xic
)
&&
(
xim
=
x11drv_thread_data
()
->
xim
))
ret
=
data
->
xic
=
xic_create
(
xim
,
hwnd
,
data
->
whole_window
);
release_win_data
(
data
);
return
ret
;
}
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