… | |
… | |
1281 | { |
1281 | { |
1282 | int button_number, state = 0; |
1282 | int button_number, state = 0; |
1283 | int x, y; |
1283 | int x, y; |
1284 | bool release = ev.type == ButtonRelease; |
1284 | bool release = ev.type == ButtonRelease; |
1285 | |
1285 | |
1286 | x = Pixel2Col (ev.x) + 1; |
1286 | x = 1 + clamp (Pixel2Col (ev.x), 0, ncol - 1); |
1287 | y = Pixel2Row (ev.y) + 1; |
1287 | y = 1 + clamp (Pixel2Row (ev.y), 0, nrow - 1); |
1288 | |
1288 | |
1289 | if (ev.type == MotionNotify) |
1289 | if (ev.type == MotionNotify) |
1290 | { |
1290 | { |
1291 | if (x == mouse_row && y == mouse_col) |
1291 | if (x == mouse_row && y == mouse_col) |
1292 | return; |
1292 | return; |