diff options
author | portix <none@none> | 2013-03-24 00:56:03 +0100 |
---|---|---|
committer | portix <none@none> | 2013-03-24 00:56:03 +0100 |
commit | 942fbecd4a115ccb43aa185761f0a757d26cba9a (patch) | |
tree | 612a47d7325e594d80dc5bbead68ab17f20bf144 /src/view.c | |
parent | 1b615c247c3e5173678096790534f65e622bc89e (diff) | |
download | dwb-942fbecd4a115ccb43aa185761f0a757d26cba9a.zip |
Replacing MODULO macro with function, fixes focus issue with odd number of tabs
Diffstat (limited to 'src/view.c')
-rw-r--r-- | src/view.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -215,8 +215,6 @@ view_button_press_cb(WebKitWebView *web, GdkEventButton *e, GList *gl) * The webview that emitted the signal * @param {WebKitHitTestResult} result * A hit test result - * @param {GtkEventBox} tabwidget - * The tabwidget * @param {Object} event * @param {Number} event.button * The button that was pressed, usually a value between 1 and 5 @@ -883,12 +881,12 @@ view_scroll_tab_cb(GtkWidget *w, GdkEventScroll *e, GList *gl) int pos = -1; if (e->direction == GDK_SCROLL_DOWN) { - pos = MODULO(g_list_position(dwb.state.views, dwb.state.fview) + 1, g_list_length(dwb.state.views)); + pos = util_modulo(g_list_position(dwb.state.views, dwb.state.fview) + 1, g_list_length(dwb.state.views)); event = "focus_next"; } else if (e->direction == GDK_SCROLL_UP) { - pos = MODULO(g_list_position(dwb.state.views, dwb.state.fview) - 1, g_list_length(dwb.state.views)); + pos = util_modulo(g_list_position(dwb.state.views, dwb.state.fview) - 1, g_list_length(dwb.state.views)); event = "focus_prev"; } if (pos != -1) |