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
96973d2d
Commit
96973d2d
authored
May 26, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --screen-mouse-follow option (x11 only).
parent
121f9617
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
modules/access/screen/screen.c
modules/access/screen/screen.c
+13
-0
modules/access/screen/screen.h
modules/access/screen/screen.h
+5
-1
modules/access/screen/x11.c
modules/access/screen/x11.c
+20
-0
No files found.
modules/access/screen/screen.c
View file @
96973d2d
...
...
@@ -67,6 +67,10 @@
#define HEIGHT_TEXT N_( "Subscreen height" )
#define HEIGHT_LONGTEXT N_( \
"Subscreen height." )
#define FOLLOW_MOUSE_TEXT N_( "Follow the mouse" )
#define FOLLOW_MOUSE_LONGTEXT N_( \
"Follow the mouse when capturing a subscreen" )
#endif
static
int
Open
(
vlc_object_t
*
);
...
...
@@ -93,6 +97,9 @@ vlc_module_begin();
add_integer
(
"screen-left"
,
0
,
NULL
,
LEFT_TEXT
,
LEFT_LONGTEXT
,
true
);
add_integer
(
"screen-width"
,
0
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
true
);
add_integer
(
"screen-height"
,
0
,
NULL
,
HEIGHT_TEXT
,
HEIGHT_LONGTEXT
,
true
);
add_integer
(
"screen-height"
,
0
,
NULL
,
HEIGHT_TEXT
,
HEIGHT_LONGTEXT
,
true
);
add_bool
(
"screen-follow-mouse"
,
false
,
NULL
,
FOLLOW_MOUSE_TEXT
,
FOLLOW_MOUSE_LONGTEXT
,
true
);
#endif
#ifdef WIN32
...
...
@@ -171,8 +178,14 @@ static int Open( vlc_object_t *p_this )
}
else
{
p_sys
->
i_screen_width
=
p_sys
->
fmt
.
video
.
i_width
;
p_sys
->
i_screen_height
=
p_sys
->
fmt
.
video
.
i_height
;
p_sys
->
fmt
.
video
.
i_width
=
p_sys
->
i_width
;
p_sys
->
fmt
.
video
.
i_height
=
p_sys
->
i_height
;
p_sys
->
b_follow_mouse
=
var_CreateGetInteger
(
p_demux
,
"screen-follow-mouse"
);
if
(
p_sys
->
b_follow_mouse
)
msg_Dbg
(
p_demux
,
"mouse following enabled"
);
}
}
#endif
...
...
modules/access/screen/screen.h
View file @
96973d2d
...
...
@@ -41,10 +41,14 @@ struct demux_sys_t
int
i_incr
;
#ifdef SCREEN_SUBSCREEN
bool
b_follow_mouse
;
unsigned
int
i_screen_height
;
unsigned
int
i_screen_width
;
unsigned
int
i_top
;
unsigned
int
i_left
;
unsigned
int
i_width
;
unsigned
int
i_height
;
unsigned
int
i_width
;
#endif
screen_data_t
*
p_data
;
...
...
modules/access/screen/x11.c
View file @
96973d2d
...
...
@@ -113,6 +113,26 @@ block_t *screen_Capture( demux_t *p_demux )
XImage
*
image
;
int
i_size
;
if
(
p_sys
->
b_follow_mouse
)
{
Window
root
=
DefaultRootWindow
(
p_display
),
child
;
int
root_x
,
root_y
;
int
win_x
,
win_y
;
unsigned
int
mask
;
if
(
XQueryPointer
(
p_display
,
root
,
&
root
,
&
child
,
&
root_x
,
&
root_y
,
&
win_x
,
&
win_y
,
&
mask
)
)
{
p_sys
->
i_left
=
__MIN
(
(
unsigned
int
)
root_x
,
p_sys
->
i_screen_width
-
p_sys
->
i_width
);
p_sys
->
i_top
=
__MIN
(
(
unsigned
int
)
root_y
,
p_sys
->
i_screen_height
-
p_sys
->
i_height
);
}
else
msg_Dbg
(
p_demux
,
"XQueryPointer() failed"
);
}
image
=
XGetImage
(
p_display
,
DefaultRootWindow
(
p_display
),
p_sys
->
i_left
,
p_sys
->
i_top
,
p_sys
->
fmt
.
video
.
i_width
,
p_sys
->
fmt
.
video
.
i_height
,
AllPlanes
,
ZPixmap
);
...
...
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