From cbeffd4c5f4ac2ecbb2cfc97a705441a20ec8f23 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Fri, 9 Sep 2011 22:18:49 +0000 Subject: Keep Mouse tracking limited to input_window. svn path=/trunk/netsurf/; revision=12783 --- atari/browser.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'atari/browser.c') diff --git a/atari/browser.c b/atari/browser.c index 6c8f6429e..c193f2ddb 100755 --- a/atari/browser.c +++ b/atari/browser.c @@ -242,6 +242,10 @@ static void __CDECL browser_evnt_arrowed( WINDOW *win, short buff[8], void * dat int value = BROWSER_SCROLL_SVAL; struct gui_window * gw = data; LGRECT cwork; + + if( input_window == NULL || input_window != gw ) { + return; + } browser_get_rect( gw, BR_CONTENT, &cwork ); switch( buff[4] ) { @@ -265,11 +269,15 @@ void __CDECL browser_evnt_slider( WINDOW *win, short buff[8], void * data) { int dx = buff[4]; int dy = buff[5]; - struct gui_window * gw = data; GRECT work, screen; + struct gui_window * gw = data; if (!dx && !dy) return; + if( input_window == NULL || input_window != gw ) { + return; + } + /* update the sliders _before_ we call redraw (which might depend on the slider possitions) */ mt_WindSlider( &app, win, (dx?HSLIDER:0) | (dy?VSLIDER:0) ); @@ -291,7 +299,9 @@ static void __CDECL browser_evnt_mbutton( WINDOW * c, short buff[8], void * data uint32_t tnow = clock()*1000 / CLOCKS_PER_SEC; LGRECT cwork; struct gui_window * gw = data; - input_window = gw; + if( input_window != gw ) { + return; + } window_set_focus( gw, BROWSER, (void*)gw->browser ); browser_get_rect( gw, BR_CONTENT, &cwork ); mx = evnt.mx - cwork.g_x; -- cgit v1.2.3