Bug 16371

Summary: Implement additional mouse cursors for Gtk
Product: WebKit Reporter: Christian Dywan <christian>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major Keywords: Gtk
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Initial patch with several new cursors
none
Updated, using enums, a struct and correct hotspots now
alp: review-
Updated with ChangeLog alp: review+

Christian Dywan
Reported 2007-12-09 15:36:25 PST
There are several mouse cursors missing, ie. currently a default pointer is used for all unsupported cursors. The missing cursors that are not guaranteed to be available should have hardcoded defaults and allow for custom themed replacements.
Attachments
Initial patch with several new cursors (14.11 KB, patch)
2007-12-09 15:40 PST, Christian Dywan
no flags
Updated, using enums, a struct and correct hotspots now (14.78 KB, patch)
2007-12-10 03:49 PST, Christian Dywan
alp: review-
Updated with ChangeLog (16.37 KB, patch)
2007-12-11 03:28 PST, Christian Dywan
alp: review+
Christian Dywan
Comment 1 2007-12-09 15:40:54 PST
Created attachment 17810 [details] Initial patch with several new cursors This patch implements vertical-text, context-menu, copy, alias, zoom-in and zoom-out. These names are overridable by cursor themes. The hardcoded cursor images are taken from [1], so I added the original author to the copyright line. I hope that is appropriate. [1] http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h?raw=1
Christian Dywan
Comment 2 2007-12-10 03:49:11 PST
Created attachment 17817 [details] Updated, using enums, a struct and correct hotspots now
Alp Toker
Comment 3 2007-12-10 05:57:49 PST
Comment on attachment 17817 [details] Updated, using enums, a struct and correct hotspots now >-// FIXME: should find better GDK cursors for those than a generic GDK_LEFT_PTR >+static GdkCursor* custom_cursor_new(CustomCursorType cursorType) That can just be a TODO rather than a FIXME. The function should have a camelCase name since this is WebCore code. (The names of the moz_ variables don't matter so much, you can leave them as-is.) >+ > const Cursor& verticalTextCursor() > { >- return pointerCursor(); >+ static Cursor c = custom_cursor_new(CustomCursorVerticalText); > } This function is missing a 'return c;' Could you write a ChangeLog entry, including a mention of where the code was borrowed from? Thanks!
Christian Dywan
Comment 4 2007-12-11 03:28:02 PST
Created attachment 17842 [details] Updated with ChangeLog
Alp Toker
Comment 5 2007-12-11 05:17:43 PST
Comment on attachment 17842 [details] Updated with ChangeLog r=me Will remove the GLib use from the header file, remove the deprecated unref calls, fix a minor formatting issue (space missing in if statement), and constify fg and bg before landing. Thanks!
Alp Toker
Comment 6 2007-12-11 05:23:59 PST
Landed in r28613.
Note You need to log in before you can comment on or make changes to this bug.