1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00

Bug2056 residual: Linux only time ruler drags and focus...

... Cross platform differences in Focus handling are confusing, and we don't
know yet how to abort drags and also put focus back where we want it on Linux.

So don't take focus even temporarily in the time ruler.  Sorry, ESC key won't
work.
This commit is contained in:
Paul Licameli 2019-02-09 18:23:51 -05:00
parent 4e57a369be
commit d4c8e9e7b9

View File

@ -107,7 +107,12 @@ void CellularPanel::Uncapture(bool escaping, wxMouseState *pState)
ReleaseMouse();
HandleMotion( *pState );
if (escaping || !TakesFocus()) {
if ( escaping
#ifndef __WXGTK__
// See other comment in HandleClick()
|| !TakesFocus()
#endif
) {
auto lender = GetProject()->mFocusLender.get();
if (lender)
lender->SetFocus();
@ -799,7 +804,16 @@ void CellularPanel::HandleClick( const TrackPanelMouseEvent &tpmEvent )
if (refreshResult & RefreshCode::Cancelled)
state.mUIHandle.reset(), handle.reset(), ClearTargets();
else {
if( !HasFocus() )
if( !HasFocus()
#ifdef __WXGTK__
// Bug 2056 residual
// Don't take focus even temporarily in the time ruler, because
// the restoring of it doesn't work as expected for reasons not
// yet clear.
// The price we pay is that ESC can't abort drags in the time ruler
&& TakesFocus()
#endif
)
SetFocusIgnoringChildren();
state.mpClickedCell = pCell;