Bugzilla – Bug 2044
Mac: no context menu when right clicking in label after copying label text to ano app
Last modified: 2018-12-04 05:32:12 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)
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.
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.
(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
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
Looks good on Sierra! Build bd2547.
Tested on macOS 10.14.1 Mojave with Cliff's Build of 2.3.1 64bit commit bd2547 Looks good on Mojave too