Hi!
I use tmux popups attached to sessions with key bindings like this:
```
bind -n C-g if -F '#{m:popupg,#{session_name}}' detach-client {
popup -d "$HOME" -E 'tmux new -A -s popupg \; set detach-on-destroy on'
}
```
This setup allows me to toggle different popups using keys like C-f, C-g, C-h, etc.
However, when I try to select text inside a popup and my mouse intersects the popup's
border, it starts dragging the popup instead of letting me select the text.
eg
https://streamable.com/6qlpf2
To work around this, I disabled the popup dragging feature with this quick hack:
```diff
diff --git a/popup.c b/popup.c
index 706295fe..101f6ea2 100644
--- a/popup.c
+++ b/popup.c
@@ -532,7 +532,7 @@ popup_key_cb(struct client *c, void *data, struct key_event *event)
if (!MOUSE_DRAG(m->b))
goto out;
if (MOUSE_BUTTONS(m->lb) == MOUSE_BUTTON_1)
- pd->dragging = MOVE;
+ ;
else if (MOUSE_BUTTONS(m->lb) == MOUSE_BUTTON_3)
pd->dragging = SIZE;
pd->dx = m->lx - pd->px;
```
result ->
https://streamable.com/qnpd3x
While this works, it's just a quick hack.
Is this expected behavior ?
If so, could you guide me on how to properly adjust my configuration to prevent popup dragging while still allowing text selection? I haven’t found an option for this or a way to rebind MouseDrag1 within the popup while still allowing text selection.
If this isn't intended, can you offer some guidance on how I could patch this properly? I'm not too familiar with the tmux codebase, but I'd be happy to submit a PR if I can write a suitable patch.
Details:
- kernel/architecure: Darwin arm
- tmux built from
github.com/tmux/tmux master branch (37771a5a)
- terminal emulator: kitty
- $TERM: tmux-256color inside tmux, xterm-kitty outside tmux
Thanks