mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: precision warn fix
This commit is contained in:
parent
3305875781
commit
bb4a202ae3
1 changed files with 3 additions and 3 deletions
|
|
@ -2172,12 +2172,12 @@ void place_drag_tile_client(Client *c) {
|
||||||
Client *closest_client = NULL;
|
Client *closest_client = NULL;
|
||||||
long min_distant = LONG_MAX;
|
long min_distant = LONG_MAX;
|
||||||
long temp_distant;
|
long temp_distant;
|
||||||
unsigned int x, y;
|
int x, y;
|
||||||
|
|
||||||
wl_list_for_each(tc, &clients, link) {
|
wl_list_for_each(tc, &clients, link) {
|
||||||
if (tc != c && ISTILED(tc) && VISIBLEON(tc, c->mon)) {
|
if (tc != c && ISTILED(tc) && VISIBLEON(tc, c->mon)) {
|
||||||
x = tc->geom.x + tc->geom.width / 2 - cursor->x;
|
x = tc->geom.x + (int)(tc->geom.width / 2) - cursor->x;
|
||||||
y = tc->geom.y + tc->geom.height / 2 - cursor->y;
|
y = tc->geom.y + (int)(tc->geom.height / 2) - cursor->y;
|
||||||
temp_distant = x * x + y * y;
|
temp_distant = x * x + y * y;
|
||||||
if (temp_distant < min_distant) {
|
if (temp_distant < min_distant) {
|
||||||
min_distant = temp_distant;
|
min_distant = temp_distant;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue