Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2011-03-15 Martin Robinson <mrobinson@igalia.com>
        Reviewed by Adam Barth.

        [GTK] [WebKit2] The UIProcess never changes the mouse cursor
        https://bugs.webkit.org/show_bug.cgi?id=56333

        Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
        the cursor to change as the user mouses around the page. There is currently
        no test infrastructure to track cursor changes.

        * UIProcess/gtk/WebView.cpp:
        (WebKit::WebView::setCursor): Ported implementation from WebKit1.

Canonical link: https://commits.webkit.org/71017@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mrobinson committed Mar 15, 2011
1 parent 2bf398f commit 6476d05
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
14 changes: 14 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
2011-03-15 Martin Robinson <mrobinson@igalia.com>

Reviewed by Adam Barth.

[GTK] [WebKit2] The UIProcess never changes the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=56333

Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
the cursor to change as the user mouses around the page. There is currently
no test infrastructure to track cursor changes.

* UIProcess/gtk/WebView.cpp:
(WebKit::WebView::setCursor): Ported implementation from WebKit1.

2011-03-15 Kevin Ollivier <kevino@theolliviers.com>

Reviewed by Darin Adler.
Expand Down
14 changes: 11 additions & 3 deletions Source/WebKit2/UIProcess/gtk/WebView.cpp
Expand Up @@ -194,9 +194,17 @@ void WebView::toolTipChanged(const String&, const String&)
notImplemented();
}

void WebView::setCursor(const Cursor&)
{
notImplemented();
void WebView::setCursor(const Cursor& cursor)
{
// [GTK] Widget::setCursor() gets called frequently
// http://bugs.webkit.org/show_bug.cgi?id=16388
// Setting the cursor may be an expensive operation in some backends,
// so don't re-set the cursor if it's already set to the target value.
GdkWindow* window = gtk_widget_get_window(m_viewWidget);
GdkCursor* currentCursor = gdk_window_get_cursor(window);
GdkCursor* newCursor = cursor.platformCursor().get();
if (currentCursor != newCursor)
gdk_window_set_cursor(window, newCursor);
}

void WebView::setViewportArguments(const WebCore::ViewportArguments&)
Expand Down

0 comments on commit 6476d05

Please sign in to comment.