|
|
Created:
13 years, 2 months ago by djeannot24 Modified:
13 years, 2 months ago Reviewers:
rsc CC:
rsc, codebot Visibility:
Public. |
Patch Set 1 : (2nd attempt) #
Total comments: 2
Patch Set 2 : Fullscreen fix #Patch Set 3 : Fullscreen fix (2nd attempt) #Patch Set 4 : avoid minimize bug after new fullscreen's exiting #Patch Set 5 : same as last patch with gestures disabled #Patch Set 6 : verify hiding status each time we go back to Devdraw #Patch Set 7 : update hiding status if change of screen while fullscreen #Patch Set 8 : restore correct state #MessagesTotal messages: 19
Cocoa Devdraw: cursor, menu bar, old fs, activation Cursor On Lion, it will remain 1 cursor bug, after this patch: The window must not be fullscreen. Dock's autohiding must be on. The window must touch the bottom of the screen. If we don't reach the dock fast enough, we will come back with a resize cursor until the next mousedown. The only way I found to remove this bug introduces 2 other cursor bugs. Glenda.png is in a header, so I put the "bigarrow" cursor in a header too. Menu bar The menu bar appears too easily while fullscreen. We can't hide it completely without also hiding the dock. As I am always using those 2 bars while fullscreen (on my 11-inch-one-screen config), I found the following trick instead: The menu bar will only appears if the mouse reaches the top fast enough: that is to say, if it does a final jump of at least 5 pixels. I tested it during 1 day with 3 devices (Logitech mouse; Wacom tablet; trackpad), and the menu bar only appeared when I needed it. So it seems sufficient for me. Does it seem sufficient for you too? Else you can try to adjust a little the constant "Jump". (A jump of 10 pixels is too much; I don't tested other values.) I can also make an option to hide both bars completely. Once I was using old fullscreen, and the menubar refused to autohide. Maybe this is related to the new function tamemenubar(). Old fullscreen If we set "useoldfullscreen" on Lion, we can still use new fullscreen with the window's upper right button. Now cmd+F or pinch gesture exits both fullscreens (instead of just 1 depending of the value of "useoldfullscreen"). The old fullscreen needs a separate window. Before this patch, both windows could end up on different spaces: we would change of space each time we toggle old fullscreen. Activation If Devdraw's option "autoactivate" is set, it activates itself after "Ttop" messages, but there are several issues for now.
Sign in to reply to this message.
Thanks very much for working on this. I'd really like the dock and menu never to appear when in full screen mode. There is always control-arrow to flip back to the non-full-screen space to get them, or exiting full screen mode. That seems a lot cleaner than the 5-pixel heuristic, especially since it seems like if you select anything from the dock you will be moved back to the non-full-screen space anyway. http://codereview.appspot.com/5318054/diff/3001/src/cmd/devdraw/cocoa-screen.m File src/cmd/devdraw/cocoa-screen.m (right): http://codereview.appspot.com/5318054/diff/3001/src/cmd/devdraw/cocoa-screen.... src/cmd/devdraw/cocoa-screen.m:63: case 'a': I'd like to avoid adding flags if at all possible. These flags are impossible to set on a per-command basis, so they are not very useful. It would be much better to have the right behavior just happen. In this case, there is already an explicit message that means "activate". Devdraw should react to that message (Ttop) and not to things like moveto. http://codereview.appspot.com/5318054/diff/3001/src/cmd/devdraw/cocoa-screen.... src/cmd/devdraw/cocoa-screen.m:1001: activatewin(); I don't believe this should activate. Only a Ttop should. Is this left over from not having activatewin in Ttop? Or maybe a bug fix of some kind? If the last, please add a comment.
Sign in to reply to this message.
Patch "Fullscreen fix" Menu bar and Dock According to Apple's documentation, we can't hide completely a bar without the other. Indeed, we receive an exception if we try. With old fullscreen, both bars are now completely hidden. With new fullscreen however, only the menu bar is completely hidden: the dock is still autohidden. Maybe this is a bug. Or maybe Apple thinks the dock is important while fullscreen, because it permits to "rearrange spaces based on mosts recent use". This patch also includes the precedent changes concerning old fullscreen: If we set "useoldfullscreen" on Lion, we can still use new fullscreen with the window's upper right button. Now cmd+F or pinch gesture exits both fullscreens (instead of just 1 depending of the value of "useoldfullscreen"). The old fullscreen needs a separate window. Before this patch, both windows could end up on different spaces: we would change of space each time we toggle old fullscreen. This patch doesn't include cursor code anymore, because I will change it soon. This patch doesn't include the activation code anymore, that was only a work in progress (sorry to have wasted your time Russ.)
Sign in to reply to this message.
LGTM Thanks.
Sign in to reply to this message.
thanks. i am having trouble with codereview vs the bitbucket ssh server but eventually i will manage to submit this! On Mon, Oct 31, 2011 at 17:55, <djeannot24@gmail.com> wrote: > http://codereview.appspot.com/5318054/ >
Sign in to reply to this message.
Both methods to hide the bars (the standard one causing the bug and the hackish one trying to avoid it) are unreliable: Devdraw's menu bar can still pop out after using other fullscreen apps' menu bars. I'm working on it.
Sign in to reply to this message.
Do not apply this patch if you please. After exiting new fullscreen, menu was not restored. I then toggled new fullscreen, and I am now locked in a space with a window having a strange title bar. If I find a solution, I will test it for 1 day before to submit it. Sorry for the deluge of patches; I naively thought it would be simple for once.
Sign in to reply to this message.
The precedent patch suffers from the following bug: Occasionally, while exiting new fullscreen, Devdraw's window lose the minimize button, and both bars were still completely hidden. We could trigger this bug in less than 2 minutes, by incessantly swiping from one space to another just before (and just after?) toggling fullscreen. We can't avoid that bug, apparently, but we can restore the correct state as soon as the transition ends. This is what the patch "restore correct state" does. Also, I still saw the menu bar pop out once while fullscreen :)
Sign in to reply to this message.
I think I might have submitted the wrong version of this patch. Would you mind checking? Sorry about the trouble. I was so excited to finally have hg submit working that I clicked one too many patches. Russ
Sign in to reply to this message.
*** Submitted as dff1adcac1c5 *** Cocoa Devdraw: cursor, menu bar, old fs, activation R=rsc CC=plan9port.codebot http://codereview.appspot.com/5318054 Committer: Russ Cox <rsc@swtch.com>
Sign in to reply to this message.
|