diff options
author | Ole Loots <ole@monochrom.net> | 2011-09-09 22:18:49 +0000 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2011-09-09 22:18:49 +0000 |
commit | cbeffd4c5f4ac2ecbb2cfc97a705441a20ec8f23 (patch) | |
tree | ff42047c0a624fd83d2463b565da490162b9e996 /atari/browser.c | |
parent | 6cde3888afdf128bf790eef8fc7891d0e5c41d03 (diff) | |
download | netsurf-cbeffd4c5f4ac2ecbb2cfc97a705441a20ec8f23.tar.gz netsurf-cbeffd4c5f4ac2ecbb2cfc97a705441a20ec8f23.tar.bz2 |
Keep Mouse tracking limited to input_window.
svn path=/trunk/netsurf/; revision=12783
Diffstat (limited to 'atari/browser.c')
-rwxr-xr-x | atari/browser.c | 14 |
1 files changed, 12 insertions, 2 deletions
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;
|