Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/36d30565262631c3d053f1f1e6ef8c783c62e906
...commit
http://git.netsurf-browser.org/netsurf.git/commit/36d30565262631c3d053f1f1e6ef8c783c62e906
...tree
http://git.netsurf-browser.org/netsurf.git/tree/36d30565262631c3d053f1f1e6ef8c783c62e906
The branch, master has been updated
via 36d30565262631c3d053f1f1e6ef8c783c62e906 (commit)
from de8af23956cdf63bd82384f8cf629dfb1d79db8b (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/36d30565262631c3d053f1f1e6ef8c783c62e906
commit 36d30565262631c3d053f1f1e6ef8c783c62e906
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Grab pointer during drag.
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 062f765..dfbaa26 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -91,6 +91,7 @@ static struct gui_drag {
int button;
int x;
int y;
+ bool grabbed_pointer;
} gui_drag;
@@ -652,6 +653,13 @@ fb_browser_window_click(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
case NSFB_KEY_MOUSE_1:
if (gui_drag.state == GUI_DRAG_DRAG) {
/* End of a drag, rather than click */
+
+ if (gui_drag.grabbed_pointer) {
+ /* need to ungrab pointer */
+ fbtk_tgrab_pointer(widget);
+ gui_drag.grabbed_pointer = false;
+ }
+
gui_drag.state = GUI_DRAG_NONE;
/* Tell core */
@@ -670,6 +678,12 @@ fb_browser_window_click(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
/* End of a drag, rather than click */
gui_drag.state = GUI_DRAG_NONE;
+ if (gui_drag.grabbed_pointer) {
+ /* need to ungrab pointer */
+ fbtk_tgrab_pointer(widget);
+ gui_drag.grabbed_pointer = false;
+ }
+
/* Tell core */
browser_window_mouse_track(gw->bw, 0, x, y);
break;
@@ -717,6 +731,7 @@ fb_browser_window_move(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
BROWSER_MOUSE_DRAG_2,
gui_drag.x, gui_drag.y);
}
+ gui_drag.grabbed_pointer = fbtk_tgrab_pointer(widget);
gui_drag.state = GUI_DRAG_DRAG;
}
-----------------------------------------------------------------------
Summary of changes:
framebuffer/gui.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 062f765..dfbaa26 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -91,6 +91,7 @@ static struct gui_drag {
int button;
int x;
int y;
+ bool grabbed_pointer;
} gui_drag;
@@ -652,6 +653,13 @@ fb_browser_window_click(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
case NSFB_KEY_MOUSE_1:
if (gui_drag.state == GUI_DRAG_DRAG) {
/* End of a drag, rather than click */
+
+ if (gui_drag.grabbed_pointer) {
+ /* need to ungrab pointer */
+ fbtk_tgrab_pointer(widget);
+ gui_drag.grabbed_pointer = false;
+ }
+
gui_drag.state = GUI_DRAG_NONE;
/* Tell core */
@@ -670,6 +678,12 @@ fb_browser_window_click(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
/* End of a drag, rather than click */
gui_drag.state = GUI_DRAG_NONE;
+ if (gui_drag.grabbed_pointer) {
+ /* need to ungrab pointer */
+ fbtk_tgrab_pointer(widget);
+ gui_drag.grabbed_pointer = false;
+ }
+
/* Tell core */
browser_window_mouse_track(gw->bw, 0, x, y);
break;
@@ -717,6 +731,7 @@ fb_browser_window_move(fbtk_widget_t *widget,
fbtk_callback_info *cbi)
BROWSER_MOUSE_DRAG_2,
gui_drag.x, gui_drag.y);
}
+ gui_drag.grabbed_pointer = fbtk_tgrab_pointer(widget);
gui_drag.state = GUI_DRAG_DRAG;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org