Changeset 90788 in webkit


Ignore:
Timestamp:
Jul 11, 2011 3:43:00 PM (13 years ago)
Author:
Martin Robinson
Message:

Reviewed by Daniel Bates.

[GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
https://bugs.webkit.org/show_bug.cgi?id=62752

Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
arguments to the GdkCursor constructor.

No new tests. This is covered by manual-tests/cursor.html.

  • platform/gtk/CursorGtk.cpp:

(WebCore::createNamedCursor):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90784 r90788  
     12011-07-11  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Daniel Bates.
     4
     5        [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
     6        https://bugs.webkit.org/show_bug.cgi?id=62752
     7
     8        Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
     9        arguments to the GdkCursor constructor.
     10
     11        No new tests. This is covered by manual-tests/cursor.html.
     12
     13        * platform/gtk/CursorGtk.cpp:
     14        (WebCore::createNamedCursor):
     15
    1162011-07-11  Yi Shen  <yi.4.shen@nokia.com>
    217
  • trunk/Source/WebCore/platform/gtk/CursorGtk.cpp

    r75009 r90788  
    5353    RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));
    5454
    55     cairo_set_source_surface(cr.get(), source.get(), cursor.hot_x, cursor.hot_y);
    56     cairo_mask_surface(cr.get(), mask.get(), cursor.hot_x, cursor.hot_y);
     55    cairo_set_source_surface(cr.get(), source.get(), 0, 0);
     56    cairo_mask_surface(cr.get(), mask.get(), 0, 0);
    5757
    5858    GRefPtr<GdkPixbuf> pixbuf = adoptGRef(gdk_pixbuf_get_from_surface(surface.get(), 0, 0, 32, 32));
    59     return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), 0, 0));
     59    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), cursor.hot_x, cursor.hot_y));
    6060}
    6161
Note: See TracChangeset for help on using the changeset viewer.