mirror of
https://codeberg.org/vyivel/dulcepan/
synced 2025-03-12 10:49:15 +02:00
seat: use crosshair cursor when the whole output is selected
Closes: https://codeberg.org/vyivel/dulcepan/issues/19
This commit is contained in:
parent
7cc26b8e38
commit
0ccb868b39
@ -86,10 +86,10 @@ static const struct wl_keyboard_listener keyboard_listener = {
|
||||
static enum wp_cursor_shape_device_v1_shape get_cursor_shape(struct dp_selection *selection) {
|
||||
switch (selection->action) {
|
||||
case DP_SELECTION_ACTION_NONE:
|
||||
return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR;
|
||||
break;
|
||||
case DP_SELECTION_ACTION_RESIZING:
|
||||
if (selection->width == 0 || selection->height == 0) {
|
||||
return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR;
|
||||
break;
|
||||
}
|
||||
switch (selection->resize_edges) {
|
||||
case DP_EDGE_TOP:
|
||||
@ -116,11 +116,12 @@ static enum wp_cursor_shape_device_v1_shape get_cursor_shape(struct dp_selection
|
||||
selection->width == selection->output->effective_width &&
|
||||
selection->height == selection->output->effective_height) {
|
||||
// Moving is impossible
|
||||
return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT;
|
||||
break;
|
||||
}
|
||||
return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE;
|
||||
}
|
||||
abort(); // Unreachable
|
||||
// The default cursor
|
||||
return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR;
|
||||
}
|
||||
|
||||
static void update_cursor(struct dp_seat *seat) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user