1
0
Fork 0
forked from wry/wry

wayland: implement wp_cursor_shap_manager_v1

This commit is contained in:
Julian Orth 2024-02-08 14:13:18 +01:00
parent af3b7b0868
commit 3acf0558a3
12 changed files with 452 additions and 60 deletions

View file

@ -577,7 +577,7 @@ impl ContainerNode {
if y < title_height + 1 {
KnownCursor::Default
} else {
KnownCursor::ResizeLeftRight
KnownCursor::EwResize
}
} else {
let mut cursor = KnownCursor::Default;
@ -585,7 +585,7 @@ impl ContainerNode {
let body = child.body.get();
if body.y1() > y {
if body.y1() - y > title_height + 1 {
cursor = KnownCursor::ResizeTopBottom
cursor = KnownCursor::NsResize
}
break;
}

View file

@ -320,14 +320,14 @@ impl FloatNode {
let op_type = OP_TYPES[id];
let new_cursor = match op_type {
OpType::Move => KnownCursor::Default,
OpType::ResizeLeft => KnownCursor::ResizeLeftRight,
OpType::ResizeTop => KnownCursor::ResizeTopBottom,
OpType::ResizeRight => KnownCursor::ResizeLeftRight,
OpType::ResizeBottom => KnownCursor::ResizeTopBottom,
OpType::ResizeTopLeft => KnownCursor::ResizeTopLeft,
OpType::ResizeTopRight => KnownCursor::ResizeTopRight,
OpType::ResizeBottomLeft => KnownCursor::ResizeBottomLeft,
OpType::ResizeBottomRight => KnownCursor::ResizeBottomRight,
OpType::ResizeLeft => KnownCursor::EwResize,
OpType::ResizeTop => KnownCursor::NsResize,
OpType::ResizeRight => KnownCursor::EwResize,
OpType::ResizeBottom => KnownCursor::NsResize,
OpType::ResizeTopLeft => KnownCursor::NwResize,
OpType::ResizeTopRight => KnownCursor::NeResize,
OpType::ResizeBottomLeft => KnownCursor::SwResize,
OpType::ResizeBottomRight => KnownCursor::SeResize,
};
seat_state.op_type = op_type;
if new_cursor != mem::replace(&mut seat_state.cursor, new_cursor) {