Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2044 - Mac: no context menu when right clicking in label after copying label text to ano app
Mac: no context menu when right clicking in label after copying label text to...
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.3.1
Per OS Other
: P4 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-03 07:19 UTC by Peter Sampson
Modified: 2018-12-04 05:32 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1) get some audio 2) create a label and add label text 3) select and copy the label text 4) open Notes 5) paste the label contents into Notes 6) minimize the Notes window 7) in Audacity window right click on the label 8) => nothing happens Expected behavior at step 8 => context menu
Release Note:
First Git SHA:
Group: ---
Workaround:
Left click in the label and then right click in the label
Closed:
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2018-12-03 07:19:10 UTC
This is a residual bug from Bug #2028

It appears to only affect Mojave (based on testing of 2028 by Cliff Scott on Sierra and High Sierra)
Comment 1 James Crook 2018-12-03 09:19:55 UTC
Re comment 0, this bug also affects El Capitan on my mac mini.
I'd therefore expect that if the steps are followed exactly it is all platforms.

Moreover I have a good idea what the cause and the fix is, based on this code:

void LabelTrack::ShowContextMenu()
{
   wxWindow *parent = wxWindow::FindFocus();
   if( parent )
     //.... code to show the context menu.

What is needed is an alternative to find the parent window in the case where FindFocus() returns nullptr.

Using the Audacity project's top level parent is probably the right thing.

I'm not making the fix before 2.3.1 is out as it is too minor to worry about and takes attention away from things that matter far more.
Comment 2 Cliff Scott 2018-12-03 09:46:23 UTC
This "New" bug now appears in Sierra and High Sierra as well. 

The issue is that the Right Click does not now see Audacity when under the mouse pointer. On Sierra and High Sierra and maybe Mojave the OS will allow the Right Click to pull up the context menu of the app under the mouse pointer without fully doing a task switch, but with the "fix" for 2028 that isn't happening with Audacity now. The user now needs to do a normal task switch then the context menu works as advertised, the user just doesn't have the nice option of the Right Click operating on Audacity when it is under the mouse pointer.
Comment 3 Peter Sampson 2018-12-03 10:48:30 UTC
(In reply to James Crook from comment #1)
>Re comment 0, this bug also affects El Capitan on my mac mini.
>I'd therefore expect that if the steps are followed exactly 
>it is all platforms.

I can't make this happen on W10 with audacity-2.3.1-alpha-172-253aca7eec2e35eff0ee07ac022f11b95f514672
Comment 4 James Crook 2018-12-03 13:10:29 UTC
OK that (comment 3 and comment 2) makes sense.
I added a fallback way to get the parent, and this works for me on El Capitan.

   wxWindow *parent = wxWindow::FindFocus();
    // Bug 2044.  parent can be nullptr after a context switch.
   if( !parent )
      parent = GetActiveProject();
    if( parent )


DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/bd2547828e3c23f16eb16d4d1ec6d2231cae9828
Comment 5 Cliff Scott 2018-12-03 13:59:45 UTC
Looks good on Sierra! Build bd2547.
Comment 6 Peter Sampson 2018-12-04 05:32:12 UTC
Tested on macOS 10.14.1 Mojave with Cliff's Build of 2.3.1 64bit commit bd2547

Looks good on Mojave too