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
0576c636
Commit
0576c636
authored
May 10, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Centralize initialization of WineContentView.
parent
b7105bde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+14
-10
No files found.
dlls/winemac.drv/cocoa_window.m
View file @
0576c636
...
...
@@ -469,6 +469,20 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
@synthesize
everHadGLContext
=
_everHadGLContext
;
-
(
instancetype
)
initWithFrame
:(
NSRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setWantsLayer
:
YES
];
[
self
layer
].
minificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
magnificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
contentsScale
=
retina_on
?
2
.
0
:
1
.
0
;
[
self
setAutoresizesSubviews
:
NO
];
}
return
self
;
}
-
(
void
)
dealloc
{
[
markedText
release
];
...
...
@@ -1006,11 +1020,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
contentView
=
[[[
WineContentView
alloc
]
initWithFrame
:
NSZeroRect
]
autorelease
];
if
(
!
contentView
)
return
nil
;
[
contentView
setWantsLayer
:
YES
];
[
contentView
layer
].
minificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
contentView
layer
].
magnificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
contentView
layer
].
contentsScale
=
retina_on
?
2
.
0
:
1
.
0
;
[
contentView
setAutoresizesSubviews
:
NO
];
/* We use tracking areas in addition to setAcceptsMouseMovedEvents:YES
because they give us mouse moves in the background. */
...
...
@@ -3600,11 +3609,6 @@ macdrv_view macdrv_create_view(CGRect rect)
NSNotificationCenter
*
nc
=
[
NSNotificationCenter
defaultCenter
];
view
=
[[
WineContentView
alloc
]
initWithFrame
:
NSRectFromCGRect
(
cgrect_mac_from_win
(
rect
))];
[
view
setWantsLayer
:
YES
];
[
view
layer
].
minificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
view
layer
].
magnificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
view
layer
].
contentsScale
=
retina_on
?
2
.
0
:
1
.
0
;
[
view
setAutoresizesSubviews
:
NO
];
[
view
setAutoresizingMask
:
NSViewNotSizable
];
[
view
setHidden
:
YES
];
[
view
setWantsBestResolutionOpenGLSurface
:
retina_on
];
...
...
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