Fix modifier key window not always updating
This commit is contained in:
@@ -1380,10 +1380,9 @@ struct ModifierKeyToggleWindow : Window {
|
|||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
EventState OnCTRLStateChange() override
|
void OnCTRLStateChangeAlways() override
|
||||||
{
|
{
|
||||||
this->UpdateButtons();
|
this->UpdateButtons();
|
||||||
return ES_NOT_HANDLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnShiftStateChange() override
|
void OnShiftStateChange() override
|
||||||
|
@@ -2748,7 +2748,11 @@ void HandleCtrlChanged()
|
|||||||
/* Call the event, start with the uppermost window. */
|
/* Call the event, start with the uppermost window. */
|
||||||
Window *w;
|
Window *w;
|
||||||
FOR_ALL_WINDOWS_FROM_FRONT(w) {
|
FOR_ALL_WINDOWS_FROM_FRONT(w) {
|
||||||
if (w->OnCTRLStateChange() == ES_HANDLED) return;
|
if (w->OnCTRLStateChange() == ES_HANDLED) break;
|
||||||
|
w->OnCTRLStateChangeAlways();
|
||||||
|
}
|
||||||
|
FOR_ALL_WINDOWS_FROM_FRONT_FROM(w, w) {
|
||||||
|
w->OnCTRLStateChangeAlways();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -667,6 +667,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual EventState OnCTRLStateChange() { return ES_NOT_HANDLED; }
|
virtual EventState OnCTRLStateChange() { return ES_NOT_HANDLED; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The state of the control key has changed, this is sent even if an OnCTRLStateChange handler has return ES_HANDLED
|
||||||
|
*/
|
||||||
|
virtual void OnCTRLStateChangeAlways() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state of the shift key has changed
|
* The state of the shift key has changed
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user