hyprwm/hyprland-plugins

Hyprbars: when follow_mouse=2 double click needed for buttons on bar

Closed this issue · 2 comments

When follow_mouse is set to 2 or 3, double click is needed for buttons on bar to be able to click them, or to drag a window.

First click just focuses a window.

I would expect for click to focus and perform action.

aljus7 commented

wouldn't basically that do the trick:

void CHyprBar::onMouseDown(SCallbackInfo& info, IPointer::SButtonEvent e) {
 /*if (m_pWindow.lock() != g_pCompositor->m_pLastWindow.lock()) {
        return;
    }*/

    const auto         PWINDOW = m_pWindow.lock();
	g_pCompositor->focusWindow(PWINDOW);

nope, that would not be the right solution, I'll fix it in a moment.