Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions kitty/boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,8 @@ def on_drop(self, os_window_id: int, drop: dict[str, bytes] | int, from_self: bo
if window.is_visible_in_layout:
g = window.geometry
if g.left <= x < g.right and g.top <= y < g.bottom:
if get_options().focus_follows_drop and window is not tab.active_window:
tab.set_active_window(window)
window.on_drop(drop)
break
elif tab_bar.left <= x < tab_bar.right and tab_bar.top <= y < tab_bar.bottom:
Expand Down
9 changes: 9 additions & 0 deletions kitty/options/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,15 @@
'''
)

opt('focus_follows_drop', 'no',
option_type='to_bool',
long_text='''
When something is dropped onto a window, automatically focus that window. If
disabled (the default), the drop content is delivered to the target window but
keyboard focus remains on the previously active window.
'''
)

opt('pointer_shape_when_grabbed', 'arrow',
choices=pointer_shape_names, ctype='pointer_shape',
long_text='''
Expand Down
2 changes: 2 additions & 0 deletions kitty/options/types.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.