mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
cursor: Add struct cursor_context and clean up code
v2: - Add surface to cursor_context, rename c -> ctx - Factor out determine_resize_edges()
This commit is contained in:
parent
89890b6be9
commit
429c388333
4 changed files with 125 additions and 185 deletions
|
|
@ -275,7 +275,7 @@ actions_run(struct view *activator, struct server *server,
|
|||
}
|
||||
break;
|
||||
case ACTION_TYPE_FOCUS:
|
||||
view = desktop_view_at_cursor(server);
|
||||
view = get_cursor_context(server).view;
|
||||
if (view) {
|
||||
desktop_focus_and_activate_view(&server->seat, view);
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ actions_run(struct view *activator, struct server *server,
|
|||
}
|
||||
break;
|
||||
case ACTION_TYPE_MOVE:
|
||||
view = desktop_view_at_cursor(server);
|
||||
view = get_cursor_context(server).view;
|
||||
if (view) {
|
||||
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ actions_run(struct view *activator, struct server *server,
|
|||
}
|
||||
break;
|
||||
case ACTION_TYPE_RESIZE:
|
||||
view = desktop_view_at_cursor(server);
|
||||
view = get_cursor_context(server).view;
|
||||
if (view) {
|
||||
interactive_begin(view, LAB_INPUT_STATE_RESIZE,
|
||||
resize_edges);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue