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
32fb017d
Commit
32fb017d
authored
Nov 18, 2021
by
Brendan Shanks
Committed by
Alexandre Julliard
Nov 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Remove workarounds for Mac OS X 10.6 and earlier.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
deff68bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
71 deletions
+23
-71
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+6
-9
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+17
-42
opengl.c
dlls/winemac.drv/opengl.c
+0
-20
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
32fb017d
...
...
@@ -299,15 +299,12 @@ static NSString* WineLocalizedString(unsigned int stringID)
[
submenu
addItemWithTitle
:
WineLocalizedString
(
STRING_MENU_ITEM_ZOOM
)
action
:
@selector
(
performZoom
:
)
keyEquivalent
:
@""
];
if
([
NSWindow
instancesRespondToSelector
:
@selector
(
toggleFullScreen
:)])
{
item
=
[
submenu
addItemWithTitle
:
WineLocalizedString
(
STRING_MENU_ITEM_ENTER_FULL_SCREEN
)
action
:
@selector
(
toggleFullScreen
:
)
keyEquivalent
:
@"f"
];
[
item
setKeyEquivalentModifierMask
:
NSEventModifierFlagCommand
|
NSEventModifierFlagOption
|
NSEventModifierFlagControl
];
}
item
=
[
submenu
addItemWithTitle
:
WineLocalizedString
(
STRING_MENU_ITEM_ENTER_FULL_SCREEN
)
action
:
@selector
(
toggleFullScreen
:
)
keyEquivalent
:
@"f"
];
[
item
setKeyEquivalentModifierMask
:
NSEventModifierFlagCommand
|
NSEventModifierFlagOption
|
NSEventModifierFlagControl
];
[
submenu
addItem
:[
NSMenuItem
separatorItem
]];
[
submenu
addItemWithTitle
:
WineLocalizedString
(
STRING_MENU_ITEM_BRING_ALL_TO_FRONT
)
action
:
@selector
(
arrangeInFront
:
)
...
...
dlls/winemac.drv/cocoa_window.m
View file @
32fb017d
...
...
@@ -36,20 +36,6 @@
#import "cocoa_opengl.h"
#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
enum
{
NSWindowCollectionBehaviorFullScreenPrimary
=
1
<<
7
,
NSWindowCollectionBehaviorFullScreenAuxiliary
=
1
<<
8
,
NSWindowFullScreenButton
=
7
,
NSWindowStyleMaskFullScreen
=
1
<<
14
,
};
@interface
NSWindow
(
WineFullScreenExtensions
)
-
(
void
)
toggleFullScreen
:(
id
)
sender
;
@end
#endif
#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
/* Additional Mac virtual keycode, to complement those in Carbon's <HIToolbox/Events.h>. */
enum
{
...
...
@@ -1091,11 +1077,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
[[
self
standardWindowButton
:
NSWindowMiniaturizeButton
]
setEnabled
:
!
self
.
disabled
];
if
(
style
&
NSWindowStyleMaskResizable
)
[[
self
standardWindowButton
:
NSWindowZoomButton
]
setEnabled
:
!
self
.
disabled
];
if
([
self
respondsToSelector
:
@selector
(
toggleFullScreen
:)])
{
if
([
self
collectionBehavior
]
&
NSWindowCollectionBehaviorFullScreenPrimary
)
[[
self
standardWindowButton
:
NSWindowFullScreenButton
]
setEnabled
:
!
self
.
disabled
];
}
if
([
self
collectionBehavior
]
&
NSWindowCollectionBehaviorFullScreenPrimary
)
[[
self
standardWindowButton
:
NSWindowFullScreenButton
]
setEnabled
:
!
self
.
disabled
];
if
([
self
preventResizing
])
{
...
...
@@ -1115,24 +1098,21 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
-
(
void
)
adjustFullScreenBehavior
:
(
NSWindowCollectionBehavior
)
behavior
{
if
([
self
respondsToSelector
:
@selector
(
toggleFullScreen
:)])
{
NSUInteger
style
=
[
self
styleMask
];
NSUInteger
style
=
[
self
styleMask
];
if
(
behavior
&
NSWindowCollectionBehaviorParticipatesInCycle
&&
style
&
NSWindowStyleMaskResizable
&&
!
(
style
&
NSWindowStyleMaskUtilityWindow
)
&&
!
maximized
&&
!
(
self
.
parentWindow
||
self
.
latentParentWindow
))
{
behavior
|=
NSWindowCollectionBehaviorFullScreenPrimary
;
behavior
&=
~
NSWindowCollectionBehaviorFullScreenAuxiliary
;
}
else
{
behavior
&=
~
NSWindowCollectionBehaviorFullScreenPrimary
;
behavior
|=
NSWindowCollectionBehaviorFullScreenAuxiliary
;
if
(
style
&
NSWindowStyleMaskFullScreen
)
[
super
toggleFullScreen
:
nil
];
}
if
(
behavior
&
NSWindowCollectionBehaviorParticipatesInCycle
&&
style
&
NSWindowStyleMaskResizable
&&
!
(
style
&
NSWindowStyleMaskUtilityWindow
)
&&
!
maximized
&&
!
(
self
.
parentWindow
||
self
.
latentParentWindow
))
{
behavior
|=
NSWindowCollectionBehaviorFullScreenPrimary
;
behavior
&=
~
NSWindowCollectionBehaviorFullScreenAuxiliary
;
}
else
{
behavior
&=
~
NSWindowCollectionBehaviorFullScreenPrimary
;
behavior
|=
NSWindowCollectionBehaviorFullScreenAuxiliary
;
if
(
style
&
NSWindowStyleMaskFullScreen
)
[
super
toggleFullScreen
:
nil
];
}
if
(
behavior
!=
[
self
collectionBehavior
])
...
...
@@ -2480,12 +2460,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
for
(
i
=
0
;
i
<
sizeof
(
buttons
)
/
sizeof
(
buttons
[
0
]);
i
++
)
{
NSButton
*
button
;
if
(
buttons
[
i
]
==
NSWindowFullScreenButton
&&
!
[
self
respondsToSelector
:
@selector
(
toggleFullScreen
:)])
continue
;
button
=
[
self
standardWindowButton
:
buttons
[
i
]];
NSButton
*
button
=
[
self
standardWindowButton
:
buttons
[
i
]];
if
([
button
hitTest
:[
button
.
superview
convertPoint
:
event
.
locationInWindow
fromView
:
nil
]])
{
hitButton
=
YES
;
...
...
dlls/winemac.drv/opengl.c
View file @
32fb017d
...
...
@@ -1248,7 +1248,6 @@ static BOOL init_gl_info(void)
kCGLPFADisplayMask
,
displayMask
,
0
};
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
CGLPixelFormatAttribute
core_attribs
[]
=
{
kCGLPFADisplayMask
,
displayMask
,
...
...
@@ -1256,7 +1255,6 @@ static BOOL init_gl_info(void)
kCGLPFAOpenGLProfile
,
(
CGLPixelFormatAttribute
)
kCGLOGLPVersion_3_2_Core
,
0
};
#endif
CGLPixelFormatObj
pix
;
GLint
virtualScreens
;
CGLError
err
;
...
...
@@ -1308,7 +1306,6 @@ static BOOL init_gl_info(void)
CGLSetCurrentContext
(
old_context
);
CGLReleaseContext
(
context
);
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
err
=
CGLChoosePixelFormat
(
core_attribs
,
&
pix
,
&
virtualScreens
);
if
(
err
!=
kCGLNoError
||
!
pix
)
{
...
...
@@ -1340,7 +1337,6 @@ static BOOL init_gl_info(void)
sscanf
(
str
,
"%u.%u"
,
&
gl_info
.
max_major
,
&
gl_info
.
max_minor
);
CGLSetCurrentContext
(
old_context
);
CGLReleaseContext
(
context
);
#endif
return
TRUE
;
}
...
...
@@ -1397,14 +1393,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
CGLError
err
;
BOOL
core
=
major
>=
3
;
#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
if
(
core
)
{
WARN
(
"OS X version >= 10.7 is required to be able to create core contexts
\n
"
);
return
FALSE
;
}
#endif
pf
=
get_pixel_format
(
context
->
format
,
TRUE
/* non-displayable */
);
if
(
!
pf
)
{
...
...
@@ -1480,7 +1468,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
if
(
pf
->
backing_store
)
attribs
[
n
++
]
=
kCGLPFABackingStore
;
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if
(
core
)
{
attribs
[
n
++
]
=
kCGLPFAOpenGLProfile
;
...
...
@@ -1493,7 +1480,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
attribs
[
n
++
]
=
(
int
)
kCGLOGLPVersion_3_2_Core
;
#endif
}
#endif
attribs
[
n
]
=
0
;
...
...
@@ -1856,12 +1842,8 @@ static CGLPixelFormatObj create_pixel_format_for_renderer(CGLRendererInfoObj ren
if
(
core
)
{
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
attrs
[
3
]
=
kCGLPFAOpenGLProfile
;
attrs
[
4
]
=
(
CGLPixelFormatAttribute
)
kCGLOGLPVersion_3_2_Core
;
#else
return
NULL
;
#endif
}
if
(
!
get_renderer_property
(
renderer_info
,
renderer
,
kCGLRPRendererID
,
&
renderer_id
))
...
...
@@ -2157,12 +2139,10 @@ static BOOL query_renderer_integer(CGLRendererInfoObj renderer_info, GLint rende
}
case
WGL_RENDERER_VIDEO_MEMORY_WINE
:
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
err
=
CGLDescribeRenderer
(
renderer_info
,
renderer
,
kCGLRPVideoMemoryMegabytes
,
(
GLint
*
)
value
);
if
(
err
!=
kCGLNoError
&&
err
!=
kCGLBadProperty
)
WARN
(
"CGLDescribeRenderer(kCGLRPVideoMemoryMegabytes) failed: %d %s
\n
"
,
err
,
CGLErrorString
(
err
));
if
(
err
!=
kCGLNoError
)
#endif
{
if
(
get_renderer_property
(
renderer_info
,
renderer
,
kCGLRPVideoMemory
,
(
GLint
*
)
value
))
*
value
/=
1024
*
1024
;
...
...
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