Merge branch 'feature/ghostty-split-focus-click' of https://github.com/rockorager/kitty
This commit is contained in:
commit
561433dfa5
2 changed files with 13 additions and 1 deletions
|
|
@ -832,10 +832,21 @@ HANDLER(handle_button_event) {
|
|||
Tab *t = osw->tabs + osw->active_tab;
|
||||
bool is_release = !osw->mouse_button_pressed[button];
|
||||
|
||||
if (button == GLFW_MOUSE_BUTTON_LEFT && is_release && osw->suppress_left_mouse_release) {
|
||||
osw->suppress_left_mouse_release = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (handle_scrollbar_mouse(w, button, is_release ? RELEASE : PRESS, modifiers)) return;
|
||||
|
||||
if (window_idx != t->active_window && !is_release) {
|
||||
if (osw->is_focused && window_idx != t->active_window && !is_release) {
|
||||
call_boss(switch_focus_to_in_active_tab, "K", t->windows[window_idx].id);
|
||||
if (button == GLFW_MOUSE_BUTTON_LEFT) {
|
||||
// Treat split-focus transfer clicks as focus-only and suppress
|
||||
// the matching release to avoid release-without-press reports.
|
||||
osw->suppress_left_mouse_release = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Screen *screen = w->render_data.screen;
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ typedef struct OSWindow {
|
|||
double mouse_x, mouse_y;
|
||||
bool mouse_button_pressed[32];
|
||||
bool has_too_few_tabs;
|
||||
bool suppress_left_mouse_release;
|
||||
PyObject *window_title;
|
||||
bool disallow_title_changes, title_is_overriden;
|
||||
bool viewport_size_dirty, viewport_updated_at_least_once;
|
||||
|
|
|
|||
Loading…
Reference in a new issue