Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cleanup

macrumors 68030
Original poster
Jun 26, 2005
2,643
10
Toronto
I'm no programmer. I have no idea how to code anything besides the UBB code on this forum.

But I noticed in DVD Player how when you run fullscreen, the Menubar autohides itself until you move your mouse to the top of the screen at which point it elegantly slides in to allow you to use it.

If someone found the code that DVD Player uses to perform this, and somehow made a program that would enable autohiding of the Menubar at all times, the GUI customization community out there would love you, especially me. You could even charge a small fee for it and people would pay.

Anyone interested? I have no idea what I'm talking about but would it be that hard? Couldn't you just take most of the code from DVD Player.app? :eek:
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
It's quite easy to hide the menubar as long as you are the current app. As soon as you select another app though it will bring the menu-bar to the front again.

You might be able to do this via an InputManager though...
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
You could have a process which doesn't appear in the Dock, but has a small, transparent window in place of the menubar. As the window is transparent, any clicks here should pass straight through as if the window wasn't there, but you should still be able to add a tracking rect which would let your app receive notifications of when the cursor is at the top of the screen so as to show the menubar.

The only thing I'm not sure of is how to hide the menubar without displaying a fullscreen 'blanking' window - ideally you'd like to do this in a nice scrolling fashion rather than it just popping in and out.

All in all, it shouldn't take more than a day to do this.
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
whooleytoo said:
You could have a process which doesn't appear in the Dock, but has a small, transparent window in place of the menubar. As the window is transparent, any clicks here should pass straight through as if the window wasn't there, but you should still be able to add a tracking rect which would let your app receive notifications of when the cursor is at the top of the screen so as to show the menubar.

The only thing I'm not sure of is how to hide the menubar without displaying a fullscreen 'blanking' window - ideally you'd like to do this in a nice scrolling fashion rather than it just popping in and out.

All in all, it shouldn't take more than a day to do this.

There's a simple call to hide the menu bar, but as somebody else said I'm pretty sure it only works when you're the front app. Tracking the mouse is pretty easy -- no window required -- just use a Timer and measure mouse coordinates.

Try this, open an app which hides the menubar (like DVD player) and then command-tab to another application. The menubar comes right back, right?
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
savar said:
Tracking the mouse is pretty easy -- no window required -- just use a Timer and measure mouse coordinates.

It might make little difference in this case, but generally I try to avoid polling timers like this- I'd assume it's more efficient for the OS to handle the tracking rects, particularly since there potentially might be more than one process tracking the mouse movements at a time.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.