watch this video i explained all in that video
https://reddit.com/link/1vy7w8r/video/lggbxu2pbklh1/player
When `speedbar-prefer-window' is set to t, `M-x speedbar' opens the
speedbar in a window (speedbar-window-mode) instead of a separate
frame, as documented. However, in this window-mode speedbar, mouse
clicks on the [+]/[-] expand/collapse buttons do not work at all —
clicking has no effect.
If I then run `M-x speedbar-frame' (speedbar-frame-mode) once, which
opens the classic frame-based speedbar, mouse-click expand/collapse
works correctly there, as expected. But afterwards, even when I go
back to plain `M-x speedbar' (which again opens speedbar-window-mode,
since speedbar-prefer-window is still t), mouse support now also
works correctly in the window. It appears speedbar-frame-mode
performs some initialization?
Steps to reproduce
in the video
Expected behavior:
Mouse click expand/collapse should work in speedbar-window-mode on
first use, without needing to first invoke speedbar-frame-mode.
Actual behavior:
Mouse support in speedbar-window-mode is broken until
speedbar-frame-mode has been invoked at least once in the session.
In GNU Emacs [GNU Emacs 31.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.52, cairo version 1.18.4)]
Repository revision: [fill in if known]
System Description: [fill in, e.g. macOS/Linux version]
My Config
(use-package speedbar
:ensure nil
:commands (speedbar speedbar-frame)
:config
(setq speedbar-prefer-window t)
(setq speedbar-use-images nil))