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
6696e7d9
Commit
6696e7d9
authored
Mar 21, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Don't reset OpenGL swap interval of window on SetParent().
parent
15612dd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
opengl.c
dlls/opengl32/tests/opengl.c
+13
-3
opengl.c
dlls/winex11.drv/opengl.c
+4
-4
No files found.
dlls/opengl32/tests/opengl.c
View file @
6696e7d9
...
...
@@ -1509,7 +1509,7 @@ static void test_swap_control(HDC oldhdc)
0
,
0
,
0
/* layer masks */
};
int
pixel_format
;
HWND
window1
,
window2
;
HWND
window1
,
window2
,
old_parent
;
HGLRC
ctx1
,
ctx2
,
oldctx
;
BOOL
ret
;
HDC
dc1
,
dc2
;
...
...
@@ -1550,7 +1550,7 @@ static void test_swap_control(HDC oldhdc)
ok
(
ret
,
"Failed to set swap interval to 0, last error %#x.
\n
"
,
GetLastError
());
interval
=
pwglGetSwapIntervalEXT
();
ok
(
interval
==
0
,
"Expected
default
swap interval 0, got %d
\n
"
,
interval
);
ok
(
interval
==
0
,
"Expected swap interval 0, got %d
\n
"
,
interval
);
/* Check what interval we get on a second context on the same drawable.*/
ctx2
=
wglCreateContext
(
dc1
);
...
...
@@ -1582,7 +1582,17 @@ static void test_swap_control(HDC oldhdc)
* is not global or shared among contexts.
*/
interval
=
pwglGetSwapIntervalEXT
();
ok
(
interval
==
1
,
"Expected swap interval 1, got %d
\n
"
,
interval
);
ok
(
interval
==
1
,
"Expected default swap interval 1, got %d
\n
"
,
interval
);
/* Test if setting the parent of a window resets the swap interval. */
ret
=
wglMakeCurrent
(
dc1
,
ctx1
);
ok
(
ret
,
"Failed to make context current, last error %#x.
\n
"
,
GetLastError
());
old_parent
=
SetParent
(
window1
,
window2
);
ok
(
!!
old_parent
,
"Failed to make window1 a child of window2, last error %#x.
\n
"
,
GetLastError
());
interval
=
pwglGetSwapIntervalEXT
();
ok
(
interval
==
0
,
"Expected swap interval 0, got %d
\n
"
,
interval
);
ret
=
wglDeleteContext
(
ctx1
);
ok
(
ret
,
"Failed to delete GL context, last error %#x.
\n
"
,
GetLastError
());
...
...
dlls/winex11.drv/opengl.c
View file @
6696e7d9
...
...
@@ -1253,10 +1253,6 @@ static void free_gl_drawable( struct gl_drawable *gl )
static
BOOL
create_gl_drawable
(
HWND
hwnd
,
HWND
parent
,
struct
gl_drawable
*
gl
)
{
gl
->
drawable
=
0
;
/* Default GLX and WGL swap interval is 1, but in case of glXSwapIntervalSGI
* there is no way to query it, so we have to store it here.
*/
gl
->
swap_interval
=
1
;
if
(
GetAncestor
(
hwnd
,
GA_PARENT
)
==
GetDesktopWindow
())
/* top-level window */
{
...
...
@@ -1331,6 +1327,10 @@ static BOOL set_win_format( HWND hwnd, const struct wgl_pixel_format *format )
struct
gl_drawable
*
gl
,
*
prev
;
gl
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
gl
)
);
/* Default GLX and WGL swap interval is 1, but in case of glXSwapIntervalSGI
* there is no way to query it, so we have to store it here.
*/
gl
->
swap_interval
=
1
;
gl
->
format
=
format
;
gl
->
visual
=
pglXGetVisualFromFBConfig
(
gdi_display
,
format
->
fbconfig
);
if
(
!
gl
->
visual
)
...
...
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