diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-10 09:09:03 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-10 09:09:03 +0000 |
commit | 17d059f53f00ca7815774f98e80e2ddff4442e75 (patch) | |
tree | e87c3399cbba08c100fc13bf7d91a12acd5039cd /riscos | |
parent | 444cb189844aab3170cb2b88a0dcd651fc60353b (diff) | |
download | netsurf-17d059f53f00ca7815774f98e80e2ddff4442e75.tar.gz netsurf-17d059f53f00ca7815774f98e80e2ddff4442e75.tar.bz2 |
[project @ 2006-03-10 09:09:03 by dsilvers]
Minor refactor to pass the gui_window to gui_window_set_pointer and gui_window_hide_pointer
svn path=/import/netsurf/; revision=2123
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/gui.c | 2 | ||||
-rw-r--r-- | riscos/textselection.c | 7 | ||||
-rw-r--r-- | riscos/window.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index c09b00375..b5ef080bf 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -1138,7 +1138,7 @@ void ro_gui_pointer_leaving_window(wimp_leaving *leaving) default: gui_track = false; - gui_window_set_pointer(GUI_POINTER_DEFAULT); + gui_window_set_pointer(gui_track_gui_window, GUI_POINTER_DEFAULT); break; } } diff --git a/riscos/textselection.c b/riscos/textselection.c index 603f645ea..a6745ff6d 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -37,7 +37,7 @@ static bool dragging_claimed = false; static wimp_t dragging_claimant; static os_box dragging_box = { -34, -34, 34, 34 }; /* \todo - size properly */ static wimp_drag_claim_flags last_claim_flags = 0; - +static struct gui_window *last_start_window; static bool drag_claimed = false; @@ -123,6 +123,7 @@ void gui_start_selection(struct gui_window *g) error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } + last_start_window = g; } @@ -588,7 +589,7 @@ void ro_gui_selection_dragging(wimp_message *message) if (drag_claimed) caret_remove(&ghost_caret); else - gui_window_set_pointer(GUI_POINTER_CARET); + gui_window_set_pointer(g, GUI_POINTER_CARET); text_box = textarea_get_position(textarea, x - gadget_box_x, y - gadget_box_y, &char_offset, &pixel_offset); @@ -661,7 +662,7 @@ void ro_gui_selection_drag_claim(wimp_message *message) /* do we need to restore the default pointer shape? */ if ((last_claim_flags & wimp_DRAG_CLAIM_POINTER_CHANGED) && !(claim->flags & wimp_DRAG_CLAIM_POINTER_CHANGED)) { - gui_window_set_pointer(GUI_POINTER_DEFAULT); + gui_window_set_pointer(last_start_window, GUI_POINTER_DEFAULT); } last_claim_flags = claim->flags; diff --git a/riscos/window.c b/riscos/window.c index c5af2fbb1..840d6277b 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -2516,7 +2516,7 @@ struct ro_gui_pointer_entry ro_gui_pointer_table[] = { * Change mouse pointer shape */ -void gui_window_set_pointer(gui_pointer_shape shape) +void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) { static gui_pointer_shape curr_pointer = GUI_POINTER_DEFAULT; struct ro_gui_pointer_entry *entry; @@ -2560,7 +2560,7 @@ void gui_window_set_pointer(gui_pointer_shape shape) * Remove the mouse pointer from the screen */ -void gui_window_hide_pointer(void) +void gui_window_hide_pointer(gui_window *g) { os_error *error; |