From 4f25c5ac61fbc039a33f04b62efae238ea4cae17 Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 26 Mar 2017 22:26:45 +0300 Subject: [PATCH] no-titlebars: fixed toolbar buttons missing first click --- src/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.cpp b/src/window.cpp index 2fc53bd199..4ecb47413d 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -821,7 +821,7 @@ static void DispatchLeftButtonDownEvent(Window *w, int x, int y, int click_count static void DispatchLeftButtonUpEvent(Window *w, int x, int y) { if (_settings_client.gui.windows_titlebars || _dragging_window) return; - if (_focused_window) { + if (_focused_window != NULL && w->window_class != WC_MAIN_TOOLBAR && w->window_class != WC_MAIN_TOOLBAR_RIGHT) { // Send event to the window and widget which were initially under the mouse cursor SendLeftClickEventToWindow(_focused_window, _left_button_down_pos.x - _focused_window->left, _left_button_down_pos.y - _focused_window->top, 1); } else {