mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Rename <snapping><dragResistance> to <resistance><unSnapThreshold>
As we already have <resistance><{screen,window}EdgeStrength>,
<resistance> will be a better place for this setting.
This commit is contained in:
parent
dc387f7765
commit
670cc0f511
7 changed files with 16 additions and 16 deletions
|
|
@ -38,7 +38,7 @@ interactive_move_tiled_view_to(struct server *server, struct view *view,
|
|||
{
|
||||
assert(!view_is_floating(view));
|
||||
|
||||
int resistance = rc.snap_drag_resistance;
|
||||
int threshold = rc.unsnap_threshold;
|
||||
|
||||
if (server->input_mode == LAB_INPUT_STATE_MOVE) {
|
||||
/* When called from cursor motion handler */
|
||||
|
|
@ -46,12 +46,12 @@ interactive_move_tiled_view_to(struct server *server, struct view *view,
|
|||
|
||||
double dx = server->seat.cursor->x - server->grab_x;
|
||||
double dy = server->seat.cursor->y - server->grab_y;
|
||||
if (dx * dx + dy * dy < resistance * resistance) {
|
||||
if (dx * dx + dy * dy < threshold * threshold) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
/* When called from interactive_begin() */
|
||||
if (resistance > 0) {
|
||||
if (threshold > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges)
|
|||
}
|
||||
|
||||
/*
|
||||
* If <snapping><dragResistance> is non-zero, the
|
||||
* If <resistance><unSnapThreshold> is non-zero, the
|
||||
* tiled/maximized view is un-tiled later in cursor
|
||||
* motion handler.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue