diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-14 09:01:49 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-14 09:01:49 +0000 |
commit | 81cd7ce209d0f460e1e78395bbabe921bad1ad67 (patch) | |
tree | 26b70a2d7757a522b71186af34429747354607f7 /framebuffer/fb_rootwindow.c | |
parent | ce23bb867bce14a73cc758b6a3ad89cbe55ba506 (diff) | |
download | netsurf-81cd7ce209d0f460e1e78395bbabe921bad1ad67.tar.gz netsurf-81cd7ce209d0f460e1e78395bbabe921bad1ad67.tar.bz2 |
move mouse movement handling to common place and make it cope with
passing movement to browser window if inside
svn path=/trunk/netsurf/; revision=6475
Diffstat (limited to 'framebuffer/fb_rootwindow.c')
-rw-r--r-- | framebuffer/fb_rootwindow.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/framebuffer/fb_rootwindow.c b/framebuffer/fb_rootwindow.c index ac86499e7..723237137 100644 --- a/framebuffer/fb_rootwindow.c +++ b/framebuffer/fb_rootwindow.c @@ -425,6 +425,29 @@ fb_rootwindow_click(struct gui_window *g, browser_mouse_state st, int x, int y) } +void +fb_rootwindow_move_abs(framebuffer_t *fb, struct gui_window *g, int x, int y) +{ + struct fb_widget *widget; + + fb_cursor_move_abs(fb, x, y); + + widget = widget_list; + while (widget != NULL) { + if ((x > widget->x) && + (y > widget->y) && + (x < widget->x + widget->width) && + (y < widget->y + widget->height)) { + + if (widget->g == g) { + browser_window_mouse_track(g->bw, 0, x - widget->x, y - widget->y); + break; + } + } + widget = widget->next; + } + +} /* * Local Variables: |