summaryrefslogtreecommitdiff
path: root/src/user/raleigh/window.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
commit920f1f010284d59bad86f78355ed90ac2f3e1d2c (patch)
tree19e2abcf6f546e251151582c700cfce312224eb1 /src/user/raleigh/window.cpp
parentaf52ddac750311ace3bd997245771b26119e1659 (diff)
downloadportland-os-920f1f010284d59bad86f78355ed90ac2f3e1d2c.tar.gz
mouse movement in raleigh, with colorpicker dragging example
Diffstat (limited to 'src/user/raleigh/window.cpp')
-rw-r--r--src/user/raleigh/window.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/user/raleigh/window.cpp b/src/user/raleigh/window.cpp
index 5d1a3de..cb9f363 100644
--- a/src/user/raleigh/window.cpp
+++ b/src/user/raleigh/window.cpp
@@ -57,6 +57,8 @@ namespace raleigh {
focussed->on_focus();
else if (wa.action_type == wa.FOCUS_LEAVE)
focussed->on_unfocus();
+ else if (wa.action_type == wa.MOUSE_MOVE)
+ root.on_mouse_move(coord(wa.moved_to.x, wa.moved_to.y));
}
}
@@ -78,6 +80,7 @@ namespace raleigh {
if (handle)
return;
handle = _new_window(size.x, size.y, pixbuf);
+ _wants_mouse_moves(handle);
if (!handle)
show_error_and_quitf("Failed to get window handle for requested window.");
open_windows.add_front(*this);