interactive: subtle refactor to interactive_set_grab_context()

- Add `server` argument to `interactive_set_grab_context()` to clarify
  it updates something in `server`.
- Add `const` qualifier to `ctx` argument of
  `interactive_set_grab_context()` and `cursor_get_resize_edges()`
This commit is contained in:
tokyo4j 2026-02-24 16:05:30 +09:00 committed by Hiroaki Yamamoto
parent df73a97efa
commit 00f63622b5
5 changed files with 8 additions and 8 deletions

View file

@ -1268,7 +1268,7 @@ run_action(struct view *view, struct server *server, struct action *action,
* Move, set it now from current cursor position.
*/
if (view != server->seat.pressed.ctx.view) {
interactive_set_grab_context(ctx);
interactive_set_grab_context(server, ctx);
}
interactive_begin(view, LAB_INPUT_STATE_MOVE,
LAB_EDGE_NONE);
@ -1299,7 +1299,7 @@ run_action(struct view *view, struct server *server, struct action *action,
* Resize, set it now from current cursor position.
*/
if (view != server->seat.pressed.ctx.view) {
interactive_set_grab_context(ctx);
interactive_set_grab_context(server, ctx);
}
interactive_begin(view, LAB_INPUT_STATE_RESIZE,
resize_edges);