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
13882691
Commit
13882691
authored
Feb 09, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: also hide mouse cursor when detached window is in fullscreen
parent
20c4f1a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
36 deletions
+33
-36
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+0
-5
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+0
-31
modules/gui/macosx/Windows.m
modules/gui/macosx/Windows.m
+33
-0
No files found.
modules/gui/macosx/MainWindow.h
View file @
13882691
...
@@ -92,8 +92,6 @@
...
@@ -92,8 +92,6 @@
BOOL
b_podcastView_displayed
;
BOOL
b_podcastView_displayed
;
NSTimer
*
t_hide_mouse_timer
;
VLCColorView
*
o_color_backdrop
;
VLCColorView
*
o_color_backdrop
;
NSRect
frameBeforePlayback
;
NSRect
frameBeforePlayback
;
...
@@ -133,9 +131,6 @@
...
@@ -133,9 +131,6 @@
-
(
void
)
setVideoplayEnabled
;
-
(
void
)
setVideoplayEnabled
;
-
(
void
)
hideMouseCursor
:(
NSTimer
*
)
timer
;
-
(
void
)
recreateHideMouseTimer
;
@end
@end
@interface
VLCDetachedVideoWindow
:
VLCVideoWindowCommon
@interface
VLCDetachedVideoWindow
:
VLCVideoWindowCommon
...
...
modules/gui/macosx/MainWindow.m
View file @
13882691
...
@@ -158,7 +158,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -158,7 +158,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
!
OSX_SNOW_LEOPARD
)
if
(
!
OSX_SNOW_LEOPARD
)
b_nativeFullscreenMode
=
var_InheritBool
(
VLCIntf
,
"macosx-nativefullscreenmode"
);
b_nativeFullscreenMode
=
var_InheritBool
(
VLCIntf
,
"macosx-nativefullscreenmode"
);
#endif
#endif
t_hide_mouse_timer
=
nil
;
[
self
useOptimizedDrawing
:
YES
];
[
self
useOptimizedDrawing
:
YES
];
[[
o_search_fld
cell
]
setPlaceholderString
:
_NS
(
"Search"
)];
[[
o_search_fld
cell
]
setPlaceholderString
:
_NS
(
"Search"
)];
...
@@ -756,36 +755,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -756,36 +755,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
}
}
}
// Called automatically if window's acceptsMouseMovedEvents property is true
-
(
void
)
mouseMoved
:(
NSEvent
*
)
theEvent
{
if
(
b_fullscreen
)
[
self
recreateHideMouseTimer
];
[
super
mouseMoved
:
theEvent
];
}
-
(
void
)
recreateHideMouseTimer
{
if
(
t_hide_mouse_timer
!=
nil
)
{
[
t_hide_mouse_timer
invalidate
];
[
t_hide_mouse_timer
release
];
}
t_hide_mouse_timer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
2
target:
self
selector:
@selector
(
hideMouseCursor
:)
userInfo:
nil
repeats:
NO
];
[
t_hide_mouse_timer
retain
];
}
// NSTimer selectors require this function signature as per Apple's docs
-
(
void
)
hideMouseCursor
:(
NSTimer
*
)
timer
{
[
NSCursor
setHiddenUntilMouseMoves
:
YES
];
}
#pragma mark -
#pragma mark -
#pragma mark Lion native fullscreen handling
#pragma mark Lion native fullscreen handling
-
(
void
)
windowWillEnterFullScreen
:(
NSNotification
*
)
notification
-
(
void
)
windowWillEnterFullScreen
:(
NSNotification
*
)
notification
...
...
modules/gui/macosx/Windows.m
View file @
13882691
...
@@ -546,6 +546,39 @@
...
@@ -546,6 +546,39 @@
}
}
#pragma mark -
#pragma mark Mouse cursor handling
// NSTimer selectors require this function signature as per Apple's docs
-
(
void
)
hideMouseCursor
:(
NSTimer
*
)
timer
{
[
NSCursor
setHiddenUntilMouseMoves
:
YES
];
}
-
(
void
)
recreateHideMouseTimer
{
if
(
t_hide_mouse_timer
!=
nil
)
{
[
t_hide_mouse_timer
invalidate
];
[
t_hide_mouse_timer
release
];
}
t_hide_mouse_timer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
2
target:
self
selector:
@selector
(
hideMouseCursor
:)
userInfo:
nil
repeats:
NO
];
[
t_hide_mouse_timer
retain
];
}
// Called automatically if window's acceptsMouseMovedEvents property is true
-
(
void
)
mouseMoved
:(
NSEvent
*
)
theEvent
{
if
(
b_fullscreen
)
[
self
recreateHideMouseTimer
];
[
super
mouseMoved
:
theEvent
];
}
#pragma mark -
#pragma mark -
#pragma mark Lion native fullscreen handling
#pragma mark Lion native fullscreen handling
...
...
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