summaryrefslogtreecommitdiff
path: root/desktop/browser_private.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-03-03 14:30:39 +0000
committerVincent Sanders <vince@kyllikki.org>2017-03-03 14:45:39 +0000
commit0a8976156a037bc2ec2d4d10f33334ada36eac9d (patch)
tree77310971d9a2e93dd04903cef07067027bc25566 /desktop/browser_private.h
parent6083de4ee1370dbd483e489e4e63ec2a58becc71 (diff)
downloadnetsurf-0a8976156a037bc2ec2d4d10f33334ada36eac9d.tar.gz
netsurf-0a8976156a037bc2ec2d4d10f33334ada36eac9d.tar.bz2
split out browser window drag context into separate structure
Diffstat (limited to 'desktop/browser_private.h')
-rw-r--r--desktop/browser_private.h43
1 files changed, 26 insertions, 17 deletions
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index b8dce84bb..3e9b8467a 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -90,23 +90,32 @@ struct browser_window {
/** Fragment identifier for current_content. */
lwc_string *frag_id;
- /** Current drag status. */
- browser_drag_type drag_type;
-
- /** Current drag's browser window, when not in root bw. */
- struct browser_window *drag_window;
-
- /** Mouse position at start of current scroll drag. */
- int drag_start_x;
- int drag_start_y;
- /** Scroll offsets at start of current scroll draw. */
- int drag_start_scroll_x;
- int drag_start_scroll_y;
- /** Frame resize directions for current frame resize drag. */
- unsigned int drag_resize_left : 1;
- unsigned int drag_resize_right : 1;
- unsigned int drag_resize_up : 1;
- unsigned int drag_resize_down : 1;
+ /**
+ * Current drag status.
+ *
+ * These values are only vald whle type is not DRAGGING_NONE
+ */
+ struct {
+ /** the type of drag in progress */
+ browser_drag_type type;
+
+ /** Current drag's browser window, when not in root bw. */
+ struct browser_window *window;
+
+ /** Mouse position at start of current scroll drag. */
+ int start_x;
+ int start_y;
+
+ /** Scroll offsets at start of current scroll draw. */
+ int start_scroll_x;
+ int start_scroll_y;
+
+ /** Frame resize directions for current frame resize drag. */
+ unsigned int resize_left : 1;
+ unsigned int resize_right : 1;
+ unsigned int resize_up : 1;
+ unsigned int resize_down : 1;
+ } drag;
/** Current fetch is download */
bool download;