Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
3f465b75
Commit
3f465b75
authored
Feb 26, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug 1141
Rebuild the window with the new style on older versions of Mac OS X.
parent
9c8d95ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
SDL_cocoawindow.m
src/video/cocoa/SDL_cocoawindow.m
+22
-0
No files found.
src/video/cocoa/SDL_cocoawindow.m
View file @
3f465b75
...
...
@@ -787,6 +787,24 @@ Cocoa_RestoreWindow(_THIS, SDL_Window * window)
[
pool
release
];
}
static
NSWindow
*
Cocoa_RebuildWindow
(
SDL_WindowData
*
data
,
NSWindow
*
nswindow
,
unsigned
style
)
{
if
(
!
data
->
created
)
{
/* Don't mess with other people's windows... */
return
nswindow
;
}
[
data
->
listener
close
];
data
->
nswindow
=
[[
SDLWindow
alloc
]
initWithContentRect
:[[
nswindow
contentView
]
frame
]
styleMask
:
style
backing
:
NSBackingStoreBuffered
defer
:
YES
screen
:
[
nswindow
screen
]];
[
data
->
nswindow
setContentView
:[
nswindow
contentView
]];
[
data
->
listener
listen
:
data
];
[
nswindow
close
];
return
data
->
nswindow
;
}
void
Cocoa_SetWindowFullscreen
(
_THIS
,
SDL_Window
*
window
,
SDL_VideoDisplay
*
display
,
SDL_bool
fullscreen
)
{
...
...
@@ -807,6 +825,8 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
if
([
nswindow
respondsToSelector
:
@selector
(
setStyleMask
:)])
{
[
nswindow
performSelector
:
@selector
(
setStyleMask
:)
withObject
:
(
id
)
NSBorderlessWindowMask
];
}
else
{
nswindow
=
Cocoa_RebuildWindow
(
data
,
nswindow
,
NSBorderlessWindowMask
);
}
}
else
{
rect
.
origin
.
x
=
window
->
windowed
.
x
;
...
...
@@ -817,6 +837,8 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
if
([
nswindow
respondsToSelector
:
@selector
(
setStyleMask
:)])
{
[
nswindow
performSelector
:
@selector
(
setStyleMask
:)
withObject
:
(
id
)(
uintptr_t
)
GetWindowStyle
(
window
)];
}
else
{
nswindow
=
Cocoa_RebuildWindow
(
data
,
nswindow
,
GetWindowStyle
(
window
));
}
}
...
...
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