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
1579ab0e
Commit
1579ab0e
authored
Nov 07, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Set last error to ERROR_BUSY when attempting to delete a…
winex11.drv: Set last error to ERROR_BUSY when attempting to delete a cross-thread context in wglDeleteContext.
parent
c4a8de92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
opengl.c
dlls/opengl32/tests/opengl.c
+4
-0
opengl.c
dlls/winex11.drv/opengl.c
+1
-0
No files found.
dlls/opengl32/tests/opengl.c
View file @
1579ab0e
...
...
@@ -590,13 +590,16 @@ struct wgl_thread_param
HANDLE
test_finished
;
HGLRC
hglrc
;
BOOL
hglrc_deleted
;
DWORD
last_error
;
};
static
DWORD
WINAPI
wgl_thread
(
void
*
param
)
{
struct
wgl_thread_param
*
p
=
param
;
SetLastError
(
0xdeadbeef
);
p
->
hglrc_deleted
=
wglDeleteContext
(
p
->
hglrc
);
p
->
last_error
=
GetLastError
();
SetEvent
(
p
->
test_finished
);
return
0
;
...
...
@@ -638,6 +641,7 @@ static void test_deletecontext(HDC hdc)
{
WaitForSingleObject
(
thread_handle
,
INFINITE
);
ok
(
thread_params
.
hglrc_deleted
==
FALSE
,
"Attempt to delete WGL context from another thread passed but should fail!
\n
"
);
ok
(
thread_params
.
last_error
==
ERROR_BUSY
,
"Expected last error to be ERROR_BUSY, got %u
\n
"
,
thread_params
.
last_error
);
}
CloseHandle
(
thread_params
.
test_finished
);
...
...
dlls/winex11.drv/opengl.c
View file @
1579ab0e
...
...
@@ -1793,6 +1793,7 @@ BOOL CDECL X11DRV_wglDeleteContext(HGLRC hglrc)
if
(
ctx
->
tid
!=
0
&&
ctx
->
tid
!=
GetCurrentThreadId
())
{
TRACE
(
"Cannot delete context=%p because it is current in another thread.
\n
"
,
ctx
);
SetLastError
(
ERROR_BUSY
);
return
FALSE
;
}
...
...
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