Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
b3f71fde
Commit
b3f71fde
authored
12 years ago
by
Ken Thomases
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winemac: Implement the Mac "Window" menu.
parent
15d4b2ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/winemac.drv/cocoa_app.m
+11
-0
11 additions, 0 deletions
dlls/winemac.drv/cocoa_app.m
dlls/winemac.drv/cocoa_window.m
+26
-0
26 additions, 0 deletions
dlls/winemac.drv/cocoa_window.m
with
37 additions
and
0 deletions
dlls/winemac.drv/cocoa_app.m
+
11
−
0
View file @
b3f71fde
...
...
@@ -51,7 +51,18 @@ - (void) transformProcessToForeground
[
item
setSubmenu
:
submenu
];
[
mainMenu
addItem
:
item
];
submenu
=
[[[
NSMenu
alloc
]
initWithTitle
:
@"Window"
]
autorelease
];
[
submenu
addItemWithTitle
:
@"Minimize"
action
:
@selector
(
performMiniaturize
:
)
keyEquivalent
:
@""
];
[
submenu
addItemWithTitle
:
@"Zoom"
action
:
@selector
(
performZoom
:
)
keyEquivalent
:
@""
];
[
submenu
addItem
:[
NSMenuItem
separatorItem
]];
[
submenu
addItemWithTitle
:
@"Bring All to Front"
action
:
@selector
(
arrangeInFront
:
)
keyEquivalent
:
@""
];
item
=
[[[
NSMenuItem
alloc
]
init
]
autorelease
];
[
item
setTitle
:
@"Window"
];
[
item
setSubmenu
:
submenu
];
[
mainMenu
addItem
:
item
];
[
self
setMainMenu
:
mainMenu
];
[
self
setWindowsMenu
:
submenu
];
}
}
...
...
This diff is collapsed.
Click to expand it.
dlls/winemac.drv/cocoa_window.m
+
26
−
0
View file @
b3f71fde
...
...
@@ -172,9 +172,17 @@ - (void) setMacDrvState:(const struct macdrv_window_state*)state
else
behavior
|=
NSWindowCollectionBehaviorManaged
;
if
(
state
->
excluded_by_cycle
)
{
behavior
|=
NSWindowCollectionBehaviorIgnoresCycle
;
if
([
self
isVisible
])
[
NSApp
removeWindowsItem
:
self
];
}
else
{
behavior
|=
NSWindowCollectionBehaviorParticipatesInCycle
;
if
([
self
isVisible
])
[
NSApp
addWindowsItem
:
self
title
:[
self
title
]
filename
:
NO
];
}
[
self
setCollectionBehavior
:
behavior
];
}
...
...
@@ -196,6 +204,9 @@ - (BOOL) orderBelow:(WineWindow*)prev orAbove:(WineWindow*)next
[
latentParentWindow
addChildWindow
:
self
ordered
:
NSWindowAbove
];
self
.
latentParentWindow
=
nil
;
}
if
(
!
[
self
isExcludedFromWindowsMenu
])
[
NSApp
addWindowsItem
:
self
title
:[
self
title
]
filename
:
NO
];
}
return
on_screen
;
...
...
@@ -206,6 +217,7 @@ - (void) doOrderOut
self
.
latentParentWindow
=
[
self
parentWindow
];
[
latentParentWindow
removeChildWindow
:
self
];
[
self
orderOut
:
nil
];
[
NSApp
removeWindowsItem
:
self
];
}
-
(
BOOL
)
setFrameIfOnScreen
:(
NSRect
)
contentRect
...
...
@@ -277,6 +289,18 @@ - (BOOL) canBecomeMainWindow
return
[
self
canBecomeKeyWindow
];
}
-
(
BOOL
)
isExcludedFromWindowsMenu
{
return
!
([
self
collectionBehavior
]
&
NSWindowCollectionBehaviorParticipatesInCycle
);
}
-
(
BOOL
)
validateMenuItem
:(
NSMenuItem
*
)
menuItem
{
if
([
menuItem
action
]
==
@selector
(
makeKeyAndOrderFront
:
))
return
[
self
isKeyWindow
]
||
(
!
self
.
disabled
&&
!
self
.
noActivate
);
return
[
super
validateMenuItem
:
menuItem
];
}
/*
* ---------- NSWindowDelegate methods ----------
...
...
@@ -372,6 +396,8 @@ void macdrv_set_cocoa_window_title(macdrv_window w, const unsigned short* title,
titleString
=
@""
;
OnMainThreadAsync
(
^
{
[
window
setTitle
:
titleString
];
if
([
window
isVisible
]
&&
!
[
window
isExcludedFromWindowsMenu
])
[
NSApp
changeWindowsItem
:
window
title
:
titleString
filename
:
NO
];
});
[
pool
release
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment