Open Bug 1102865 Opened 10 years ago Updated 2 years ago

[Mac] Shared application is visible altough another app is in focus over it

Categories

(Core :: WebRTC, defect)

All
macOS
defect

Tracking

()

backlog parking-lot

People

(Reporter: adalucinet, Unassigned)

References

Details

Reproducible on:
Firefox 34 beta 11 (Build ID: 20141120192249):
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0		
latest Nightly 36.0a1 (Build ID: 20141120030202):
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0		

Steps to reproduce:
1. Launch Firefox.
2. Navigate to about:config, search for 'media.getusermedia.screensharing.allowed_domains' and add 'people.mozilla.org'
3. Restart Firefox.
4. Navigate to https://people.mozilla.org/~fqueze2/webrtc/ff_gum_test.html
5. Click on Application button and share any given app.
6. Select an app and drag it over the shared app from step 5.  

Expected results: The shared application is not fully visible.

Actual results: The shared application is fully visible.

Note:
1. Not reproducible on Windows 8.1 64-bit, Windows 7 64-bit nor Ubuntu 14.04 32-bit.
2. Screencast: https://db.tt/m6dbNPYi
To a large extent, this is dependent on the mechanisms the OS provides us for getting the bitmaps of an application's windows.  Note that sharing a window shares it on all OS's regardless of whether it's visible or overlaid, so it's not a clear problem.

It would be good to understand if this is forced by Apple's APIs, or something we can fix.
Flags: needinfo?(linuxwolf)
Mac has specific APIs for rendering a collection of windows (i.e., the application's windows) into a single bitmap.  However, I could not find anything in those APIs that would automatically mask off a portion of those windows that might be overlapped by another application's windows.

Windows and Linux implement app sharing by first capturing the entire screen, then masking foreground overlap, then masking the background.  The same logic could be done on Mac, if this is clearly a problem to be solved.  It's considerably more complex than what is currently implemented for Mac, and I don't know what the performance impact would be.
Flags: needinfo?(linuxwolf)
backlog: --- → parking-lot
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.