Yes you can move the popup by dragging its border, there is a way to resize
also but I forget what it is.

On Sun, 15 Sept 2024 at 15:32, qh4qf7 <qh4...@gmail.com> wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tmux-users+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/tmux-users/D46XHYPUR8LC.BM0L967YQ9OG%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tmux-users+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/CAEdLfcFt-xT%2B0X08tXPKzmVnJvoHH6Xbz3vJ0WSuXOX7j-gp7Q%40mail.gmail.com.

Reply via email to