Changeset - r21303:eeba23be47d6
[Not reviewed]
master
0 1 0
alberth - 10 years ago 2014-03-05 21:21:55
alberth@openttd.org
(svn r26392) -Fix[FS#5933] No need to call OnFocus twice (MJP)
1 file changed with 0 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -616,13 +616,12 @@ static void DispatchLeftClickEvent(Windo
 
	/* If clicked on a window that previously did dot have focus */
 
	if (_focused_window != w &&                 // We already have focus, right?
 
			(w->window_desc->flags & WDF_NO_FOCUS) == 0 &&  // Don't lose focus to toolbars
 
			widget_type != WWT_CLOSEBOX) {          // Don't change focused window if 'X' (close button) was clicked
 
		focused_widget_changed = true;
 
		SetFocusedWindow(w);
 
		w->OnFocus();
 
	}
 

	
 
	if (nw == NULL) return; // exit if clicked outside of widgets
 

	
 
	/* don't allow any interaction if the button has been disabled */
 
	if (nw->IsDisabled()) return;
0 comments (0 inline, 0 general)