RESOLVED FIXED 40933
Playing movie full screen on second monitor hides menu bar and title bar on main monitor
https://bugs.webkit.org/show_bug.cgi?id=40933
Summary Playing movie full screen on second monitor hides menu bar and title bar on m...
Jer Noble
Reported 2010-06-21 12:06:13 PDT
Click the 'expand' button in the lower right, while window is on second monitor. The movie expands to fill the screen, but the dock and title bar on the main monitor hide themselves for no reason.
Attachments
Patch (5.07 KB, patch)
2010-06-21 13:22 PDT, Jer Noble
no flags
Patch (5.25 KB, patch)
2010-06-21 14:36 PDT, Jer Noble
darin: review+
Jer Noble
Comment 1 2010-06-21 12:06:55 PDT
Jer Noble
Comment 2 2010-06-21 13:22:50 PDT
Eric Seidel (no email)
Comment 3 2010-06-21 13:33:51 PDT
Jer Noble
Comment 4 2010-06-21 14:36:24 PDT
Darin Adler
Comment 5 2010-06-21 22:28:59 PDT
Comment on attachment 59293 [details] Patch > - SetSystemUIMode(_savedUIMode, _savedUIOptions); > + [self updateMenuAndDockForFullscreen]; You have some extra trailing spaces on this line of code. > + // NSApplicationPresentationOptions is available on > 10.6 only: This comment says > 10.6, but the code says >= 10.6. > + if ([[NSScreen screens] objectAtIndex:0] == fullscreenScreen) > + options |= (NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock); I don't think you need those parentheses. > + if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) > + [NSApp setPresentationOptions:options]; > + else > +#endif > + SetSystemUIMode(_isEndingFullscreen ? kUIModeNormal : kUIModeAllHidden, 0); I recommend using a "return" here to avoid the need for the else and the ugly need to have code outside the #if indented based on code inside the #if. Is the respondsToSelector: call needed or helpful? r=me
Jer Noble
Comment 6 2010-06-21 23:38:08 PDT
(In reply to comment #5) > (From update of attachment 59293 [details]) > > - SetSystemUIMode(_savedUIMode, _savedUIOptions); > > + [self updateMenuAndDockForFullscreen]; > > You have some extra trailing spaces on this line of code. Drat. Will remove. > > + // NSApplicationPresentationOptions is available on > 10.6 only: > > This comment says > 10.6, but the code says >= 10.6. I'll update the comment to match the code. > > + if ([[NSScreen screens] objectAtIndex:0] == fullscreenScreen) > > + options |= (NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock); > > I don't think you need those parentheses. Will remove. > > + if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) > > + [NSApp setPresentationOptions:options]; > > + else > > +#endif > > + SetSystemUIMode(_isEndingFullscreen ? kUIModeNormal : kUIModeAllHidden, 0); > > I recommend using a "return" here to avoid the need for the else and the ugly need to have code outside the #if indented based on code inside the #if. That's a good idea. I've seen the "else on the other side of a #endif" idiom used elsewhere, but the early return works much better. > Is the respondsToSelector: call needed or helpful? Only if this code is built on Snow Leopard but run on Leopard. Thanks!
Jer Noble
Comment 7 2010-06-24 16:29:35 PDT
Note You need to log in before you can comment on or make changes to this bug.