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
a34669b2
Commit
a34669b2
authored
May 02, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Avoid using kernel32 functions in user driver.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a89cea4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
19 deletions
+21
-19
wintab.c
dlls/winex11.drv/wintab.c
+3
-3
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-1
xim.c
dlls/winex11.drv/xim.c
+13
-12
xrender.c
dlls/winex11.drv/xrender.c
+3
-3
No files found.
dlls/winex11.drv/wintab.c
View file @
a34669b2
...
...
@@ -736,7 +736,7 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
Button
=
(
XButtonInfoPtr
)
any
;
TRACE
(
" ButtonInput %d: [class %d|length %d|num_buttons %d]
\n
"
,
class_loop
,
(
int
)
Button
->
class
,
Button
->
length
,
Button
->
num_buttons
);
cursor
.
BTNNAMES
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
cchBuf
);
cursor
.
BTNNAMES
=
malloc
(
sizeof
(
WCHAR
)
*
cchBuf
);
for
(
i
=
0
;
i
<
cursor
.
BUTTONS
;
i
++
)
{
/* FIXME - these names are probably incorrect */
...
...
@@ -744,14 +744,14 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
while
(
cch
>
cchBuf
-
cchPos
-
1
)
/* we want one extra byte for the last NUL */
{
cchBuf
*=
2
;
cursor
.
BTNNAMES
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
cursor
.
BTNNAMES
,
sizeof
(
WCHAR
)
*
cchBuf
);
cursor
.
BTNNAMES
=
realloc
(
cursor
.
BTNNAMES
,
sizeof
(
WCHAR
)
*
cchBuf
);
}
strcpyW
(
cursor
.
BTNNAMES
+
cchPos
,
cursor
.
NAME
);
cchPos
+=
cch
;
}
cursor
.
BTNNAMES
[
cchPos
++
]
=
0
;
cursor
.
BTNNAMES
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
cursor
.
BTNNAMES
,
sizeof
(
WCHAR
)
*
cchPos
);
cursor
.
BTNNAMES
=
realloc
(
cursor
.
BTNNAMES
,
sizeof
(
WCHAR
)
*
cchPos
);
cursor
.
cchBTNNAMES
=
cchPos
;
}
break
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
a34669b2
...
...
@@ -28,6 +28,7 @@
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <assert.h>
#include <dlfcn.h>
#include <X11/cursorfont.h>
#include <X11/Xlib.h>
...
...
@@ -293,7 +294,7 @@ static int error_handler( Display *display, XErrorEvent *error_evt )
{
ERR
(
"X protocol error: serial=%ld, request_code=%d - breaking into debugger
\n
"
,
error_evt
->
serial
,
error_evt
->
request_code
);
DebugBreak
();
/* force an entry in the debugger */
assert
(
0
);
}
old_error_handler
(
display
,
error_evt
);
return
0
;
...
...
dlls/winex11.drv/xim.c
View file @
a34669b2
...
...
@@ -72,13 +72,7 @@ static void X11DRV_ImmSetInternalString(DWORD dwOffset,
if
(
byte_expansion
+
dwCompStringLength
>=
dwCompStringSize
)
{
if
(
CompositionString
)
ptr_new
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
CompositionString
,
dwCompStringSize
+
byte_expansion
);
else
ptr_new
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwCompStringSize
+
byte_expansion
);
ptr_new
=
realloc
(
CompositionString
,
dwCompStringSize
+
byte_expansion
);
if
(
ptr_new
==
NULL
)
{
ERR
(
"Couldn't expand composition string buffer
\n
"
);
...
...
@@ -150,7 +144,7 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
TRACE
(
"PreeditDoneCallback %p
\n
"
,
ic
);
ximInComposeMode
=
FALSE
;
if
(
dwCompStringSize
)
HeapFree
(
GetProcessHeap
(),
0
,
CompositionString
);
free
(
CompositionString
);
dwCompStringSize
=
0
;
dwCompStringLength
=
0
;
CompositionString
=
NULL
;
...
...
@@ -464,17 +458,24 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data)
XIC
xic
;
XICCallback
destroy
=
{(
XPointer
)
data
,
X11DRV_DestroyIC
};
XICCallback
P_StateNotifyCB
,
P_StartCB
,
P_DoneCB
,
P_DrawCB
,
P_CaretCB
;
L
ANGID
langid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
GetThreadLocale
()))
;
L
CID
lcid
;
Window
win
=
data
->
whole_window
;
XFontSet
fontSet
=
x11drv_thread_data
()
->
font_set
;
TRACE
(
"xim = %p
\n
"
,
xim
);
lcid
=
NtCurrentTeb
()
->
CurrentLocale
;
if
(
!
lcid
)
NtQueryDefaultLocale
(
TRUE
,
&
lcid
);
/* use complex and slow XIC initialization method only for CJK */
if
(
langid
!=
LANG_CHINESE
&&
langid
!=
LANG_JAPANESE
&&
langid
!=
LANG_KOREAN
)
switch
(
PRIMARYLANGID
(
LANGIDFROMLCID
(
lcid
)))
{
case
LANG_CHINESE
:
case
LANG_JAPANESE
:
case
LANG_KOREAN
:
break
;
default:
xic
=
XCreateIC
(
xim
,
XNInputStyle
,
XIMPreeditNothing
|
XIMStatusNothing
,
XNClientWindow
,
win
,
...
...
dlls/winex11.drv/xrender.c
View file @
a34669b2
...
...
@@ -774,7 +774,7 @@ static AA_Type aa_type_from_flags( UINT aa_flags )
static
UINT
get_xft_aa_flags
(
const
LOGFONTW
*
lf
)
{
char
*
value
;
char
*
value
,
*
p
;
UINT
ret
=
0
;
switch
(
lf
->
lfQuality
)
...
...
@@ -785,8 +785,8 @@ static UINT get_xft_aa_flags( const LOGFONTW *lf )
default:
if
(
!
(
value
=
XGetDefault
(
gdi_display
,
"Xft"
,
"antialias"
)))
break
;
TRACE
(
"got antialias '%s'
\n
"
,
value
);
if
(
tolower
(
value
[
0
])
==
'f'
||
tolower
(
value
[
0
])
==
'n'
||
value
[
0
]
==
'0'
||
!
_strnicmp
(
value
,
"off"
,
-
1
))
for
(
p
=
value
;
*
p
;
p
++
)
if
(
'A'
<=
*
p
&&
*
p
<=
'Z'
)
*
p
+=
'a'
-
'A'
;
/* to lower */
if
(
value
[
0
]
==
'f'
||
value
[
0
]
==
'n'
||
value
[
0
]
==
'0'
||
!
strcmp
(
value
,
"off"
))
{
ret
=
GGO_BITMAP
;
break
;
...
...
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