cocoa: Remove mouse event tap. It doesn't appear to work anymore, and was disabled by default anyhow, since the needed APIs are forbidden on the Mac App Store. A better solution to lock the mouse to the window on macOS would still be welcome. CGAssociateMouseAndMouseCursorPosition() works fine for relative mouse mode, this was just a question of SDL_SetWindowGrab(). As it stands now, a grabbed mouse can briefly break out of the window, causing varying degrees of chaos.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 694bfbd..47a36e1 100644
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -238,7 +238,6 @@
A75FCD8D23E25AB700529352 /* gl2platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72523E2513E00DCD162 /* gl2platform.h */; };
A75FCD8E23E25AB700529352 /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E51595D4D800BBD41B /* SDL_pixels.h */; settings = {ATTRIBUTES = (Public, ); }; };
A75FCD8F23E25AB700529352 /* vk_layer.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72D23E2513E00DCD162 /* vk_layer.h */; };
- A75FCD9023E25AB700529352 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
A75FCD9123E25AB700529352 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
A75FCD9223E25AB700529352 /* SDL_cocoametalview.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68623E2513E00DCD162 /* SDL_cocoametalview.h */; };
A75FCD9323E25AB700529352 /* SDL_cocoaopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */; };
@@ -347,7 +346,6 @@
A75FCDFE23E25AB700529352 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C823E2513E00DCD162 /* SDL_hidapi_xbox360w.c */; };
A75FCDFF23E25AB700529352 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57423E2513D00DCD162 /* SDL_atomic.c */; };
A75FCE0023E25AB700529352 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92D23E2514000DCD162 /* SDL_displayevents.c */; };
- A75FCE0123E25AB700529352 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
A75FCE0223E25AB700529352 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5DD23E2513D00DCD162 /* SDL_log.c */; };
A75FCE0323E25AB700529352 /* SDL_cocoaopengl.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */; };
A75FCE0423E25AB700529352 /* SDL_offscreenframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5F223E2513D00DCD162 /* SDL_offscreenframebuffer.c */; };
@@ -656,7 +654,6 @@
A75FCF4623E25AC700529352 /* gl2platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72523E2513E00DCD162 /* gl2platform.h */; };
A75FCF4723E25AC700529352 /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E51595D4D800BBD41B /* SDL_pixels.h */; settings = {ATTRIBUTES = (Public, ); }; };
A75FCF4823E25AC700529352 /* vk_layer.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72D23E2513E00DCD162 /* vk_layer.h */; };
- A75FCF4923E25AC700529352 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
A75FCF4A23E25AC700529352 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
A75FCF4B23E25AC700529352 /* SDL_cocoametalview.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68623E2513E00DCD162 /* SDL_cocoametalview.h */; };
A75FCF4C23E25AC700529352 /* SDL_cocoaopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */; };
@@ -765,7 +762,6 @@
A75FCFB723E25AC700529352 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C823E2513E00DCD162 /* SDL_hidapi_xbox360w.c */; };
A75FCFB823E25AC700529352 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57423E2513D00DCD162 /* SDL_atomic.c */; };
A75FCFB923E25AC700529352 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92D23E2514000DCD162 /* SDL_displayevents.c */; };
- A75FCFBA23E25AC700529352 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
A75FCFBB23E25AC700529352 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5DD23E2513D00DCD162 /* SDL_log.c */; };
A75FCFBC23E25AC700529352 /* SDL_cocoaopengl.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */; };
A75FCFBD23E25AC700529352 /* SDL_offscreenframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5F223E2513D00DCD162 /* SDL_offscreenframebuffer.c */; };
@@ -1111,7 +1107,6 @@
A769B11223E259AE00872273 /* SDL_cocoavulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68F23E2513E00DCD162 /* SDL_cocoavulkan.h */; };
A769B11323E259AE00872273 /* gl2platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72523E2513E00DCD162 /* gl2platform.h */; };
A769B11523E259AE00872273 /* vk_layer.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72D23E2513E00DCD162 /* vk_layer.h */; };
- A769B11723E259AE00872273 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
A769B11823E259AE00872273 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
A769B11A23E259AE00872273 /* SDL_cocoametalview.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68623E2513E00DCD162 /* SDL_cocoametalview.h */; };
A769B11B23E259AE00872273 /* SDL_cocoaopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */; };
@@ -1196,7 +1191,6 @@
A769B18723E259AE00872273 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C823E2513E00DCD162 /* SDL_hidapi_xbox360w.c */; };
A769B18823E259AE00872273 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57423E2513D00DCD162 /* SDL_atomic.c */; };
A769B18923E259AE00872273 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92D23E2514000DCD162 /* SDL_displayevents.c */; };
- A769B18A23E259AE00872273 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
A769B18B23E259AE00872273 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5DD23E2513D00DCD162 /* SDL_log.c */; };
A769B18C23E259AE00872273 /* SDL_cocoaopengl.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */; };
A769B18D23E259AE00872273 /* SDL_offscreenframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5F223E2513D00DCD162 /* SDL_offscreenframebuffer.c */; };
@@ -2062,12 +2056,6 @@
A7D8AEBB23E2514100DCD162 /* SDL_cocoamouse.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68723E2513E00DCD162 /* SDL_cocoamouse.m */; };
A7D8AEBC23E2514100DCD162 /* SDL_cocoamouse.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68723E2513E00DCD162 /* SDL_cocoamouse.m */; };
A7D8AEBD23E2514100DCD162 /* SDL_cocoamouse.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68723E2513E00DCD162 /* SDL_cocoamouse.m */; };
- A7D8AEBE23E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
- A7D8AEBF23E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
- A7D8AEC023E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
- A7D8AEC123E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
- A7D8AEC223E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
- A7D8AEC323E2514100DCD162 /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */; };
A7D8AEC423E2514100DCD162 /* SDL_cocoaevents.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68923E2513E00DCD162 /* SDL_cocoaevents.m */; };
A7D8AEC523E2514100DCD162 /* SDL_cocoaevents.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68923E2513E00DCD162 /* SDL_cocoaevents.m */; };
A7D8AEC623E2514100DCD162 /* SDL_cocoaevents.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68923E2513E00DCD162 /* SDL_cocoaevents.m */; };
@@ -2152,12 +2140,6 @@
A7D8AF1523E2514100DCD162 /* SDL_cocoaevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69623E2513E00DCD162 /* SDL_cocoaevents.h */; };
A7D8AF1623E2514100DCD162 /* SDL_cocoaevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69623E2513E00DCD162 /* SDL_cocoaevents.h */; };
A7D8AF1723E2514100DCD162 /* SDL_cocoaevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69623E2513E00DCD162 /* SDL_cocoaevents.h */; };
- A7D8AF1823E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
- A7D8AF1923E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
- A7D8AF1A23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
- A7D8AF1B23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
- A7D8AF1C23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
- A7D8AF1D23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */; };
A7D8AF1E23E2514100DCD162 /* SDL_cocoamouse.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69823E2513E00DCD162 /* SDL_cocoamouse.h */; };
A7D8AF1F23E2514100DCD162 /* SDL_cocoamouse.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69823E2513E00DCD162 /* SDL_cocoamouse.h */; };
A7D8AF2023E2514100DCD162 /* SDL_cocoamouse.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69823E2513E00DCD162 /* SDL_cocoamouse.h */; };
@@ -4051,7 +4033,6 @@
A7D8A68523E2513E00DCD162 /* SDL_cocoavideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoavideo.m; sourceTree = "<group>"; };
A7D8A68623E2513E00DCD162 /* SDL_cocoametalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoametalview.h; sourceTree = "<group>"; };
A7D8A68723E2513E00DCD162 /* SDL_cocoamouse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamouse.m; sourceTree = "<group>"; };
- A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoamousetap.h; sourceTree = "<group>"; };
A7D8A68923E2513E00DCD162 /* SDL_cocoaevents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoaevents.m; sourceTree = "<group>"; };
A7D8A68A23E2513E00DCD162 /* SDL_cocoaclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoaclipboard.h; sourceTree = "<group>"; };
A7D8A68B23E2513E00DCD162 /* SDL_cocoamessagebox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamessagebox.m; sourceTree = "<group>"; };
@@ -4066,7 +4047,6 @@
A7D8A69423E2513E00DCD162 /* SDL_cocoamessagebox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoamessagebox.h; sourceTree = "<group>"; };
A7D8A69523E2513E00DCD162 /* SDL_cocoaclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoaclipboard.m; sourceTree = "<group>"; };
A7D8A69623E2513E00DCD162 /* SDL_cocoaevents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoaevents.h; sourceTree = "<group>"; };
- A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamousetap.m; sourceTree = "<group>"; };
A7D8A69823E2513E00DCD162 /* SDL_cocoamouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoamouse.h; sourceTree = "<group>"; };
A7D8A69923E2513E00DCD162 /* SDL_cocoametalview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoametalview.m; sourceTree = "<group>"; };
A7D8A6B623E2513E00DCD162 /* SDL_egl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_egl.c; sourceTree = "<group>"; };
@@ -5082,8 +5062,6 @@
A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */,
A7D8A69823E2513E00DCD162 /* SDL_cocoamouse.h */,
A7D8A68723E2513E00DCD162 /* SDL_cocoamouse.m */,
- A7D8A68823E2513E00DCD162 /* SDL_cocoamousetap.h */,
- A7D8A69723E2513E00DCD162 /* SDL_cocoamousetap.m */,
A7D8A68D23E2513E00DCD162 /* SDL_cocoaopengl.h */,
A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */,
A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */,
@@ -5828,7 +5806,6 @@
A75FCD8D23E25AB700529352 /* gl2platform.h in Headers */,
A75FCD8E23E25AB700529352 /* SDL_pixels.h in Headers */,
A75FCD8F23E25AB700529352 /* vk_layer.h in Headers */,
- A75FCD9023E25AB700529352 /* SDL_cocoamousetap.h in Headers */,
A75FCD9123E25AB700529352 /* vk_platform.h in Headers */,
A75FCD9223E25AB700529352 /* SDL_cocoametalview.h in Headers */,
A75FCD9323E25AB700529352 /* SDL_cocoaopengles.h in Headers */,
@@ -6071,7 +6048,6 @@
A75FCF4623E25AC700529352 /* gl2platform.h in Headers */,
A75FCF4723E25AC700529352 /* SDL_pixels.h in Headers */,
A75FCF4823E25AC700529352 /* vk_layer.h in Headers */,
- A75FCF4923E25AC700529352 /* SDL_cocoamousetap.h in Headers */,
A75FCF4A23E25AC700529352 /* vk_platform.h in Headers */,
A75FCF4B23E25AC700529352 /* SDL_cocoametalview.h in Headers */,
A75FCF4C23E25AC700529352 /* SDL_cocoaopengles.h in Headers */,
@@ -6303,7 +6279,6 @@
A769B11223E259AE00872273 /* SDL_cocoavulkan.h in Headers */,
A769B11323E259AE00872273 /* gl2platform.h in Headers */,
A769B11523E259AE00872273 /* vk_layer.h in Headers */,
- A769B11723E259AE00872273 /* SDL_cocoamousetap.h in Headers */,
A769B11823E259AE00872273 /* vk_platform.h in Headers */,
A769B11A23E259AE00872273 /* SDL_cocoametalview.h in Headers */,
A769B11B23E259AE00872273 /* SDL_cocoaopengles.h in Headers */,
@@ -6399,7 +6374,6 @@
A7D8AEB323E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
A7D8AEF523E2514100DCD162 /* SDL_cocoamodes.h in Headers */,
A7D8AF1F23E2514100DCD162 /* SDL_cocoamouse.h in Headers */,
- A7D8AEBF23E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8AEDD23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */,
A7D8AEEF23E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
A7D8AE8323E2514100DCD162 /* SDL_cocoashape.h in Headers */,
@@ -6647,7 +6621,6 @@
A7D8AEB423E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
A7D8AEF623E2514100DCD162 /* SDL_cocoamodes.h in Headers */,
A7D8AF2023E2514100DCD162 /* SDL_cocoamouse.h in Headers */,
- A7D8AEC023E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8AEDE23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */,
A7D8AEF023E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
A7D8AE8423E2514100DCD162 /* SDL_cocoashape.h in Headers */,
@@ -6983,7 +6956,6 @@
A7D8AEEC23E2514100DCD162 /* SDL_cocoavulkan.h in Headers */,
A7D8B23423E2514200DCD162 /* gl2platform.h in Headers */,
A7D8B25223E2514200DCD162 /* vk_layer.h in Headers */,
- A7D8AEC223E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8B26A23E2514200DCD162 /* vk_platform.h in Headers */,
A7D8AEB623E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
A7D8AEF223E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
@@ -7079,7 +7051,6 @@
A7D8AEB223E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
A7D8AEF423E2514100DCD162 /* SDL_cocoamodes.h in Headers */,
A7D8AF1E23E2514100DCD162 /* SDL_cocoamouse.h in Headers */,
- A7D8AEBE23E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8AEDC23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */,
A7D8AEEE23E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
A7D8AE8223E2514100DCD162 /* SDL_cocoashape.h in Headers */,
@@ -7410,7 +7381,6 @@
A7D8AEEB23E2514100DCD162 /* SDL_cocoavulkan.h in Headers */,
A7D8B23323E2514200DCD162 /* gl2platform.h in Headers */,
A7D8B25123E2514200DCD162 /* vk_layer.h in Headers */,
- A7D8AEC123E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8B26923E2514200DCD162 /* vk_platform.h in Headers */,
A7D8BBF323E2574800DCD162 /* SDL_uikitmessagebox.h in Headers */,
A7D8AEB523E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
@@ -7632,7 +7602,6 @@
A7D8B23523E2514200DCD162 /* gl2platform.h in Headers */,
DB313FE517554B71006C0E22 /* SDL_pixels.h in Headers */,
A7D8B25323E2514200DCD162 /* vk_layer.h in Headers */,
- A7D8AEC323E2514100DCD162 /* SDL_cocoamousetap.h in Headers */,
A7D8B26B23E2514200DCD162 /* vk_platform.h in Headers */,
A7D8AEB723E2514100DCD162 /* SDL_cocoametalview.h in Headers */,
A7D8AEF323E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
@@ -8181,7 +8150,6 @@
A75FCDFE23E25AB700529352 /* SDL_hidapi_xbox360w.c in Sources */,
A75FCDFF23E25AB700529352 /* SDL_atomic.c in Sources */,
A75FCE0023E25AB700529352 /* SDL_displayevents.c in Sources */,
- A75FCE0123E25AB700529352 /* SDL_cocoamousetap.m in Sources */,
A75FCE0223E25AB700529352 /* SDL_log.c in Sources */,
A75FCE0323E25AB700529352 /* SDL_cocoaopengl.m in Sources */,
A75FCE0423E25AB700529352 /* SDL_offscreenframebuffer.c in Sources */,
@@ -8383,7 +8351,6 @@
A75FCFB723E25AC700529352 /* SDL_hidapi_xbox360w.c in Sources */,
A75FCFB823E25AC700529352 /* SDL_atomic.c in Sources */,
A75FCFB923E25AC700529352 /* SDL_displayevents.c in Sources */,
- A75FCFBA23E25AC700529352 /* SDL_cocoamousetap.m in Sources */,
A75FCFBB23E25AC700529352 /* SDL_log.c in Sources */,
A75FCFBC23E25AC700529352 /* SDL_cocoaopengl.m in Sources */,
A75FCFBD23E25AC700529352 /* SDL_offscreenframebuffer.c in Sources */,
@@ -8606,7 +8573,6 @@
A769B18723E259AE00872273 /* SDL_hidapi_xbox360w.c in Sources */,
A769B18823E259AE00872273 /* SDL_atomic.c in Sources */,
A769B18923E259AE00872273 /* SDL_displayevents.c in Sources */,
- A769B18A23E259AE00872273 /* SDL_cocoamousetap.m in Sources */,
A769B18B23E259AE00872273 /* SDL_log.c in Sources */,
A769B18C23E259AE00872273 /* SDL_cocoaopengl.m in Sources */,
A769B18D23E259AE00872273 /* SDL_offscreenframebuffer.c in Sources */,
@@ -8810,7 +8776,6 @@
A7D8B55E23E2514300DCD162 /* SDL_hidapi_xbox360w.c in Sources */,
A7D8A95823E2514000DCD162 /* SDL_atomic.c in Sources */,
A7D8BB2823E2514500DCD162 /* SDL_displayevents.c in Sources */,
- A7D8AF1923E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2623E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8923E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7423E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
@@ -9012,7 +8977,6 @@
A7D8B55F23E2514300DCD162 /* SDL_hidapi_xbox360w.c in Sources */,
A7D8A95923E2514000DCD162 /* SDL_atomic.c in Sources */,
A7D8BB2923E2514500DCD162 /* SDL_displayevents.c in Sources */,
- A7D8AF1A23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2723E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8A23E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7523E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
@@ -9213,7 +9177,6 @@
A7D8B56123E2514300DCD162 /* SDL_hidapi_xbox360w.c in Sources */,
A7D8A95B23E2514000DCD162 /* SDL_atomic.c in Sources */,
A7D8BB2B23E2514500DCD162 /* SDL_displayevents.c in Sources */,
- A7D8AF1C23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2923E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8C23E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7723E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
@@ -9419,7 +9382,6 @@
A7D8A95723E2514000DCD162 /* SDL_atomic.c in Sources */,
A75FDBCE23EA380300529352 /* SDL_hidapi_rumble.c in Sources */,
A7D8BB2723E2514500DCD162 /* SDL_displayevents.c in Sources */,
- A7D8AF1823E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2523E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8823E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7323E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
@@ -9621,7 +9583,6 @@
A75FDBD123EA380300529352 /* SDL_hidapi_rumble.c in Sources */,
A7D8BB2A23E2514500DCD162 /* SDL_displayevents.c in Sources */,
A7D8BBFC23E2574800DCD162 /* SDL_uikitopenglview.m in Sources */,
- A7D8AF1B23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2823E2514100DCD162 /* SDL_log.c in Sources */,
A7D8BC0223E2574800DCD162 /* SDL_uikitviewcontroller.m in Sources */,
A7D8AE8B23E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
@@ -9822,7 +9783,6 @@
A7D8A95C23E2514000DCD162 /* SDL_atomic.c in Sources */,
A75FDBD423EA380300529352 /* SDL_hidapi_rumble.c in Sources */,
A7D8BB2C23E2514500DCD162 /* SDL_displayevents.c in Sources */,
- A7D8AF1D23E2514100DCD162 /* SDL_cocoamousetap.m in Sources */,
A7D8AB2A23E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8D23E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7823E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
diff --git a/src/video/cocoa/SDL_cocoamouse.h b/src/video/cocoa/SDL_cocoamouse.h
index 8bd6aca..7d81904 100644
--- a/src/video/cocoa/SDL_cocoamouse.h
+++ b/src/video/cocoa/SDL_cocoamouse.h
@@ -40,7 +40,6 @@ typedef struct {
/* What location we last saw the cursor move to. */
CGFloat lastMoveX;
CGFloat lastMoveY;
- void *tapdata;
} SDL_MouseData;
@interface NSCursor (InvisibleCursor)
diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index 2166aa4..b6942af 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -24,7 +24,6 @@
#include "SDL_events.h"
#include "SDL_cocoamouse.h"
-#include "SDL_cocoamousetap.h"
#include "SDL_cocoavideo.h"
#include "../../events/SDL_mouse_c.h"
@@ -348,8 +347,6 @@ Cocoa_InitMouse(_THIS)
SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
- Cocoa_InitMouseEventTap(driverdata);
-
const NSPoint location = [NSEvent mouseLocation];
driverdata->lastMoveX = location.x;
driverdata->lastMoveY = location.y;
@@ -467,8 +464,6 @@ Cocoa_QuitMouse(_THIS)
SDL_Mouse *mouse = SDL_GetMouse();
if (mouse) {
if (mouse->driverdata) {
- Cocoa_QuitMouseEventTap(((SDL_MouseData*)mouse->driverdata));
-
SDL_free(mouse->driverdata);
mouse->driverdata = NULL;
}
diff --git a/src/video/cocoa/SDL_cocoamousetap.h b/src/video/cocoa/SDL_cocoamousetap.h
deleted file mode 100644
index 1327751..0000000
--- a/src/video/cocoa/SDL_cocoamousetap.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef SDL_cocoamousetap_h_
-#define SDL_cocoamousetap_h_
-
-#include "SDL_cocoamouse.h"
-
-extern void Cocoa_InitMouseEventTap(SDL_MouseData *driverdata);
-extern void Cocoa_EnableMouseEventTap(SDL_MouseData *driverdata, SDL_bool enabled);
-extern void Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata);
-
-#endif /* SDL_cocoamousetap_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/cocoa/SDL_cocoamousetap.m b/src/video/cocoa/SDL_cocoamousetap.m
deleted file mode 100644
index f1ed18a..0000000
--- a/src/video/cocoa/SDL_cocoamousetap.m
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_COCOA
-
-#include "SDL_cocoamousetap.h"
-
-/* Event taps are forbidden in the Mac App Store, so we can only enable this
- * code if your app doesn't need to ship through the app store.
- * This code makes it so that a grabbed cursor cannot "leak" a mouse click
- * past the edge of the window if moving the cursor too fast.
- */
-#if SDL_MAC_NO_SANDBOX
-
-#include "SDL_keyboard.h"
-#include "SDL_cocoavideo.h"
-#include "../../thread/SDL_systhread.h"
-
-#include "../../events/SDL_mouse_c.h"
-
-typedef struct {
- CFMachPortRef tap;
- CFRunLoopRef runloop;
- CFRunLoopSourceRef runloopSource;
- SDL_Thread *thread;
- SDL_sem *runloopStartedSemaphore;
-} SDL_MouseEventTapData;
-
-static const CGEventMask movementEventsMask =
- CGEventMaskBit(kCGEventLeftMouseDragged)
- | CGEventMaskBit(kCGEventRightMouseDragged)
- | CGEventMaskBit(kCGEventMouseMoved);
-
-static const CGEventMask allGrabbedEventsMask =
- CGEventMaskBit(kCGEventLeftMouseDown) | CGEventMaskBit(kCGEventLeftMouseUp)
- | CGEventMaskBit(kCGEventRightMouseDown) | CGEventMaskBit(kCGEventRightMouseUp)
- | CGEventMaskBit(kCGEventOtherMouseDown) | CGEventMaskBit(kCGEventOtherMouseUp)
- | CGEventMaskBit(kCGEventLeftMouseDragged) | CGEventMaskBit(kCGEventRightMouseDragged)
- | CGEventMaskBit(kCGEventMouseMoved);
-
-static CGEventRef
-Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon)
-{
- SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)refcon;
- SDL_Mouse *mouse = SDL_GetMouse();
- SDL_Window *window = SDL_GetKeyboardFocus();
- NSWindow *nswindow;
- NSRect windowRect;
- CGPoint eventLocation;
-
- switch (type) {
- case kCGEventTapDisabledByTimeout:
- {
- CGEventTapEnable(tapdata->tap, true);
- return NULL;
- }
- case kCGEventTapDisabledByUserInput:
- {
- return NULL;
- }
- default:
- break;
- }
-
-
- if (!window || !mouse) {
- return event;
- }
-
- if (mouse->relative_mode) {
- return event;
- }
-
- if (!(window->flags & SDL_WINDOW_MOUSE_GRABBED)) {
- return event;
- }
-
- /* This is the same coordinate system as Cocoa uses. */
- nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
- eventLocation = CGEventGetUnflippedLocation(event);
- windowRect = [nswindow contentRectForFrameRect:[nswindow frame]];
-
- if (!NSMouseInRect(NSPointFromCGPoint(eventLocation), windowRect, NO)) {
-
- /* This is in CGs global screenspace coordinate system, which has a
- * flipped Y.
- */
- CGPoint newLocation = CGEventGetLocation(event);
-
- if (eventLocation.x < NSMinX(windowRect)) {
- newLocation.x = NSMinX(windowRect);
- } else if (eventLocation.x >= NSMaxX(windowRect)) {
- newLocation.x = NSMaxX(windowRect) - 1.0;
- }
-
- if (eventLocation.y <= NSMinY(windowRect)) {
- newLocation.y -= (NSMinY(windowRect) - eventLocation.y + 1);
- } else if (eventLocation.y > NSMaxY(windowRect)) {
- newLocation.y += (eventLocation.y - NSMaxY(windowRect));
- }
-
- CGWarpMouseCursorPosition(newLocation);
- CGAssociateMouseAndMouseCursorPosition(YES);
-
- if ((CGEventMaskBit(type) & movementEventsMask) == 0) {
- /* For click events, we just constrain the event to the window, so
- * no other app receives the click event. We can't due the same to
- * movement events, since they mean that our warp cursor above
- * behaves strangely.
- */
- CGEventSetLocation(event, newLocation);
- }
- }
-
- return event;
-}
-
-static void
-SemaphorePostCallback(CFRunLoopTimerRef timer, void *info)
-{
- SDL_SemPost((SDL_sem*)info);
-}
-
-static int
-Cocoa_MouseTapThread(void *data)
-{
- SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)data;
-
- /* Tap was created on main thread but we own it now. */
- CFMachPortRef eventTap = tapdata->tap;
- if (eventTap) {
- /* Try to create a runloop source we can schedule. */
- CFRunLoopSourceRef runloopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0);
- if (runloopSource) {
- tapdata->runloopSource = runloopSource;
- } else {
- CFRelease(eventTap);
- SDL_SemPost(tapdata->runloopStartedSemaphore);
- /* TODO: Both here and in the return below, set some state in
- * tapdata to indicate that initialization failed, which we should
- * check in InitMouseEventTap, after we move the semaphore check
- * from Quit to Init.
- */
- return 1;
- }
- } else {
- SDL_SemPost(tapdata->runloopStartedSemaphore);
- return 1;
- }
-
- tapdata->runloop = CFRunLoopGetCurrent();
- CFRunLoopAddSource(tapdata->runloop, tapdata->runloopSource, kCFRunLoopCommonModes);
- CFRunLoopTimerContext context = {.info = tapdata->runloopStartedSemaphore};
- /* We signal the runloop started semaphore *after* the run loop has started, indicating it's safe to CFRunLoopStop it. */
- CFRunLoopTimerRef timer = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent(), 0, 0, 0, &SemaphorePostCallback, &context);
- CFRunLoopAddTimer(tapdata->runloop, timer, kCFRunLoopCommonModes);
- CFRelease(timer);
-
- /* Run the event loop to handle events in the event tap. */
- CFRunLoopRun();
- /* Make sure this is signaled so that SDL_QuitMouseEventTap knows it can safely SDL_WaitThread for us. */
- if (SDL_SemValue(tapdata->runloopStartedSemaphore) < 1) {
- SDL_SemPost(tapdata->runloopStartedSemaphore);
- }
- CFRunLoopRemoveSource(tapdata->runloop, tapdata->runloopSource, kCFRunLoopCommonModes);
-
- /* Clean up. */
- CGEventTapEnable(tapdata->tap, false);
- CFRelease(tapdata->runloopSource);
- CFRelease(tapdata->tap);
- tapdata->runloopSource = NULL;
- tapdata->tap = NULL;
-
- return 0;
-}
-
-void
-Cocoa_InitMouseEventTap(SDL_MouseData* driverdata)
-{
- SDL_MouseEventTapData *tapdata;
- driverdata->tapdata = SDL_calloc(1, sizeof(SDL_MouseEventTapData));
- tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
-
- tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0);
- if (tapdata->runloopStartedSemaphore) {
- tapdata->tap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap,
- kCGEventTapOptionDefault, allGrabbedEventsMask,
- &Cocoa_MouseTapCallback, tapdata);
- if (tapdata->tap) {
- /* Tap starts disabled, until app requests mouse grab */
- CGEventTapEnable(tapdata->tap, false);
- tapdata->thread = SDL_CreateThreadInternal(&Cocoa_MouseTapThread, "Event Tap Loop", 512 * 1024, tapdata);
- if (tapdata->thread) {
- /* Success - early out. Ownership transferred to thread. */
- return;
- }
- CFRelease(tapdata->tap);
- }
- SDL_DestroySemaphore(tapdata->runloopStartedSemaphore);
- }
- SDL_free(driverdata->tapdata);
- driverdata->tapdata = NULL;
-}
-
-void
-Cocoa_EnableMouseEventTap(SDL_MouseData *driverdata, SDL_bool enabled)
-{
- SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
- if (tapdata && tapdata->tap)
- {
- CGEventTapEnable(tapdata->tap, !!enabled);
- }
-}
-
-void
-Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata)
-{
- SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
- int status;
-
- if (tapdata == NULL) {
- /* event tap was already cleaned up (possibly due to CGEventTapCreate
- * returning null.)
- */
- return;
- }
-
- /* Ensure that the runloop has been started first.
- * TODO: Move this to InitMouseEventTap, check for error conditions that can
- * happen in Cocoa_MouseTapThread, and fall back to the non-EventTap way of
- * grabbing the mouse if it fails to Init.
- */
- status = SDL_SemWaitTimeout(tapdata->runloopStartedSemaphore, 5000);
- if (status > -1) {
- /* Then stop it, which will cause Cocoa_MouseTapThread to return. */
- CFRunLoopStop(tapdata->runloop);
- /* And then wait for Cocoa_MouseTapThread to finish cleaning up. It
- * releases some of the pointers in tapdata. */
- SDL_WaitThread(tapdata->thread, &status);
- }
-
- SDL_free(driverdata->tapdata);
- driverdata->tapdata = NULL;
-}
-
-#else /* SDL_MAC_NO_SANDBOX */
-
-void
-Cocoa_InitMouseEventTap(SDL_MouseData *unused)
-{
-}
-
-void
-Cocoa_EnableMouseEventTap(SDL_MouseData *driverdata, SDL_bool enabled)
-{
-}
-
-void
-Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata)
-{
-}
-
-#endif /* !SDL_MAC_NO_SANDBOX */
-
-#endif /* SDL_VIDEO_DRIVER_COCOA */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 49bdfe8..fa19aa6 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -38,7 +38,6 @@
#include "SDL_cocoavideo.h"
#include "SDL_cocoashape.h"
#include "SDL_cocoamouse.h"
-#include "SDL_cocoamousetap.h"
#include "SDL_cocoaopengl.h"
#include "SDL_cocoaopengles.h"
@@ -1122,13 +1121,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
y = window->h - 1;
}
-#if !SDL_MAC_NO_SANDBOX
CGPoint cgpoint;
-
- /* When SDL_MAC_NO_SANDBOX is set, this is handled by
- * SDL_cocoamousetap.m.
- */
-
cgpoint.x = window->x + x;
cgpoint.y = window->y + y;
@@ -1136,7 +1129,6 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
CGAssociateMouseAndMouseCursorPosition(YES);
Cocoa_HandleMouseWarp(cgpoint.x, cgpoint.y);
-#endif
}
}
@@ -1972,12 +1964,8 @@ Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
void
Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
- SDL_Mouse *mouse = SDL_GetMouse();
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
- /* Enable or disable the event tap as necessary */
- Cocoa_EnableMouseEventTap(mouse->driverdata, grabbed);
-
/* Move the cursor to the nearest point in the window */
if (grabbed && data && ![data->listener isMoving]) {
int x, y;