Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/d9bd357802795ba3b30d280bafe2c66daa44be54
...commit
http://git.netsurf-browser.org/netsurf.git/commit/d9bd357802795ba3b30d280bafe2c66daa44be54
...tree
http://git.netsurf-browser.org/netsurf.git/tree/d9bd357802795ba3b30d280bafe2c66daa44be54
The branch, master has been updated
via d9bd357802795ba3b30d280bafe2c66daa44be54 (commit)
from 35fd2ad7f2f2a62624f1445e352c0aaf6ac0b0ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/d9bd357802795ba3b30d280bafe2c66daa44be54
commit d9bd357802795ba3b30d280bafe2c66daa44be54
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Move browser window related control over mouse pointer out of html content
handler.
diff --git a/desktop/browser.c b/desktop/browser.c
index 779f708..17e3561 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1924,14 +1924,29 @@ void browser_window_set_pointer(struct browser_window
*bw,
{
struct browser_window *root = browser_window_get_root(bw);
gui_pointer_shape gui_shape;
+ bool loading;
assert(root);
assert(root->window);
- if (shape == BROWSER_POINTER_AUTO) {
- gui_shape = GUI_POINTER_DEFAULT;
+ loading = (bw->loading_content != NULL || (bw->current_content &&
+ content_get_status(bw->current_content) ==
+ CONTENT_STATUS_READY));
+
+ if (wallclock() - bw->last_action < 100 && loading) {
+ /* If loading and less than 1 second since last link followed,
+ * force progress indicator pointer */
+ gui_shape = GUI_POINTER_PROGRESS;
+
+ } else if (shape == BROWSER_POINTER_AUTO) {
+ /* Up to browser window to decide */
+ if (loading)
+ gui_shape = GUI_POINTER_PROGRESS;
+ else
+ gui_shape = GUI_POINTER_DEFAULT;
} else {
+ /* Use what we were told */
gui_shape = (gui_pointer_shape)shape;
}
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 5ba286e..b4e2c04 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -731,19 +731,9 @@ browser_pointer_shape get_pointer_shape(struct
browser_window *bw, struct box *b
css_computed_style *style;
enum css_cursor_e cursor;
lwc_string **cursor_uris;
- bool loading;
assert(bw);
- loading = (bw->loading_content != NULL || (bw->current_content &&
- content_get_status(bw->current_content) ==
- CONTENT_STATUS_READY));
-
- if (wallclock() - bw->last_action < 100 && loading)
- /* If less than 1 second since last link followed, show
- * progress indicating pointer and we're loading something */
- return BROWSER_POINTER_PROGRESS;
-
if (box->type == BOX_FLOAT_LEFT || box->type == BOX_FLOAT_RIGHT)
style = box->children->style;
else
@@ -769,13 +759,8 @@ browser_pointer_shape get_pointer_shape(struct
browser_window *bw, struct box *b
/* text input */
pointer = BROWSER_POINTER_CARET;
} else {
- /* anything else */
- if (loading) {
- /* loading new content */
- pointer = BROWSER_POINTER_PROGRESS;
- } else {
- pointer = BROWSER_POINTER_DEFAULT;
- }
+ /* html content doesn't mind */
+ pointer = BROWSER_POINTER_AUTO;
}
break;
case CSS_CURSOR_CROSSHAIR:
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.c | 19 +++++++++++++++++--
render/html_interaction.c | 19 ++-----------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/desktop/browser.c b/desktop/browser.c
index 779f708..17e3561 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1924,14 +1924,29 @@ void browser_window_set_pointer(struct browser_window
*bw,
{
struct browser_window *root = browser_window_get_root(bw);
gui_pointer_shape gui_shape;
+ bool loading;
assert(root);
assert(root->window);
- if (shape == BROWSER_POINTER_AUTO) {
- gui_shape = GUI_POINTER_DEFAULT;
+ loading = (bw->loading_content != NULL || (bw->current_content &&
+ content_get_status(bw->current_content) ==
+ CONTENT_STATUS_READY));
+
+ if (wallclock() - bw->last_action < 100 && loading) {
+ /* If loading and less than 1 second since last link followed,
+ * force progress indicator pointer */
+ gui_shape = GUI_POINTER_PROGRESS;
+
+ } else if (shape == BROWSER_POINTER_AUTO) {
+ /* Up to browser window to decide */
+ if (loading)
+ gui_shape = GUI_POINTER_PROGRESS;
+ else
+ gui_shape = GUI_POINTER_DEFAULT;
} else {
+ /* Use what we were told */
gui_shape = (gui_pointer_shape)shape;
}
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 5ba286e..b4e2c04 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -731,19 +731,9 @@ browser_pointer_shape get_pointer_shape(struct
browser_window *bw, struct box *b
css_computed_style *style;
enum css_cursor_e cursor;
lwc_string **cursor_uris;
- bool loading;
assert(bw);
- loading = (bw->loading_content != NULL || (bw->current_content &&
- content_get_status(bw->current_content) ==
- CONTENT_STATUS_READY));
-
- if (wallclock() - bw->last_action < 100 && loading)
- /* If less than 1 second since last link followed, show
- * progress indicating pointer and we're loading something */
- return BROWSER_POINTER_PROGRESS;
-
if (box->type == BOX_FLOAT_LEFT || box->type == BOX_FLOAT_RIGHT)
style = box->children->style;
else
@@ -769,13 +759,8 @@ browser_pointer_shape get_pointer_shape(struct
browser_window *bw, struct box *b
/* text input */
pointer = BROWSER_POINTER_CARET;
} else {
- /* anything else */
- if (loading) {
- /* loading new content */
- pointer = BROWSER_POINTER_PROGRESS;
- } else {
- pointer = BROWSER_POINTER_DEFAULT;
- }
+ /* html content doesn't mind */
+ pointer = BROWSER_POINTER_AUTO;
}
break;
case CSS_CURSOR_CROSSHAIR:
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org