Billy Biggs ([info]vektor_sigma) wrote,

A brief history of left_ptr_watch

A while back I did some research into how to get an "APPSTARTING" cursor in Eclipse. That's the Windows name of the cursor with both an arrow and an hourglass, to indicate that something is running in the background, but you can still interact with the UI. While there is no standard X cursor for this, I noticed Mozilla had a nice themed one. I did some poking around to see how they got the themed cursor, but only found them sending a bitmap image of a simple X cursor with a watch beside it. ??

keithp let me in on some really sick magic. When he was writing the cursor theming code, he really wanted to theme the Mozilla cursor specifically. To do this, he designed a checksum system where every cursor sent to the X server would be checked against a list of known cursor hashes, and themed appropriately. He calculated the hash of the cursor Mozilla was sending and used that for the ID of the themed cursor "left_ptr_watch".

What this means for applications is that if you want that cursor, you must either use the Xcursor library (which you can't do as a GTK+ app, you must wait for GDK to support it), or copy Mozilla's bits. Ouch! What license is that cursor image under anyway?

To try and do this properly, I traced the image back to this Mozilla bug, where I discovered that it was originally designed by mpt. Today, I met up with mpt on IRC, and he agreed to post to the Mozilla bug clarifying the license of his cursor: public domain. So, at least now applications can have a "left_ptr_watch" cursor without feeling too bad about stealing those bits. :)

  • Post a new comment

    Error

  • 0 comments
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…