Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
78e39f0d
Commit
78e39f0d
authored
Mar 22, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uniformisation and configurability of Mouse Hidding Time. Patch by Lukas Durfina
parent
31dcf0dd
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
44 additions
and
9 deletions
+44
-9
modules/gui/beos/VideoOutput.cpp
modules/gui/beos/VideoOutput.cpp
+2
-2
modules/gui/beos/VideoWindow.h
modules/gui/beos/VideoWindow.h
+1
-0
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+4
-1
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+4
-1
modules/video_output/msw/glwin32.c
modules/video_output/msw/glwin32.c
+4
-1
modules/video_output/msw/vout.h
modules/video_output/msw/vout.h
+1
-0
modules/video_output/msw/wingdi.c
modules/video_output/msw/wingdi.c
+4
-1
modules/video_output/qte/qte.cpp
modules/video_output/qte/qte.cpp
+2
-1
modules/video_output/sdl.c
modules/video_output/sdl.c
+5
-1
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+4
-1
modules/video_output/x11/xcommon.h
modules/video_output/x11/xcommon.h
+1
-0
src/libvlc-module.c
src/libvlc-module.c
+9
-0
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+3
-0
No files found.
modules/gui/beos/VideoOutput.cpp
View file @
78e39f0d
...
...
@@ -77,7 +77,6 @@ struct vout_sys_t
};
#define MOUSE_IDLE_TIMEOUT 2000000 // two seconds
#define MIN_AUTO_VSYNC_REFRESH 61 // Hz
/*****************************************************************************
...
...
@@ -984,6 +983,7 @@ VLCView::VLCView(BRect bounds, vout_thread_t *p_vout_instance )
fIgnoreDoubleClick
(
false
)
{
p_vout
=
p_vout_instance
;
fMouseHideTimeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
SetViewColor
(
B_TRANSPARENT_32_BIT
);
}
...
...
@@ -1169,7 +1169,7 @@ VLCView::Pulse()
if
(
!
fCursorHidden
)
{
if
(
fCursorInside
&&
mdate
()
-
fLastMouseMovedTime
>
MOUSE_IDLE_TIMEOUT
)
&&
mdate
()
-
fLastMouseMovedTime
>
fMouseHideTimeout
)
{
be_app
->
ObscureCursor
();
fCursorHidden
=
true
;
...
...
modules/gui/beos/VideoWindow.h
View file @
78e39f0d
...
...
@@ -122,6 +122,7 @@ class VLCView : public BView
vout_thread_t
*
p_vout
;
bigtime_t
fLastMouseMovedTime
;
int
fMouseHideTimeout
;
bool
fCursorHidden
;
bool
fCursorInside
;
bool
fIgnoreDoubleClick
;
...
...
modules/video_output/msw/direct3d.c
View file @
78e39f0d
...
...
@@ -183,6 +183,8 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
b_cursor_hidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
var_Create
(
p_vout
,
"video-title"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"disable-screensaver"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
@@ -475,7 +477,8 @@ static int Manage( vout_thread_t *p_vout )
* Pointer change
*/
if
(
p_vout
->
b_fullscreen
&&
!
p_vout
->
p_sys
->
b_cursor_hidden
&&
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
5000000
)
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
POINT
point
;
HWND
hwnd
;
...
...
modules/video_output/msw/directx.c
View file @
78e39f0d
...
...
@@ -261,6 +261,8 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
b_cursor_hidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
/* Set main window's size */
p_vout
->
p_sys
->
i_window_width
=
p_vout
->
i_window_width
;
...
...
@@ -638,7 +640,8 @@ static int Manage( vout_thread_t *p_vout )
* Pointer change
*/
if
(
p_vout
->
b_fullscreen
&&
!
p_vout
->
p_sys
->
b_cursor_hidden
&&
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
5000000
)
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
POINT
point
;
HWND
hwnd
;
...
...
modules/video_output/msw/glwin32.c
View file @
78e39f0d
...
...
@@ -118,6 +118,8 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
b_cursor_hidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
/* Set main window's size */
p_vout
->
p_sys
->
i_window_width
=
p_vout
->
i_window_width
;
...
...
@@ -337,7 +339,8 @@ static int Manage( vout_thread_t *p_vout )
* Pointer change
*/
if
(
p_vout
->
b_fullscreen
&&
!
p_vout
->
p_sys
->
b_cursor_hidden
&&
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
5000000
)
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
POINT
point
;
HWND
hwnd
;
...
...
modules/video_output/msw/vout.h
View file @
78e39f0d
...
...
@@ -72,6 +72,7 @@ struct vout_sys_t
/* Mouse */
volatile
vlc_bool_t
b_cursor_hidden
;
volatile
mtime_t
i_lastmoved
;
mtime_t
i_mouse_hide_timeout
;
/* Misc */
vlc_bool_t
b_on_top_change
;
...
...
modules/video_output/msw/wingdi.c
View file @
78e39f0d
...
...
@@ -231,6 +231,8 @@ static int OpenVideo ( vlc_object_t *p_this )
p_vout
->
p_sys
->
b_cursor_hidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
/* Set main window's size */
p_vout
->
p_sys
->
i_window_width
=
p_vout
->
i_window_width
;
...
...
@@ -565,7 +567,8 @@ static int Manage( vout_thread_t *p_vout )
* Pointer change
*/
if
(
p_vout
->
b_fullscreen
&&
!
p_vout
->
p_sys
->
b_cursor_hidden
&&
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
5000000
)
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
)
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
POINT
point
;
HWND
hwnd
;
...
...
modules/video_output/qte/qte.cpp
View file @
78e39f0d
...
...
@@ -390,7 +390,8 @@ static int Manage( vout_thread_t *p_vout )
/* Pointer change */
// if( ! p_vout->p_sys->b_cursor_autohidden &&
// ( mdate() - p_vout->p_sys->i_lastmoved > 2000000 ) )
// ( mdate() - p_vout->p_sys->i_lastmoved >
// p_vout->p_sys->i_mouse_hide_timeout ) )
// {
// /* Hide the mouse automatically */
// p_vout->p_sys->b_cursor_autohidden = 1;
...
...
modules/video_output/sdl.c
View file @
78e39f0d
...
...
@@ -77,6 +77,7 @@ struct vout_sys_t
vlc_bool_t
b_cursor
;
vlc_bool_t
b_cursor_autohidden
;
mtime_t
i_lastmoved
;
mtime_t
i_mouse_hide_timeout
;
mtime_t
i_lastpressed
;
/* to track dbl-clicks */
};
...
...
@@ -227,6 +228,8 @@ static int Open ( vlc_object_t *p_this )
p_vout
->
p_sys
->
b_cursor
=
1
;
p_vout
->
p_sys
->
b_cursor_autohidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
p_vout
->
p_sys
->
i_lastpressed
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
if
(
OpenDisplay
(
p_vout
)
)
{
...
...
@@ -625,7 +628,8 @@ static int Manage( vout_thread_t *p_vout )
/* Pointer change */
if
(
!
p_vout
->
p_sys
->
b_cursor_autohidden
&&
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
>
2000000
)
)
(
mdate
()
-
p_vout
->
p_sys
->
i_lastmoved
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
)
{
/* Hide the mouse automatically */
p_vout
->
p_sys
->
b_cursor_autohidden
=
1
;
...
...
modules/video_output/x11/xcommon.c
View file @
78e39f0d
...
...
@@ -342,6 +342,8 @@ int E_(Activate) ( vlc_object_t *p_this )
/* Create blank cursor (for mouse cursor autohiding) */
p_vout
->
p_sys
->
i_time_mouse_last_moved
=
mdate
();
p_vout
->
p_sys
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
p_vout
->
p_sys
->
b_mouse_pointer_visible
=
1
;
CreateCursor
(
p_vout
);
...
...
@@ -1553,7 +1555,8 @@ static int ManageVideo( vout_thread_t *p_vout )
}
/* Autohide Cursour */
if
(
mdate
()
-
p_vout
->
p_sys
->
i_time_mouse_last_moved
>
2000000
)
if
(
mdate
()
-
p_vout
->
p_sys
->
i_time_mouse_last_moved
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
/* Hide the mouse automatically */
if
(
p_vout
->
p_sys
->
b_mouse_pointer_visible
)
...
...
modules/video_output/x11/xcommon.h
View file @
78e39f0d
...
...
@@ -252,6 +252,7 @@ struct vout_sys_t
/* Mouse pointer properties */
vlc_bool_t
b_mouse_pointer_visible
;
mtime_t
i_time_mouse_last_moved
;
/* used to auto-hide pointer*/
mtime_t
i_mouse_hide_timeout
;
/* after time hide cursor */
Cursor
blank_cursor
;
/* the hidden cursor */
mtime_t
i_time_button_last_pressed
;
/* to track dbl-clicks */
Pixmap
cursor_pixmap
;
...
...
src/libvlc-module.c
View file @
78e39f0d
...
...
@@ -399,6 +399,12 @@ static const char *ppsz_align_descriptions[] =
#define VIDEO_TITLE_POSITION_LONGTEXT N_( \
"Place on video where to display the title (default bottom center).")
#define MOUSE_HIDE_TIMEOUT_TEXT N_("Hide cursor and fullscreen " \
"controller after x miliseconds.")
#define MOUSE_HIDE_TIMEOUT_LONGTEXT N_( \
"Hide mouse cursor and fullscreen controller after " \
"n miliseconds, default is 3000 ms (3 sec.)")
static
int
pi_pos_values
[]
=
{
0
,
1
,
2
,
4
,
8
,
5
,
6
,
9
,
10
};
static
const
char
*
ppsz_pos_descriptions
[]
=
{
N_
(
"Center"
),
N_
(
"Left"
),
N_
(
"Right"
),
N_
(
"Top"
),
N_
(
"Bottom"
),
...
...
@@ -1485,6 +1491,9 @@ vlc_module_begin();
VIDEO_TITLE_TIMEOUT_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"video-title-position"
,
8
,
NULL
,
VIDEO_TITLE_POSITION_TEXT
,
VIDEO_TITLE_POSITION_LONGTEXT
,
VLC_FALSE
);
// autohide after 3s
add_integer
(
"mouse-hide-timeout"
,
3000
,
NULL
,
MOUSE_HIDE_TIMEOUT_TEXT
,
MOUSE_HIDE_TIMEOUT_LONGTEXT
,
VLC_FALSE
);
change_integer_list
(
pi_pos_values
,
ppsz_pos_descriptions
,
0
);
set_section
(
N_
(
"Snapshot"
)
,
NULL
);
...
...
src/video_output/vout_intf.c
View file @
78e39f0d
...
...
@@ -287,6 +287,9 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create
(
p_vout
,
"video-x"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"video-y"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"mouse-hide-timeout"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_vout
->
b_title_show
=
var_CreateGetBool
(
p_vout
,
"video-title-show"
);
p_vout
->
i_title_timeout
=
(
mtime_t
)
var_CreateGetInteger
(
p_vout
,
"video-title-timeout"
);
...
...
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