Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c4a8de92
Commit
c4a8de92
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: Ensure that the WGL context is removed from the context list in wglDeleteContext.
parent
4d86e491
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
opengl.c
dlls/gdi32/opengl.c
+8
-1
opengl.c
dlls/opengl32/tests/opengl.c
+11
-0
opengl.c
dlls/winex11.drv/opengl.c
+1
-0
No files found.
dlls/gdi32/opengl.c
View file @
c4a8de92
...
...
@@ -135,11 +135,18 @@ BOOL WINAPI wglDeleteContext(HGLRC hglrc)
TRACE
(
"hglrc: (%p)
\n
"
,
hglrc
);
if
(
ctx
==
NULL
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
/* Retrieve the HDC associated with the context to access the display driver */
dc
=
get_dc_ptr
(
ctx
->
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
dc
->
funcs
->
pwglDeleteContext
)
FIXME
(
" :stub
\n
"
);
else
ret
=
dc
->
funcs
->
pwglDeleteContext
(
hglrc
);
...
...
dlls/opengl32/tests/opengl.c
View file @
c4a8de92
...
...
@@ -609,6 +609,11 @@ static void test_deletecontext(HDC hdc)
HANDLE
thread_handle
;
DWORD
res
,
tid
;
SetLastError
(
0xdeadbeef
);
res
=
wglDeleteContext
(
NULL
);
ok
(
res
==
FALSE
,
"wglDeleteContext succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected last error to be ERROR_INVALID_HANDLE, got %u
\n
"
,
GetLastError
());
if
(
!
hglrc
)
{
skip
(
"wglCreateContext failed!
\n
"
);
...
...
@@ -639,6 +644,12 @@ static void test_deletecontext(HDC hdc)
res
=
wglDeleteContext
(
hglrc
);
ok
(
res
==
TRUE
,
"wglDeleteContext failed
\n
"
);
/* Attempting to delete the same context twice should fail. */
SetLastError
(
0xdeadbeef
);
res
=
wglDeleteContext
(
hglrc
);
ok
(
res
==
FALSE
,
"wglDeleteContext succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected last error to be ERROR_INVALID_HANDLE, got %u
\n
"
,
GetLastError
());
/* WGL makes a context not current when deleting it. This differs from GLX behavior where
* deletion takes place when the thread becomes not current. */
hglrc
=
wglGetCurrentContext
();
...
...
dlls/winex11.drv/opengl.c
View file @
c4a8de92
...
...
@@ -1807,6 +1807,7 @@ BOOL CDECL X11DRV_wglDeleteContext(HGLRC hglrc)
wine_tsx11_unlock
();
}
free_context
(
ctx
);
return
TRUE
;
}
...
...
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