Cursor: lock to current geometry during move/resize
This eliminates cursor jitter entirely during interactive resize. This also fixes a bug where the xdg-toplevel resizing state was not cleared if a resize operation was aborted due to a change in view tags or similar.
This commit is contained in:
@ -493,6 +493,28 @@ pub fn applyPending(root: *Self) void {
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var it = server.input_manager.seats.first;
|
||||
while (it) |node| : (it = node.next) {
|
||||
const cursor = &node.data.cursor;
|
||||
|
||||
switch (cursor.mode) {
|
||||
.passthrough, .down => {},
|
||||
inline .move, .resize => |data| {
|
||||
if (data.view.inflight.output == null or
|
||||
data.view.inflight.tags & data.view.inflight.output.?.inflight.tags == 0 or
|
||||
(!data.view.inflight.float and data.view.inflight.output.?.layout != null) or
|
||||
data.view.inflight.fullscreen)
|
||||
{
|
||||
cursor.mode = .passthrough;
|
||||
data.view.pending.resizing = false;
|
||||
data.view.inflight.resizing = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (root.inflight_layout_demands == 0) {
|
||||
root.sendConfigures();
|
||||
}
|
||||
|
Reference in New Issue
Block a user