Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
0a86a76f
Commit
0a86a76f
authored
Jan 21, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_macosx: protect vout_display_SendEvent calls to prevent potential crashes
parent
b4f7db3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
modules/video_output/macosx.m
modules/video_output/macosx.m
+21
-7
No files found.
modules/video_output/macosx.m
View file @
0a86a76f
...
...
@@ -701,9 +701,13 @@ static void OpenglSwap (vlc_gl_t *gl)
-
(
void
)
mouseDown
:(
NSEvent
*
)
o_event
{
if
([
o_event
type
]
==
NSLeftMouseDown
&&
!
([
o_event
modifierFlags
]
&
NSControlKeyMask
))
{
if
([
o_event
clickCount
]
<=
1
)
vout_display_SendEventMousePressed
(
vd
,
MOUSE_BUTTON_LEFT
);
@synchronized
(
self
)
{
if
(
vd
)
{
if
([
o_event
type
]
==
NSLeftMouseDown
&&
!
([
o_event
modifierFlags
]
&
NSControlKeyMask
))
{
if
([
o_event
clickCount
]
<=
1
)
vout_display_SendEventMousePressed
(
vd
,
MOUSE_BUTTON_LEFT
);
}
}
}
[
super
mouseDown
:
o_event
];
...
...
@@ -711,22 +715,32 @@ static void OpenglSwap (vlc_gl_t *gl)
-
(
void
)
otherMouseDown
:(
NSEvent
*
)
o_event
{
vout_display_SendEventMousePressed
(
vd
,
MOUSE_BUTTON_CENTER
);
@synchronized
(
self
)
{
if
(
vd
)
vout_display_SendEventMousePressed
(
vd
,
MOUSE_BUTTON_CENTER
);
}
[
super
otherMouseDown
:
o_event
];
}
-
(
void
)
mouseUp
:(
NSEvent
*
)
o_event
{
if
([
o_event
type
]
==
NSLeftMouseUp
)
vout_display_SendEventMouseReleased
(
vd
,
MOUSE_BUTTON_LEFT
);
@synchronized
(
self
)
{
if
(
vd
)
{
if
([
o_event
type
]
==
NSLeftMouseUp
)
vout_display_SendEventMouseReleased
(
vd
,
MOUSE_BUTTON_LEFT
);
}
}
[
super
mouseUp
:
o_event
];
}
-
(
void
)
otherMouseUp
:(
NSEvent
*
)
o_event
{
vout_display_SendEventMouseReleased
(
vd
,
MOUSE_BUTTON_CENTER
);
@synchronized
(
self
)
{
if
(
vd
)
vout_display_SendEventMouseReleased
(
vd
,
MOUSE_BUTTON_CENTER
);
}
[
super
otherMouseUp
:
o_event
];
}
...
...
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