Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

CGUIWindowSettingsCategory: only handle delayed settings during GUI_M…

…SG_FOCUSED if the focused setting is not the delayed setting

When using a mouse to control XBMC changing the value of a spinner with a left
click results in a GUI_MSG_FOCUSED message. If that setting is delayed a left
click lead to the early evaluation of the delayed setting even though it's
still being changed (which should just result in a reset of the delay timer).
This lead to crashes if a setting changed callback executed a skin reload.
  • Loading branch information...
1 parent 3c469dc commit 3111408bb70c8706a79333fb18265fd0b74bbb39 @Montellese Montellese committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 xbmc/settings/windows/GUIWindowSettingsCategory.cpp
7 xbmc/settings/windows/GUIWindowSettingsCategory.cpp
@@ -155,15 +155,16 @@ bool CGUIWindowSettingsCategory::OnMessage(CGUIMessage &message)
if (!m_returningFromSkinLoad)
- // cancel any delayed changes
- if (m_delayedSetting != NULL)
+ int focusedControl = GetFocusedControlID();
+ // cancel any delayed changes if the focused control has changed
+ if (m_delayedSetting != NULL && m_delayedSetting->GetID() != focusedControl)
CGUIMessage message(GUI_MSG_UPDATE_ITEM, GetID(), GetID(), 1); // param1 = 1 for "reset the control if it's invalid"
- int focusedControl = GetFocusedControlID();
// check if we have changed the category and need to create new setting controls
if (focusedControl >= CONTROL_START_BUTTONS && focusedControl < (int)(CONTROL_START_BUTTONS + m_categories.size()) &&
focusedControl - CONTROL_START_BUTTONS != m_iCategory)

0 comments on commit 3111408

Please sign in to comment.
Something went wrong with that request. Please try again.