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
5c2526a0
Commit
5c2526a0
authored
Nov 16, 2017
by
Rafał Harabień
Committed by
Alexandre Julliard
Nov 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Preserve last error in x11drv_thread_data().
Signed-off-by:
Rafał Harabień
<
rafalh1992@o2.pl
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d03ba76
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
2 deletions
+24
-2
dialog.c
dlls/user32/dialog.c
+1
-0
menu.c
dlls/user32/menu.c
+1
-0
input.c
dlls/user32/tests/input.c
+10
-1
win.c
dlls/user32/tests/win.c
+8
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+4
-1
No files found.
dlls/user32/dialog.c
View file @
5c2526a0
...
...
@@ -283,6 +283,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
WARN
(
"control %s %s creation failed
\n
"
,
debugstr_w
(
info
.
className
),
debugstr_w
(
info
.
windowName
));
if
(
dlgTemplate
->
style
&
DS_NOFAILCREATE
)
continue
;
SetLastError
(
0
);
return
FALSE
;
}
...
...
dlls/user32/menu.c
View file @
5c2526a0
...
...
@@ -3518,6 +3518,7 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y,
SendMessageW
(
hWnd
,
WM_UNINITMENUPOPUP
,
(
WPARAM
)
hMenu
,
MAKELPARAM
(
0
,
IS_SYSTEM_MENU
(
menu
))
);
}
SetLastError
(
0
);
}
return
ret
;
...
...
dlls/user32/tests/input.c
View file @
5c2526a0
...
...
@@ -1928,8 +1928,17 @@ static void test_Input_mouse(void)
DWORD
thread_id
;
POINT
pt
,
pt_org
;
MSG
msg
;
BOOL
ret
;
GetCursorPos
(
&
pt_org
);
SetLastError
(
0xdeadbeef
);
ret
=
GetCursorPos
(
NULL
);
ok
(
!
ret
,
"GetCursorPos succeed
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
||
GetLastError
()
==
ERROR_NOACCESS
,
"error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
GetCursorPos
(
&
pt_org
);
ok
(
ret
,
"GetCursorPos failed
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"error %u
\n
"
,
GetLastError
());
button_win
=
CreateWindowA
(
"button"
,
"button"
,
WS_VISIBLE
|
WS_POPUP
,
100
,
100
,
100
,
100
,
0
,
NULL
,
NULL
,
NULL
);
...
...
dlls/user32/tests/win.c
View file @
5c2526a0
...
...
@@ -6261,6 +6261,14 @@ static void test_CreateWindow(void)
ok
(
rc
.
bottom
<=
expected_cy
,
"invalid rect bottom %u
\n
"
,
rc
.
bottom
);
DestroyWindow
(
hwnd
);
/* invalid class */
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowExA
(
0
,
"INVALID_CLASS"
,
NULL
,
WS_CHILD
,
10
,
10
,
100
,
100
,
parent
,
0
,
0
,
NULL
);
ok
(
hwnd
==
0
,
"CreateWindowEx succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_CLASS_DOES_NOT_EXIST
||
GetLastError
()
==
ERROR_CANNOT_FIND_WND_CLASS
,
"invalid error %u
\n
"
,
GetLastError
());
DestroyWindow
(
hwnd
);
if
(
pGetLayout
&&
pSetLayout
)
{
HDC
hdc
=
GetDC
(
parent
);
...
...
dlls/winex11.drv/x11drv.h
View file @
5c2526a0
...
...
@@ -345,7 +345,10 @@ extern DWORD thread_data_tls_index DECLSPEC_HIDDEN;
static
inline
struct
x11drv_thread_data
*
x11drv_thread_data
(
void
)
{
return
TlsGetValue
(
thread_data_tls_index
);
DWORD
err
=
GetLastError
();
/* TlsGetValue always resets last error */
struct
x11drv_thread_data
*
data
=
TlsGetValue
(
thread_data_tls_index
);
SetLastError
(
err
);
return
data
;
}
/* retrieve the thread display, or NULL if not created yet */
...
...
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