mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
default view moving shouldn't clamp to the visible area
This commit is contained in:
parent
746ec6ba6f
commit
36afbe0832
1 changed files with 5 additions and 2 deletions
|
|
@ -89,8 +89,11 @@ pub fn processCursorMotion(self: *Cursor, time_msec: u32) void {
|
||||||
|
|
||||||
if(focused_view) |view| {
|
if(focused_view) |view| {
|
||||||
view.scene_tree.node.setPosition(
|
view.scene_tree.node.setPosition(
|
||||||
std.math.clamp(@as(c_int, @intFromFloat(self.wlr_cursor.x)) - self.drag_view_offset_x, 0, std.math.maxInt(u32)),
|
// TODO: add a lua option to configure the behavior of this, by
|
||||||
std.math.clamp(@as(c_int, @intFromFloat(self.wlr_cursor.y)) - self.drag_view_offset_y, 0, std.math.maxInt(u32))
|
// default it will be the following:
|
||||||
|
@as(c_int, @intFromFloat(self.wlr_cursor.x)) - self.drag_view_offset_x,
|
||||||
|
@as(c_int, @intFromFloat(self.wlr_cursor.y)) - self.drag_view_offset_y
|
||||||
|
// and the user should be able to configure if it clamps or not
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue