From 005db53dd87c0bea5bfc7ae72e5efafb68fc986b Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Mon, 26 May 2008 16:06:02 +0200 Subject: [PATCH] Use mouse as capture retangle center instead of upper left corner. --- modules/access/screen/x11.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/access/screen/x11.c b/modules/access/screen/x11.c index a8cf374945..60202857fa 100644 --- 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_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 ); + 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 ); } -- 2.20.1