Activate tab before closing on middle click
Also fix compilation on macOS
This commit is contained in:
parent
32ad75c5ab
commit
13b900faf7
2 changed files with 3 additions and 1 deletions
|
|
@ -1425,11 +1425,12 @@ dbus_send_notification(PyObject *self UNUSED, PyObject *args) {
|
|||
return PyLong_FromUnsignedLongLong(notification_id);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static PyObject*
|
||||
get_click_interval(PyObject *self UNUSED, PyObject *args UNUSED) {
|
||||
return PyFloat_FromDouble(monotonic_t_to_s_double(OPT(click_interval)));
|
||||
}
|
||||
#endif
|
||||
|
||||
id_type
|
||||
add_main_loop_timer(monotonic_t interval, bool repeats, timer_callback_fun callback, void *callback_data, timer_callback_fun free_callback) {
|
||||
|
|
|
|||
|
|
@ -999,6 +999,7 @@ def handle_click_on_tab(self, x: int, button: int, modifiers: int, action: int)
|
|||
self.set_active_tab_idx(i)
|
||||
elif button == GLFW_MOUSE_BUTTON_MIDDLE:
|
||||
tab = self.tabs[i]
|
||||
self.set_active_tab(tab)
|
||||
get_boss().close_tab(tab)
|
||||
self.recent_mouse_events.append(TabMouseEvent(button, modifiers, action, now, i))
|
||||
if len(self.recent_mouse_events) > 5:
|
||||
|
|
|
|||
Loading…
Reference in a new issue