Bug 15795 - [GTK] Change the mouse pointer state to busy while loading a page
Summary: [GTK] Change the mouse pointer state to busy while loading a page
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Linux
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: Gtk
: 16205 26579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-02 07:59 PDT by Salvatore De Paolis
Modified: 2015-05-07 16:18 PDT (History)
9 users (show)

See Also:


Attachments
useloadingcursor.diff (4.93 KB, patch)
2008-02-02 15:58 PST, Xan Lopez
no flags Details | Formatted Diff | Diff
Patch (1.94 KB, patch)
2014-02-27 03:11 PST, Diego Pino
pnormand: review-
pnormand: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore De Paolis 2007-11-02 07:59:26 PDT
It would be nice if the webkit_open_page could set the mouse pointer to busy while loading a page.
Comment 1 Jan Alonzo 2007-12-01 00:59:58 PST
This is a duplicate of bug http://bugs.webkit.org/show_bug.cgi?id=16205
Comment 2 Mark Rowe (bdash) 2007-12-01 01:08:49 PST
*** Bug 16205 has been marked as a duplicate of this bug. ***
Comment 3 Xan Lopez 2008-01-22 10:48:05 PST
So, bdash told me yesterday that WebKit does not do this (and has never done it). If it should be done on Application side this bug should be closed as INVALID/WONTFIX.
Comment 4 Christian Dywan 2008-01-23 01:44:48 PST
Unlike for example gtkmozembed WebKit does not normally apply a loading pointer on its own. In many non-browser use cases this is the desired behavior. Instead you should make use of gdk_window_set_cursor in a "load-progress-changed" callback.
Comment 5 Xan Lopez 2008-01-26 08:34:07 PST
BTW: while I don't have anything against doing this in app-side, we need some API hooks to do it correctly I think. Unconditionally setting cursor on load-progress-changed is wrong: if you are hovering a link, for example, the cursor should remain as a "hand" all the time, but we'd switch it to a "watch/wait" when the next progress-change happens.A signal would a good way of doing this, but any other way would do.

Or if anybody knows how Safari or other WebKit browser handles this, that might help too :)
Comment 6 Alp Toker 2008-02-02 14:21:35 PST
Yeah, I think it's OK for us to support this in WebCore directly, though it might be worth providing a way to turn it off.

Xan, can you try adding a setPointerCursor() (or maybe pushPointerCursor()/pop if you're feeling elaborate) to Cursor.h? Then we can just call this from somewhere doing the loading.
Comment 7 Xan Lopez 2008-02-02 15:58:36 PST
Created attachment 18875 [details]
useloadingcursor.diff

Quick and dirty patch.

- I'm using just a bool value in CursorGtk to decide if I return pointerCursor or waitCursor in the pointerCursor function. I think this is good enough? The static variable might be anathema in C++, maybe we can replace it with some class variable or something...?

- Might want to cache the value of the setting in FrameLoaderClientGtk and connect to notify::use-loading-cursor to update the value.

Tested this with Epiphany, it works ok.
Comment 8 Jan Alonzo 2009-06-20 19:36:18 PDT
*** Bug 26579 has been marked as a duplicate of this bug. ***
Comment 9 Evan Martin 2010-01-10 19:24:49 PST
Found this old bug.  In Chrome we have to do some work to get the cursor+hourglass cursor that Firefox (and now Chrome) uses.  You can take a glance through the Chrome cursor code to see how it works.  (It's pretty hacky.)
Comment 10 Diego Pino 2014-02-27 03:11:46 PST
Created attachment 225352 [details]
Patch
Comment 11 Philippe Normand 2014-03-16 03:58:07 PDT
Comment on attachment 225352 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=225352&action=review

> Tools/MiniBrowser/gtk/BrowserWindow.c:485
> +    GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(window->webView));

We use camelCase here, I think. So, gdkWindow ?

> Tools/MiniBrowser/gtk/BrowserWindow.c:493
> +        gdk_window_set_cursor(gdk_window, lastCursor);

I suppose it's alright to not check lastCursor is non-null here, right? Passing NULL means use the cursor of the parent window.
Comment 12 Martin Robinson 2015-05-07 16:18:20 PDT
Pretty sure we don't want this ATM.