Commit fc160b2
Ryan Fields
Brings sf::Window getPosition and setPosition closer to parity on OS X.
The coordinate system transforation that occurs when dealing with window
positions on OS X requires (or at least warrants) some fuzzy logic in
dealing with getting and setting window positions. In any windowing
system, requesting a position should effectively yield the components
for an identity transform of the window's current position. In other
words, coordinates obtained by a call to getPosition should have no
impact in the window's position when immediately applied to setPosition.
This change brings getPosition and setPosition much closer to acheiving
that identity transform in the OS X implementation, correcting the error
in most cases, and producing far less unpredictable results in the cases
that remain affected.1 parent d648f76 commit fc160b2
File tree
3 files changed
+15
-6
lines changed- src/SFML/Window/OSX
3 files changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | | - | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
304 | 307 | | |
305 | | - | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | | - | |
| 314 | + | |
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments