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
18963963
Commit
18963963
authored
Jan 14, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Jan 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: When clearing the OpenGL context, disassociate it from its view.
parent
1643038e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
12 deletions
+29
-12
cocoa_opengl.m
dlls/winemac.drv/cocoa_opengl.m
+29
-12
No files found.
dlls/winemac.drv/cocoa_opengl.m
View file @
18963963
...
...
@@ -90,6 +90,23 @@
}
}
-
(
void
)
removeFromViews
:
(
BOOL
)
removeViews
{
if
([
self
view
])
{
macdrv_remove_view_opengl_context
((
macdrv_view
)[
self
view
],
(
macdrv_opengl_context
)
self
);
if
(
removeViews
)
[
self
clearDrawableLeavingSurfaceOnScreen
];
}
if
([
self
latentView
])
{
macdrv_remove_view_opengl_context
((
macdrv_view
)[
self
latentView
],
(
macdrv_opengl_context
)
self
);
if
(
removeViews
)
[
self
setLatentView
:
nil
];
}
needsUpdate
=
FALSE
;
}
@end
...
...
@@ -122,11 +139,7 @@ void macdrv_dispose_opengl_context(macdrv_opengl_context c)
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
WineOpenGLContext
*
context
=
(
WineOpenGLContext
*
)
c
;
if
([
context
view
])
macdrv_remove_view_opengl_context
((
macdrv_view
)[
context
view
],
c
);
if
([
context
latentView
])
macdrv_remove_view_opengl_context
((
macdrv_view
)[
context
latentView
],
c
);
[
context
clearDrawableLeavingSurfaceOnScreen
];
[
context
removeFromViews
:
YES
];
[
context
release
];
[
pool
release
];
...
...
@@ -143,11 +156,7 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
if
(
context
)
{
if
([
context
view
])
macdrv_remove_view_opengl_context
((
macdrv_view
)[
context
view
],
c
);
if
([
context
latentView
])
macdrv_remove_view_opengl_context
((
macdrv_view
)[
context
latentView
],
c
);
context
.
needsUpdate
=
FALSE
;
[
context
removeFromViews
:
NO
];
if
(
view
)
{
macdrv_add_view_opengl_context
(
v
,
c
);
...
...
@@ -169,11 +178,19 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
else
{
[
WineOpenGLContext
clearCurrentContext
];
[
context
clearDrawableLeavingSurfaceOnScreen
];
[
context
removeFromViews
:
YES
];
}
}
else
[
WineOpenGLContext
clearCurrentContext
];
{
WineOpenGLContext
*
currentContext
=
(
WineOpenGLContext
*
)[
WineOpenGLContext
currentContext
];
if
([
currentContext
isKindOfClass
:[
WineOpenGLContext
class
]])
{
[
WineOpenGLContext
clearCurrentContext
];
[
currentContext
removeFromViews
:
YES
];
}
}
[
pool
release
];
}
...
...
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