mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Fix crash with wxWidgets 3.0: Cursor recapturing in track panel sliders [Patch 0019] From martin@steghoefer.eu
wxWidgets 3.0 has added a lot of asserts to detect incorrect usage of its APIs. Now capturing the cursor, when it's already captured, throws an assertion failure. As the assertion failure window appears at a very inconvenient moment (when the cursor is captured), this can lead to Audacity crashing or can even render the whole Desktop Manager unusable until you find a way to kill Audacity without using your Desktop Manager (e.g. ssh login)! The recapturing can occur in the track panel sliders because the sliders capture the cursor themselves (because they are also used in other places outside the track panel, where this is actually necessary), but the track panel also manages the cursor capturing because it needs it for other operations. Fixed the recapturing problem by letting the sliders capture the cursor only if necessary.
This commit is contained in:
parent
4c0aa60871
commit
72dfbcc587
@ -1071,7 +1071,9 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
|
||||
event.ShiftDown());
|
||||
}
|
||||
|
||||
mParent->CaptureMouse();
|
||||
if (!mParent->HasCapture()) {
|
||||
mParent->CaptureMouse();
|
||||
}
|
||||
// wxSetCursor(wxCURSOR_BLANK);
|
||||
((TipPanel*)LWSlider::sharedTipPanel)->SetTargetParent(mParent);
|
||||
FormatPopWin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user