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
9d1cfecc
Commit
9d1cfecc
authored
Aug 05, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Aug 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: When removing the status item for a systray icon, discard any…
winemac: When removing the status item for a systray icon, discard any associated events in the queue.
parent
ba57f572
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
cocoa_event.m
dlls/winemac.drv/cocoa_event.m
+10
-3
cocoa_status_item.m
dlls/winemac.drv/cocoa_status_item.m
+6
-0
No files found.
dlls/winemac.drv/cocoa_event.m
View file @
9d1cfecc
...
...
@@ -267,7 +267,7 @@ static const OSType WineHotKeySignature = 'Wine';
return
ret
;
}
-
(
void
)
discardEvents
MatchingMask
:
(
macdrv_event_mask
)
mask
forWindow
:
(
NSWindow
*
)
window
-
(
void
)
discardEvents
PassingTest
:
(
BOOL
(
^
)(
macdrv_event
*
event
))
block
{
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSIndexSet
*
indexes
;
...
...
@@ -276,8 +276,7 @@ static const OSType WineHotKeySignature = 'Wine';
indexes
=
[
events
indexesOfObjectsPassingTest
:
^
BOOL
(
id
obj
,
NSUInteger
idx
,
BOOL
*
stop
){
MacDrvEvent
*
event
=
obj
;
return
((
event_mask_for_type
(
event
->
event
->
type
)
&
mask
)
&&
(
!
window
||
event
->
event
->
window
==
(
macdrv_window
)
window
));
return
block
(
event
->
event
);
}];
[
events
removeObjectsAtIndexes
:
indexes
];
...
...
@@ -287,6 +286,14 @@ static const OSType WineHotKeySignature = 'Wine';
[
pool
release
];
}
-
(
void
)
discardEventsMatchingMask
:
(
macdrv_event_mask
)
mask
forWindow
:
(
NSWindow
*
)
window
{
[
self
discardEventsPassingTest
:
^
BOOL
(
macdrv_event
*
event
){
return
((
event_mask_for_type
(
event
->
type
)
&
mask
)
&&
(
!
window
||
event
->
window
==
(
macdrv_window
)
window
));
}];
}
-
(
BOOL
)
query
:
(
macdrv_query
*
)
query
timeout
:
(
NSTimeInterval
)
timeout
processEvents
:
(
BOOL
)
processEvents
{
macdrv_event
*
event
;
...
...
dlls/winemac.drv/cocoa_status_item.m
View file @
9d1cfecc
...
...
@@ -96,6 +96,12 @@
NSStatusBar
*
statusBar
=
[
NSStatusBar
systemStatusBar
];
[
statusBar
removeStatusItem
:
item
];
[
item
setView
:
nil
];
[
queue
discardEventsPassingTest
:
^
BOOL
(
macdrv_event
*
event
){
return
((
event
->
type
==
STATUS_ITEM_MOUSE_BUTTON
&&
event
->
status_item_mouse_button
.
item
==
(
macdrv_status_item
)
self
)
||
(
event
->
type
==
STATUS_ITEM_MOUSE_MOVE
&&
event
->
status_item_mouse_move
.
item
==
(
macdrv_status_item
)
self
));
}];
self
.
item
=
nil
;
}
}
...
...
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