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
f4f50c9e
Commit
f4f50c9e
authored
Oct 10, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Oct 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Implement support for Cocoa-style full-screen mode.
Based in large part on a patch submitted by Kevin Eaves.
parent
00e53de7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
171 additions
and
24 deletions
+171
-24
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+5
-0
cocoa_window.h
dlls/winemac.drv/cocoa_window.h
+5
-0
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+151
-18
event.c
dlls/winemac.drv/event.c
+1
-1
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-1
macdrv_cocoa.h
dlls/winemac.drv/macdrv_cocoa.h
+2
-1
window.c
dlls/winemac.drv/window.c
+6
-3
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
f4f50c9e
...
@@ -239,6 +239,11 @@ int macdrv_err_on;
...
@@ -239,6 +239,11 @@ int macdrv_err_on;
submenu
=
[[[
NSMenu
alloc
]
initWithTitle
:
@"Window"
]
autorelease
];
submenu
=
[[[
NSMenu
alloc
]
initWithTitle
:
@"Window"
]
autorelease
];
[
submenu
addItemWithTitle
:
@"Minimize"
action
:
@selector
(
performMiniaturize
:
)
keyEquivalent
:
@""
];
[
submenu
addItemWithTitle
:
@"Minimize"
action
:
@selector
(
performMiniaturize
:
)
keyEquivalent
:
@""
];
[
submenu
addItemWithTitle
:
@"Zoom"
action
:
@selector
(
performZoom
:
)
keyEquivalent
:
@""
];
[
submenu
addItemWithTitle
:
@"Zoom"
action
:
@selector
(
performZoom
:
)
keyEquivalent
:
@""
];
if
([
NSWindow
instancesRespondToSelector
:
@selector
(
toggleFullScreen
:)])
{
item
=
[
submenu
addItemWithTitle
:
@"Enter Full Screen"
action
:
@selector
(
toggleFullScreen
:
)
keyEquivalent
:
@"f"
];
[
item
setKeyEquivalentModifierMask
:
NSCommandKeyMask
|
NSAlternateKeyMask
|
NSControlKeyMask
];
}
[
submenu
addItem
:[
NSMenuItem
separatorItem
]];
[
submenu
addItem
:[
NSMenuItem
separatorItem
]];
[
submenu
addItemWithTitle
:
@"Bring All to Front"
action
:
@selector
(
arrangeInFront
:
)
keyEquivalent
:
@""
];
[
submenu
addItemWithTitle
:
@"Bring All to Front"
action
:
@selector
(
arrangeInFront
:
)
keyEquivalent
:
@""
];
item
=
[[[
NSMenuItem
alloc
]
init
]
autorelease
];
item
=
[[[
NSMenuItem
alloc
]
init
]
autorelease
];
...
...
dlls/winemac.drv/cocoa_window.h
View file @
f4f50c9e
...
@@ -58,6 +58,11 @@
...
@@ -58,6 +58,11 @@
NSSize
savedContentMinSize
;
NSSize
savedContentMinSize
;
NSSize
savedContentMaxSize
;
NSSize
savedContentMaxSize
;
BOOL
enteringFullScreen
;
BOOL
exitingFullScreen
;
NSRect
nonFullscreenFrame
;
NSTimeInterval
enteredFullScreenTime
;
BOOL
ignore_windowDeminiaturize
;
BOOL
ignore_windowDeminiaturize
;
BOOL
fakingClose
;
BOOL
fakingClose
;
}
}
...
...
dlls/winemac.drv/cocoa_window.m
View file @
f4f50c9e
This diff is collapsed.
Click to expand it.
dlls/winemac.drv/event.c
View file @
f4f50c9e
...
@@ -246,7 +246,7 @@ void macdrv_handle_event(const macdrv_event *event)
...
@@ -246,7 +246,7 @@ void macdrv_handle_event(const macdrv_event *event)
macdrv_window_did_unminimize
(
hwnd
);
macdrv_window_did_unminimize
(
hwnd
);
break
;
break
;
case
WINDOW_FRAME_CHANGED
:
case
WINDOW_FRAME_CHANGED
:
macdrv_window_frame_changed
(
hwnd
,
event
->
window_frame_changed
.
frame
);
macdrv_window_frame_changed
(
hwnd
,
event
);
break
;
break
;
case
WINDOW_GOT_FOCUS
:
case
WINDOW_GOT_FOCUS
:
macdrv_window_got_focus
(
hwnd
,
event
);
macdrv_window_got_focus
(
hwnd
,
event
);
...
...
dlls/winemac.drv/macdrv.h
View file @
f4f50c9e
...
@@ -155,7 +155,7 @@ extern void surface_clip_to_visible_rect(struct window_surface *window_surface,
...
@@ -155,7 +155,7 @@ extern void surface_clip_to_visible_rect(struct window_surface *window_surface,
extern
void
macdrv_handle_event
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_handle_event
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_close_requested
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_close_requested
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_frame_changed
(
HWND
hwnd
,
CGRect
frame
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_frame_changed
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_got_focus
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_got_focus
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_lost_focus
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_window_lost_focus
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_app_deactivated
(
void
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_app_deactivated
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/macdrv_cocoa.h
View file @
f4f50c9e
...
@@ -273,7 +273,8 @@ typedef struct macdrv_event {
...
@@ -273,7 +273,8 @@ typedef struct macdrv_event {
macdrv_status_item
item
;
macdrv_status_item
item
;
}
status_item_mouse_move
;
}
status_item_mouse_move
;
struct
{
struct
{
CGRect
frame
;
CGRect
frame
;
int
fullscreen
;
}
window_frame_changed
;
}
window_frame_changed
;
struct
{
struct
{
unsigned
long
serial
;
unsigned
long
serial
;
...
...
dlls/winemac.drv/window.c
View file @
f4f50c9e
...
@@ -1654,7 +1654,7 @@ void macdrv_window_close_requested(HWND hwnd)
...
@@ -1654,7 +1654,7 @@ void macdrv_window_close_requested(HWND hwnd)
*
*
* Handler for WINDOW_FRAME_CHANGED events.
* Handler for WINDOW_FRAME_CHANGED events.
*/
*/
void
macdrv_window_frame_changed
(
HWND
hwnd
,
CGRect
frame
)
void
macdrv_window_frame_changed
(
HWND
hwnd
,
const
macdrv_event
*
event
)
{
{
struct
macdrv_win_data
*
data
;
struct
macdrv_win_data
*
data
;
RECT
rect
;
RECT
rect
;
...
@@ -1674,9 +1674,10 @@ void macdrv_window_frame_changed(HWND hwnd, CGRect frame)
...
@@ -1674,9 +1674,10 @@ void macdrv_window_frame_changed(HWND hwnd, CGRect frame)
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
TRACE
(
"win %p/%p new Cocoa frame %s
\n
"
,
hwnd
,
data
->
cocoa_window
,
wine_dbgstr_cgrect
(
frame
));
TRACE
(
"win %p/%p new Cocoa frame %s
\n
"
,
hwnd
,
data
->
cocoa_window
,
wine_dbgstr_cgrect
(
event
->
window_frame_changed
.
frame
));
rect
=
rect_from_cgrect
(
frame
);
rect
=
rect_from_cgrect
(
event
->
window_frame_changed
.
frame
);
macdrv_mac_to_window_rect
(
data
,
&
rect
);
macdrv_mac_to_window_rect
(
data
,
&
rect
);
MapWindowPoints
(
0
,
parent
,
(
POINT
*
)
&
rect
,
2
);
MapWindowPoints
(
0
,
parent
,
(
POINT
*
)
&
rect
,
2
);
...
@@ -1699,6 +1700,8 @@ void macdrv_window_frame_changed(HWND hwnd, CGRect frame)
...
@@ -1699,6 +1700,8 @@ void macdrv_window_frame_changed(HWND hwnd, CGRect frame)
release_win_data
(
data
);
release_win_data
(
data
);
if
(
event
->
window_frame_changed
.
fullscreen
)
flags
|=
SWP_NOSENDCHANGING
;
if
(
!
(
flags
&
SWP_NOSIZE
)
||
!
(
flags
&
SWP_NOMOVE
))
if
(
!
(
flags
&
SWP_NOSIZE
)
||
!
(
flags
&
SWP_NOMOVE
))
SetWindowPos
(
hwnd
,
0
,
rect
.
left
,
rect
.
top
,
width
,
height
,
flags
);
SetWindowPos
(
hwnd
,
0
,
rect
.
left
,
rect
.
top
,
width
,
height
,
flags
);
}
}
...
...
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