From 4dc4d8b318c9bee25ca9b2982495b2906cc76287 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 20 Aug 2019 00:16:52 +0100 Subject: add miscellaneous event to browser window callback table extend the browser window callback table with a miscallaneous event entry. This is used to replace all browser window callbacks which take no parameters. This reduces the API surface from seven separate calls to a single call with an enumeration which may be readily extended. The initial implementation in the frontends simply calls the original implementations to reduce scope for errors. --- desktop/selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop/selection.c') diff --git a/desktop/selection.c b/desktop/selection.c index 10aa4c7dd..c8edda7b1 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -307,7 +307,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse, s->drag_state = DRAG_END; - guit->window->start_selection(top->window); + guit->window->event(top->window, GW_EVENT_START_SELECTION); } else if (mouse & BROWSER_MOUSE_DRAG_2) { @@ -326,7 +326,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse, s->drag_state = DRAG_START; } - guit->window->start_selection(top->window); + guit->window->event(top->window, GW_EVENT_START_SELECTION); } else if (mouse & BROWSER_MOUSE_CLICK_2) { -- cgit v1.2.3