RESOLVED FIXED157794
[GTK] Clean up CursorGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=157794
Summary [GTK] Clean up CursorGtk.cpp
Michael Catanzaro
Reported 2016-05-17 08:07:23 PDT
We use GdkCursorType extensively in CursorGtk.cpp, but GTK+ does not support this anymore and they're only sure to work under X11. Instead, use supported CSS cursor names. Also, we have a bunch of custom cursors copied from Firefox. Each of these cursors is nowadays guaranteed to be provided by GTK+, so we don't need any of these anymore.
Attachments
Patch (33.10 KB, patch)
2016-05-17 08:13 PDT, Michael Catanzaro
no flags
Patch (31.73 KB, patch)
2016-08-16 05:50 PDT, Michael Catanzaro
no flags
Patch (31.73 KB, patch)
2016-08-16 06:01 PDT, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2016-05-17 08:13:04 PDT
Darin Adler
Comment 2 2016-05-23 23:03:56 PDT
Comment on attachment 279124 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279124&action=review > Source/WebCore/platform/gtk/CursorGtk.cpp:49 > +typedef struct { > + const char* name; > + const unsigned char* bits; > + const unsigned char* mask_bits; > + int hot_x; > + int hot_y; > +} CustomCursor; Where is this used?
Michael Catanzaro
Comment 3 2016-05-25 08:08:48 PDT
(In reply to comment #2) > Where is this used? Nowhere :)
Carlos Garcia Campos
Comment 4 2016-05-27 03:34:12 PDT
Comment on attachment 279124 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279124&action=review > Source/WebCore/platform/gtk/CursorGtk.cpp:73 > - m_platformCursor = adoptGRef(gdk_cursor_new(GDK_CROSS)); > + m_platformCursor = adoptGRef(gdk_cursor_new_from_name(gdk_display_get_default(), "crosshair")); Maybe we can leave the createNamedCursor helper, but receiving a const char* instead and simply calling gdk_cursor_new_from_name for the default display.
Michael Catanzaro
Comment 5 2016-08-16 02:17:45 PDT
Hm, forgot about this. It should hopefully fix a strange bug we have where our mouse cursor sometimes turns into a crap X11 fallback cursor when hovering over links in Wayland. It's because we set the cursor to GDK_HAND2, which is not supported anymore. (In reply to comment #2) > Comment on attachment 279124 [details] > Where is this used? I'll delete it, good catch. (In reply to comment #4) > Maybe we can leave the createNamedCursor helper, but receiving a const char* > instead and simply calling gdk_cursor_new_from_name for the default display. OK.
Michael Catanzaro
Comment 6 2016-08-16 05:50:26 PDT
Michael Catanzaro
Comment 7 2016-08-16 06:01:04 PDT
WebKit Commit Bot
Comment 8 2016-08-21 03:57:12 PDT
Comment on attachment 286173 [details] Patch Clearing flags on attachment: 286173 Committed r204691: <http://trac.webkit.org/changeset/204691>
WebKit Commit Bot
Comment 9 2016-08-21 03:57:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.