Subject: Re: bug#76084: 31.0.50; Dragging tab line does not resize windows, unlike header line or mode line

From: Jared Finder <[email-masked]>
Date: Sat, 08 Feb 2025 08:01:19 -0800

On 2025-02-06 01:01, martin rudalics wrote:
>> Dragging on empty space in the tab line does not resize windows.  This
>> is unlike the behavior when dragging on empty space in the mode line 
>> or
>> in the header line.
> 
> I attach a patch for this that hopefully does not negatively affect
> 'tab-line-mouse-move-tab'.  Juri will have to check.
> 
>> Additionally, hovering the mouse pointer over empty space on the the
>> header line, while it does resize the window, does not display the
>> "resize up down" icon.  This behiavor is differnt from when you hover
>> the mouse pointer over the empty space on the mode line.
> 
> I suppose this will have to be done separately when specifying a header
> line format (like, for example, 'ruler-mode' does).

The code in xdisp.c that updates the mouse icon for dragging the mode 
line (search for "draggable") is straightforward to adjust to also 
handle the header and tab lines.  That works for almost all cases, I can 
confirm it works fine for Info mode, tab-line mode, and window-tool-bar 
mode. It doesn't work for ruler-mode still because ruler-mode sets its 
own binding for <header-line> <down-mouse-1> in its keymap.

To handle this I would need to add checks against the down-mouse-1 
keybinding before setting the mouse icon.  I'm just worried about 
performance here since looking up the keymap would get run on mouse 
motion.

   -- MJF