git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96973d2
)
Use mouse as capture retangle center instead of upper left corner.
author
Antoine Cellerier
<dionoea@videolan.org>
Mon, 26 May 2008 14:06:02 +0000
(16:06 +0200)
committer
Antoine Cellerier
<dionoea@videolan.org>
Mon, 26 May 2008 14:06:02 +0000
(16:06 +0200)
modules/access/screen/x11.c
patch
|
blob
|
history
diff --git
a/modules/access/screen/x11.c
b/modules/access/screen/x11.c
index
a8cf374
..
6020285
100644
(file)
--- a/
modules/access/screen/x11.c
+++ b/
modules/access/screen/x11.c
@@
-123,8
+123,12
@@
block_t *screen_Capture( demux_t *p_demux )
&root, &child, &root_x, &root_y, &win_x, &win_y,
&mask ) )
{
&root, &child, &root_x, &root_y, &win_x, &win_y,
&mask ) )
{
+ root_x -= p_sys->i_width/2;
+ if( root_x < 0 ) root_x = 0;
p_sys->i_left = __MIN( (unsigned int)root_x,
p_sys->i_screen_width - p_sys->i_width );
p_sys->i_left = __MIN( (unsigned int)root_x,
p_sys->i_screen_width - p_sys->i_width );
+ root_y -= p_sys->i_height/2;
+ if( root_y < 0 ) root_y = 0;
p_sys->i_top = __MIN( (unsigned int)root_y,
p_sys->i_screen_height - p_sys->i_height );
}
p_sys->i_top = __MIN( (unsigned int)root_y,
p_sys->i_screen_height - p_sys->i_height );
}