Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vista Expose-style switcher

Started by mutex Nov 3, 2006 at 1:16 AM 6 replies 11.6k views
Original Post
mutex
mutex
It's a Vista Expose-style switcher I wrote in a few nights based on a WPF+DWM thumbnail demo by Douglas Stockwell. I was too lazy to install an IDE for a while, so most of it was written in Notepad. It's compilable on a fresh install of Vista; just run %windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe /target:winexe Switcher.cs Download here. The switcher activates when you run the executable. I added a shortcut to it in the Quick Launch bar. On Vista, each Quick Launch item is accessible via the keyboard shortcut Win+, where is the index of the item in that bar. My shortcut is first, so I press Win+1 to activate the switcher. There's another Expose clone here that's written in C++ and has a bit more features. I dislike its animation and graphics, though, which was part of the reason why I wrote my own. Plus I was kinda bored that night. Hope everyone has fun with it. No restrictions on the code. It might have scary bugs, so don't blame me if your computer explodes. And yes, Civilization 4 is animating at full speed in that screenshot :)

Promit
Promit
Heh.

I absolutely love that they had the foresight to actually make an API for working with DWM and doing stuff like this -- something that to my knowledge Apple and the XGL guys have not bothered to do for either OSX or Linux.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Conner McCloud
Conner McCloud
That's really cool. I do kind of wonder, though, what benefit it would have beyond providing an Expose-like feature?

Any thoughts?

CM
capn_midnight
capn_midnight
Conner: Mac users are convinced it's superior to the task bar.

Interestingly, IE7 has something like this for its tabs. On the far left of all the tabs is a very small tab that only appears when you have two or more tabs open. Rather interesting feature.
Ravuya
Ravuya
Quote:
Original post by Promit
Heh.

I absolutely love that they had the foresight to actually make an API for working with DWM and doing stuff like this -- something that to my knowledge Apple and the XGL guys have not bothered to do for either OSX or Linux.

You can use Quartz Composer/Core Image to manipulate the window management inside your application and inside the window manager; Amit Singh has made a couple "wobbly window" plugins for OS X.

As for Xgl, Xgl is just the X server -- you can access it using GL/X11 calls like normal. The window managers that you run on top of Xgl (Compiz, Beryl) add stuff like wobbly windows, and Beryl has a pretty aggressive plugin architecture -- I've already replaced its default Expose clone feature with a different one. I never use Expose on my Mac -- according to capn_midnight I'm the only Mac user not to. [wow]
mutex
mutex
Quote:
Original post by Conner McCloud
That's really cool. I do kind of wonder, though, what benefit it would have beyond providing an Expose-like feature?

Any thoughts?

CM
I provided it as something people can play and experiment with. The experimentation bar is very low since all you need is Notepad and the C# compiler, both of which come with Vista. It definitely doesn't do much at the moment and is quite lacking in some areas (keyboard navigation is the big one), but hopefully it can inspire someone to do something really awesome and different.

Conner McCloud
Conner McCloud
Quote:
Original post by mutex
I provided it as something people can play and experiment with. The experimentation bar is very low since all you need is Notepad and the C# compiler, both of which come with Vista. It definitely doesn't do much at the moment and is quite lacking in some areas (keyboard navigation is the big one), but hopefully it can inspire someone to do something really awesome and different.

I didn't mean your program specifically, I meant the thumbnail feature in general. Apparently its got its own API, which is cool, but it seems like an API developed specifically for building an Expose-like program. So why didn't MS just make an Expose-like program?

That said, I did get one idea. It would probably greatly simplify things like overlaying your messenger app over top of a full screen game.

CM
Colin Jeanne
Colin Jeanne
Quote:
Original post by Conner McCloud
That's really cool. I do kind of wonder, though, what benefit it would have beyond providing an Expose-like feature?

Any thoughts?

CM

Alt-Tab has been updated to use the DWM, the new Win-Tab replacement is also made possible by the DWM, the taskbar has live preview thumbnails of its windows, etc. You could definitely imagine other non-Expose uses for the DWM API. In fact, while I was interning at MS they had me working with the DWM quite a bit.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.