x11: Remove XVidMode and Xinerama support. Fixes #1782.
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 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ede1a4c..76978aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -423,7 +423,7 @@ set_option(SDL_RPATH "Use an rpath when linking SDL" ${UNIX_SYS})
set_option(SDL_CLOCK_GETTIME "Use clock_gettime() instead of gettimeofday()" ${UNIX_SYS})
set_option(SDL_X11 "Use X11 video driver" ${UNIX_SYS})
dep_option(SDL_X11_SHARED "Dynamically load X11 support" ON "SDL_X11" OFF)
-set(SDL_X11_OPTIONS Xcursor Xdbe Xinerama XInput Xfixes Xrandr Xscrnsaver XShape Xvm)
+set(SDL_X11_OPTIONS Xcursor Xdbe XInput Xfixes Xrandr Xscrnsaver XShape)
foreach(_SUB ${SDL_X11_OPTIONS})
string(TOUPPER "SDL_X11_${_SUB}" _OPT)
dep_option(${_OPT} "Enable ${_SUB} support" ON "SDL_X11" OFF)
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 8dcb392..c7b4b88 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -393,7 +393,7 @@ endmacro()
# - HAVE_SDL_LOADSO opt
macro(CheckX11)
if(SDL_X11)
- foreach(_LIB X11 Xext Xcursor Xinerama Xi Xfixes Xrandr Xrender Xss Xxf86vm)
+ foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
FindLibraryAndSONAME("${_LIB}")
endforeach()
@@ -415,7 +415,6 @@ macro(CheckX11)
endif()
check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
- check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H_)
@@ -423,7 +422,6 @@ macro(CheckX11)
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
check_include_files("X11/Xlib.h;X11/extensions/Xdbe.h" HAVE_XDBE_H)
- check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
if(X11_LIB)
@@ -504,16 +502,6 @@ macro(CheckX11)
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
endif()
- if(SDL_X11_XINERAMA AND HAVE_XINERAMA_H)
- set(HAVE_X11_XINERAMA TRUE)
- if(HAVE_X11_SHARED AND XINERAMA_LIB)
- set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "\"${XINERAMA_LIB_SONAME}\"")
- else()
- list(APPEND EXTRA_LIBS ${XINERAMA_LIB})
- endif()
- set(SDL_VIDEO_DRIVER_X11_XINERAMA 1)
- endif()
-
if(SDL_X11_XINPUT AND HAVE_XINPUT2_H)
set(HAVE_X11_XINPUT TRUE)
if(HAVE_X11_SHARED AND XI_LIB)
@@ -584,16 +572,6 @@ macro(CheckX11)
set(HAVE_X11_XSHAPE TRUE)
endif()
- if(SDL_X11_XVM AND HAVE_XF86VM_H)
- if(HAVE_X11_SHARED AND XXF86VM_LIB)
- set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "\"${XXF86VM_LIB_SONAME}\"")
- else()
- list(APPEND EXTRA_LIBS ${XXF86VM_LIB})
- endif()
- set(SDL_VIDEO_DRIVER_X11_XVIDMODE 1)
- set(HAVE_X11_XVM TRUE)
- endif()
-
set(CMAKE_REQUIRED_LIBRARIES)
endif()
endif()
diff --git a/configure b/configure
index 947d643..c85144b 100755
--- a/configure
+++ b/configure
@@ -878,13 +878,11 @@ with_x
enable_x11_shared
enable_video_x11_xcursor
enable_video_x11_xdbe
-enable_video_x11_xinerama
enable_video_x11_xinput
enable_video_x11_xfixes
enable_video_x11_xrandr
enable_video_x11_scrnsaver
enable_video_x11_xshape
-enable_video_x11_vm
enable_video_vivante
enable_video_cocoa
enable_video_metal
@@ -1668,8 +1666,6 @@ Optional Features:
--enable-video-x11-xcursor
enable X11 Xcursor support [default=yes]
--enable-video-x11-xdbe enable X11 Xdbe support [default=yes]
- --enable-video-x11-xinerama
- enable X11 Xinerama support [default=yes]
--enable-video-x11-xinput
enable X11 XInput extension for manymouse, tablets,
etc [default=yes]
@@ -1682,7 +1678,6 @@ Optional Features:
enable X11 screensaver extension [default=yes]
--enable-video-x11-xshape
enable X11 XShape support [default=yes]
- --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]
--enable-video-vivante use Vivante EGL video driver [default=yes]
--enable-video-cocoa use Cocoa video driver [default=yes]
--enable-video-metal include Metal support [default=yes]
@@ -21741,37 +21736,31 @@ fi
x11_lib='/opt/X11/lib/libX11.6.dylib'
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
- xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
xinput_lib='/opt/X11/lib/libXi.6.dylib'
xfixes_lib='/opt/X11/lib/libXfixes.3.dylib'
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
xss_lib='/opt/X11/lib/libXss.1.dylib'
- xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
;;
*-*-openbsd*)
x11_lib='libX11.so'
x11ext_lib='libXext.so'
xcursor_lib='libXcursor.so'
- xinerama_lib='libXinerama.so'
xinput_lib='libXi.so'
xfixes_lib='libXfixes.so'
xrandr_lib='libXrandr.so'
xrender_lib='libXrender.so'
xss_lib='libXss.so'
- xvidmode_lib='libXxf86vm.so'
;;
*)
x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xcursor_lib=`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
- xinerama_lib=`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xfixes_lib=`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrender_lib=`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xss_lib=`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
- xvidmode_lib=`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
;;
esac
@@ -22023,88 +22012,6 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XDBE 1" >>confdefs.h
SUMMARY_video_x11="${SUMMARY_video_x11} xdbe"
fi
fi
- # Check whether --enable-video-x11-xinerama was given.
-if test "${enable_video_x11_xinerama+set}" = set; then :
- enableval=$enable_video_x11_xinerama;
-else
- enable_video_x11_xinerama=yes
-fi
-
- if test x$enable_video_x11_xinerama = xyes; then
- definitely_enable_video_x11_xinerama=no
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
-
-"
-if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
- have_xinerama_h_hdr=yes
-else
- have_xinerama_h_hdr=no
-fi
-
-
- if test x$have_xinerama_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
- echo "-- dynamic libXinerama -> $xinerama_lib"
-
-cat >>confdefs.h <<_ACEOF
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "$xinerama_lib"
-_ACEOF
-
- definitely_enable_video_x11_xinerama=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
-$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
-if ${ac_cv_lib_Xinerama_XineramaQueryExtension+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXinerama $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XineramaQueryExtension ();
-int
-main ()
-{
-return XineramaQueryExtension ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xinerama_XineramaQueryExtension=yes
-else
- ac_cv_lib_Xinerama_XineramaQueryExtension=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
-$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = xyes; then :
- have_xinerama_lib=yes
-fi
-
- if test x$have_xinerama_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
- definitely_enable_video_x11_xinerama=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xinerama = xyes; then
-
-$as_echo "#define SDL_VIDEO_DRIVER_X11_XINERAMA 1" >>confdefs.h
-
- SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
- fi
# Check whether --enable-video-x11-xinput was given.
if test "${enable_video_x11_xinput+set}" = set; then :
enableval=$enable_video_x11_xinput;
@@ -22517,88 +22424,6 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XSHAPE 1" >>confdefs.h
SUMMARY_video_x11="${SUMMARY_video_x11} xshape"
fi
fi
- # Check whether --enable-video-x11-vm was given.
-if test "${enable_video_x11_vm+set}" = set; then :
- enableval=$enable_video_x11_vm;
-else
- enable_video_x11_vm=yes
-fi
-
- if test x$enable_video_x11_vm = xyes; then
- definitely_enable_video_x11_vm=no
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
-
-"
-if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
- have_vm_h_hdr=yes
-else
- have_vm_h_hdr=no
-fi
-
-
- if test x$have_vm_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
- echo "-- dynamic libXxf86vm -> $xvidmode_lib"
-
-cat >>confdefs.h <<_ACEOF
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "$xvidmode_lib"
-_ACEOF
-
- definitely_enable_video_x11_vm=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeQueryVersion in -lXxf86vm" >&5
-$as_echo_n "checking for XF86VidModeQueryVersion in -lXxf86vm... " >&6; }
-if ${ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXxf86vm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XF86VidModeQueryVersion ();
-int
-main ()
-{
-return XF86VidModeQueryVersion ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=yes
-else
- ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&5
-$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&6; }
-if test "x$ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" = xyes; then :
- have_vm_lib=yes
-fi
-
- if test x$have_vm_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
- definitely_enable_video_x11_vm=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_vm = xyes; then
-
-$as_echo "#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1" >>confdefs.h
-
- SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
- fi
fi
fi
if test x$have_x != xyes; then
diff --git a/configure.ac b/configure.ac
index 8bc4194..128e991 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1768,37 +1768,31 @@ CheckX11()
x11_lib='/opt/X11/lib/libX11.6.dylib'
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
- xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
xinput_lib='/opt/X11/lib/libXi.6.dylib'
xfixes_lib='/opt/X11/lib/libXfixes.3.dylib'
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
xss_lib='/opt/X11/lib/libXss.1.dylib'
- xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
;;
*-*-openbsd*)
x11_lib='libX11.so'
x11ext_lib='libXext.so'
xcursor_lib='libXcursor.so'
- xinerama_lib='libXinerama.so'
xinput_lib='libXi.so'
xfixes_lib='libXfixes.so'
xrandr_lib='libXrandr.so'
xrender_lib='libXrender.so'
xss_lib='libXss.so'
- xvidmode_lib='libXxf86vm.so'
;;
*)
x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
;;
esac
@@ -1910,34 +1904,6 @@ XFreeEventData(display, cookie);
SUMMARY_video_x11="${SUMMARY_video_x11} xdbe"
fi
fi
- AC_ARG_ENABLE(video-x11-xinerama,
-[AS_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [default=yes]])],
- , enable_video_x11_xinerama=yes)
- if test x$enable_video_x11_xinerama = xyes; then
- definitely_enable_video_x11_xinerama=no
- AC_CHECK_HEADER(X11/extensions/Xinerama.h,
- have_xinerama_h_hdr=yes,
- have_xinerama_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_xinerama_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
- echo "-- dynamic libXinerama -> $xinerama_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib", [ ])
- definitely_enable_video_x11_xinerama=yes
- else
- AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
- if test x$have_xinerama_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
- definitely_enable_video_x11_xinerama=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xinerama = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
- fi
AC_ARG_ENABLE(video-x11-xinput,
[AS_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [default=yes]])],
, enable_video_x11_xinput=yes)
@@ -2087,34 +2053,6 @@ dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that
SUMMARY_video_x11="${SUMMARY_video_x11} xshape"
fi
fi
- AC_ARG_ENABLE(video-x11-vm,
-[AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [default=yes]])],
- , enable_video_x11_vm=yes)
- if test x$enable_video_x11_vm = xyes; then
- definitely_enable_video_x11_vm=no
- AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
- have_vm_h_hdr=yes,
- have_vm_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_vm_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
- echo "-- dynamic libXxf86vm -> $xvidmode_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib", [ ])
- definitely_enable_video_x11_vm=yes
- else
- AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
- if test x$have_vm_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
- definitely_enable_video_x11_vm=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_vm = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
- fi
fi
fi
if test x$have_x != xyes; then
diff --git a/docs/README-linux.md b/docs/README-linux.md
index 9c1b0c4..2bce34d 100644
--- a/docs/README-linux.md
+++ b/docs/README-linux.md
@@ -3,8 +3,8 @@ Linux
By default SDL will only link against glibc, the rest of the features will be
enabled dynamically at runtime depending on the available features on the target
-system. So, for example if you built SDL with Xinerama support and the target
-system does not have the Xinerama libraries installed, it will be disabled
+system. So, for example if you built SDL with XRandR support and the target
+system does not have the XRandR libraries installed, it will be disabled
at runtime, and you won't get a missing library error, at least with the
default configuration parameters.
@@ -17,7 +17,7 @@ Ubuntu 20.04, all available features enabled:
sudo apt-get install build-essential git make cmake autoconf automake \
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
- libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
+ libxss-dev libgl1-mesa-dev libdbus-1-dev \
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
libxkbcommon-dev libdrm-dev libgbm-dev
@@ -27,12 +27,11 @@ Fedora 35, all available features enabled:
sudo yum install gcc git-core make cmake autoconf automake libtool \
alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
- libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
- dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
- libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
- wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
- libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
- libsamplerate-devel
+ libXi-devel libXScrnSaver-devel dbus-devel ibus-devel fcitx-devel \
+ systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel
+ mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel
+ libdrm-devel mesa-libgbm-devel libusb-devel libdecor-devel \
+ libsamplerate-devel pipewire-jack-audio-connection-kit-devel \
NOTES:
- This includes all the audio targets except arts and esd, because Ubuntu
diff --git a/docs/README-raspberrypi.md b/docs/README-raspberrypi.md
index 556b9f8..d2eddb8 100644
--- a/docs/README-raspberrypi.md
+++ b/docs/README-raspberrypi.md
@@ -63,7 +63,7 @@ Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
sudo chroot $SYSROOT
- apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev
+ apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
exit
sudo umount $SYSROOT/dev
sudo umount $SYSROOT/proc
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 7743335..8445ac2 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -421,22 +421,18 @@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
-#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES @SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
-#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@
-#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
#cmakedefine SDL_VIDEO_DRIVER_X11_XFIXES @SDL_VIDEO_DRIVER_X11_XFIXES@
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
-#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
#cmakedefine SDL_VIDEO_DRIVER_VITA @SDL_VIDEO_DRIVER_VITA@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 51cadae..97b6e14 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -388,22 +388,18 @@
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
-#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
-#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
#undef SDL_VIDEO_DRIVER_X11_XDBE
-#undef SDL_VIDEO_DRIVER_X11_XINERAMA
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
#undef SDL_VIDEO_DRIVER_X11_XFIXES
#undef SDL_VIDEO_DRIVER_X11_XRANDR
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
-#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
#undef SDL_VIDEO_DRIVER_NACL
diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h
index 1c9698a..f752a7b 100644
--- a/include/SDL_config_macosx.h
+++ b/include/SDL_config_macosx.h
@@ -186,17 +186,13 @@
#undef SDL_VIDEO_DRIVER_X11
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
#ifdef MAC_OS_X_VERSION_10_8
diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index ea819c8..03bbb57 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -1590,13 +1590,11 @@ extern "C" {
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
/**
- * \brief A variable controlling whether the X11 Xinerama extension should be used.
+ * \brief A no-longer-used variable controlling whether the X11 Xinerama extension should be used.
*
- * This variable can be set to the following values:
- * "0" - Disable Xinerama
- * "1" - Enable Xinerama
- *
- * By default SDL will use Xinerama if it is available.
+ * Before SDL 2.0.24, this would let apps and users disable Xinerama support on X11.
+ * Now SDL never uses Xinerama, and does not check for this hint at all.
+ * The preprocessor define is left here for source compatibility.
*/
#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
@@ -1607,18 +1605,16 @@ extern "C" {
* "0" - Disable XRandR
* "1" - Enable XRandR
*
- * By default SDL will not use XRandR because of window manager issues.
+ * By default SDL will use XRandR.
*/
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
/**
- * \brief A variable controlling whether the X11 VidMode extension should be used.
- *
- * This variable can be set to the following values:
- * "0" - Disable XVidMode
- * "1" - Enable XVidMode
+ * \brief A no-longer-used variable controlling whether the X11 VidMode extension should be used.
*
- * By default SDL will use XVidMode if it is available.
+ * Before SDL 2.0.24, this would let apps and users disable XVidMode support on X11.
+ * Now SDL never uses XVidMode, and does not check for this hint at all.
+ * The preprocessor define is left here for source compatibility.
*/
#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c
index 29a8186..4bfef21 100644
--- a/src/video/x11/SDL_x11dyn.c
+++ b/src/video/x11/SDL_x11dyn.c
@@ -47,9 +47,6 @@ typedef struct
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR NULL
#endif
-#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA NULL
-#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 NULL
#endif
@@ -62,20 +59,15 @@ typedef struct
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS NULL
#endif
-#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE NULL
-#endif
static x11dynlib x11libs[] = {
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR},
- {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR},
- {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS},
- {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE}
+ {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS}
};
static void *
diff --git a/src/video/x11/SDL_x11dyn.h b/src/video/x11/SDL_x11dyn.h
index c2678bf..feac35f 100644
--- a/src/video/x11/SDL_x11dyn.h
+++ b/src/video/x11/SDL_x11dyn.h
@@ -52,9 +52,6 @@
#if SDL_VIDEO_DRIVER_X11_XDBE
#include <X11/extensions/Xdbe.h>
#endif
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
-#include <X11/extensions/Xinerama.h>
-#endif
#if SDL_VIDEO_DRIVER_X11_XINPUT2
#include <X11/extensions/XInput2.h>
#endif
@@ -70,9 +67,6 @@
#if SDL_VIDEO_DRIVER_X11_XSHAPE
#include <X11/extensions/shape.h>
#endif
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
-#include <X11/extensions/xf86vmode.h>
-#endif
#ifdef __cplusplus
extern "C"
diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index f2cbdb4..fd4bd58 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -148,62 +148,6 @@ X11_GetPixelFormatFromVisualInfo(Display * display, XVisualInfo * vinfo)
return SDL_PIXELFORMAT_UNKNOWN;
}
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
-static SDL_bool
-CheckXinerama(Display * display, int *major, int *minor)
-{
- int event_base = 0;
- int error_base = 0;
-
- /* Default the extension not available */
- *major = *minor = 0;
-
- /* Allow environment override */
- if (!SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_XINERAMA, SDL_TRUE)) {
-#ifdef X11MODES_DEBUG
- printf("Xinerama disabled due to hint\n");
-#endif
- return SDL_FALSE;
- }
-
- if (!SDL_X11_HAVE_XINERAMA) {
-#ifdef X11MODES_DEBUG
- printf("Xinerama support not available\n");
-#endif
- return SDL_FALSE;
- }
-
- /* Query the extension version */
- if (!X11_XineramaQueryExtension(display, &event_base, &error_base) ||
- !X11_XineramaQueryVersion(display, major, minor) ||
- !X11_XineramaIsActive(display)) {
-#ifdef X11MODES_DEBUG
- printf("Xinerama not active on the display\n");
-#endif
- return SDL_FALSE;
- }
-#ifdef X11MODES_DEBUG
- printf("Xinerama available at version %d.%d!\n", *major, *minor);
-#endif
- return SDL_TRUE;
-}
-
-/* !!! FIXME: remove this later. */
-/* we have a weird bug where XineramaQueryScreens() throws an X error, so this
- is here to help track it down (and not crash, too!). */
-static SDL_bool xinerama_triggered_error = SDL_FALSE;
-static int
-X11_XineramaFailed(Display * d, XErrorEvent * e)
-{
- xinerama_triggered_error = SDL_TRUE;
- fprintf(stderr, "XINERAMA X ERROR: type=%d serial=%lu err=%u req=%u minor=%u\n",
- e->type, e->serial, (unsigned int) e->error_code,
- (unsigned int) e->request_code, (unsigned int) e->minor_code);
- fflush(stderr);
- return 0;
-}
-#endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
-
#if SDL_VIDEO_DRIVER_X11_XRANDR
static SDL_bool
CheckXRandR(Display * display, int *major, int *minor)
@@ -506,7 +450,7 @@ X11_InitModes_XRandR(_THIS)
displaydata->scanline_pad = scanline_pad;
displaydata->x = display_x;
displaydata->y = display_y;
- displaydata->use_xrandr = 1;
+ displaydata->use_xrandr = SDL_TRUE;
displaydata->xrandr_output = res->outputs[output];
SetXRandRModeInfo(dpy, res, output_crtc, modeID, &mode);
@@ -534,330 +478,24 @@ X11_InitModes_XRandR(_THIS)
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
-static SDL_bool
-CheckVidMode(Display * display, int *major, int *minor)
-{
- int vm_event, vm_error = -1;
- /* Default the extension not available */
- *major = *minor = 0;
-
- /* Allow environment override */
- if (!SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_XVIDMODE, SDL_TRUE)) {
-#ifdef X11MODES_DEBUG
- printf("XVidMode disabled due to hint\n");
-#endif
- return SDL_FALSE;
- }
-
- if (!SDL_X11_HAVE_XVIDMODE) {
-#ifdef X11MODES_DEBUG
- printf("XVidMode support not available\n");
-#endif
- return SDL_FALSE;
- }
-
- /* Query the extension version */
- if (!X11_XF86VidModeQueryExtension(display, &vm_event, &vm_error)
- || !X11_XF86VidModeQueryVersion(display, major, minor)) {
-#ifdef X11MODES_DEBUG
- printf("XVidMode not active on the display\n");
-#endif
- return SDL_FALSE;
- }
-#ifdef X11MODES_DEBUG
- printf("XVidMode available at version %d.%d!\n", *major, *minor);
-#endif
- return SDL_TRUE;
-}
-
-static
-Bool XF86VidModeGetModeInfo(Display * dpy, int scr,
- XF86VidModeModeInfo* info)
-{
- Bool retval;
- int dotclock;
- XF86VidModeModeLine l;
- SDL_zerop(info);
- SDL_zero(l);
- retval = X11_XF86VidModeGetModeLine(dpy, scr, &dotclock, &l);
- info->dotclock = dotclock;
- info->hdisplay = l.hdisplay;
- info->hsyncstart = l.hsyncstart;
- info->hsyncend = l.hsyncend;
- info->htotal = l.htotal;
- info->hskew = l.hskew;
- info->vdisplay = l.vdisplay;
- info->vsyncstart = l.vsyncstart;
- info->vsyncend = l.vsyncend;
- info->vtotal = l.vtotal;
- info->flags = l.flags;
- info->privsize = l.privsize;
- info->private = l.private;
- return retval;
-}
-
-static int
-CalculateXVidModeRefreshRate(const XF86VidModeModeInfo * info)
-{
- return (info->htotal
- && info->vtotal) ? (1000 * info->dotclock / (info->htotal *
- info->vtotal)) : 0;
-}
-
-static SDL_bool
-SetXVidModeModeInfo(const XF86VidModeModeInfo *info, SDL_DisplayMode *mode)
-{
- mode->w = info->hdisplay;
- mode->h = info->vdisplay;
- mode->refresh_rate = CalculateXVidModeRefreshRate(info);
- ((SDL_DisplayModeData*)mode->driverdata)->vm_mode = *info;
- return SDL_TRUE;
-}
-#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
-
int
X11_InitModes(_THIS)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
- int snum, screen, screencount = 0;
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- int xinerama_major, xinerama_minor;
- int use_xinerama = 0;
- XineramaScreenInfo *xinerama = NULL;
-#endif
-#if SDL_VIDEO_DRIVER_X11_XRANDR
- int xrandr_major, xrandr_minor;
-#endif
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- int vm_major, vm_minor;
- int use_vidmode = 0;
-#endif
-/* XRandR is the One True Modern Way to do this on X11. If it's enabled and
- available, don't even look at other ways of doing things. */
+/* XRandR is the One True Modern Way to do this on X11. If this
+ fails, we just won't report any display modes except the current
+ desktop size. */
#if SDL_VIDEO_DRIVER_X11_XRANDR
- /* require at least XRandR v1.3 */
- if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) &&
- (xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3))) {
- if (X11_InitModes_XRandR(_this) == 0)
- return 0;
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
-
-/* !!! FIXME: eventually remove support for Xinerama and XVidMode (everything below here). */
-
- /* This is a workaround for some apps (UnrealEngine4, for example) until
- we sort out the ramifications of removing XVidMode support outright.
- This block should be removed with the XVidMode support. */
{
- if (SDL_GetHintBoolean("SDL_VIDEO_X11_REQUIRE_XRANDR", SDL_FALSE)) {
- #if SDL_VIDEO_DRIVER_X11_XRANDR
- return SDL_SetError("XRandR support is required but not available");
- #else
- return SDL_SetError("XRandR support is required but not built into SDL!");
- #endif
+ int xrandr_major, xrandr_minor;
+ /* require at least XRandR v1.3 */
+ if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) &&
+ (xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3))) {
+ X11_InitModes_XRandR(_this);
}
}
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- /* Query Xinerama extention
- * NOTE: This works with Nvidia Twinview correctly, but you need version 302.17 (released on June 2012)
- * or newer of the Nvidia binary drivers
- */
- if (CheckXinerama(data->display, &xinerama_major, &xinerama_minor)) {
- int (*handler) (Display *, XErrorEvent *);
- X11_XSync(data->display, False);
- handler = X11_XSetErrorHandler(X11_XineramaFailed);
- xinerama = X11_XineramaQueryScreens(data->display, &screencount);
- X11_XSync(data->display, False);
- X11_XSetErrorHandler(handler);
- if (xinerama_triggered_error) {
- xinerama = 0;
- }
- if (xinerama) {
- use_xinerama = xinerama_major * 100 + xinerama_minor;
- }
- }
- if (!xinerama) {
- screencount = ScreenCount(data->display);
- }
-#else
- screencount = ScreenCount(data->display);
-#endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if (CheckVidMode(data->display, &vm_major, &vm_minor)) {
- use_vidmode = vm_major * 100 + vm_minor;
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
-
- for (snum = 0; snum < screencount; ++snum) {
- XVisualInfo vinfo;
- SDL_VideoDisplay display;
- SDL_DisplayData *displaydata;
- SDL_DisplayMode mode;
- SDL_DisplayModeData *modedata;
- XPixmapFormatValues *pixmapFormats;
- char display_name[128];
- int i, n;
-
- /* Re-order screens to always put default screen first */
- if (snum == 0) {
- screen = DefaultScreen(data->display);
- } else if (snum == DefaultScreen(data->display)) {
- screen = 0;
- } else {
- screen = snum;
- }
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- if (xinerama) {
- if (get_visualinfo(data->display, 0, &vinfo) < 0) {
- continue;
- }
- } else {
- if (get_visualinfo(data->display, screen, &vinfo) < 0) {
- continue;
- }
- }
-#else
- if (get_visualinfo(data->display, screen, &vinfo) < 0) {
- continue;
- }
-#endif
-
- displaydata = (SDL_DisplayData *) SDL_calloc(1, sizeof(*displaydata));
- if (!displaydata) {
- continue;
- }
- display_name[0] = '\0';
-
- mode.format = X11_GetPixelFormatFromVisualInfo(data->display, &vinfo);
- if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) {
- /* We don't support palettized modes now */
- SDL_free(displaydata);
- continue;
- }
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- if (xinerama) {
- mode.w = xinerama[screen].width;
- mode.h = xinerama[screen].height;
- } else {
- mode.w = DisplayWidth(data->display, screen);
- mode.h = DisplayHeight(data->display, screen);
- }
-#else
- mode.w = DisplayWidth(data->display, screen);
- mode.h = DisplayHeight(data->display, screen);
-#endif
- mode.refresh_rate = 0;
-
- modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
- if (!modedata) {
- SDL_free(displaydata);
- continue;
- }
- mode.driverdata = modedata;
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- /* Most of SDL's calls to X11 are unwaware of Xinerama, and to X11 standard calls, when Xinerama is active,
- * there's only one screen available. So we force the screen number to zero and
- * let Xinerama specific code handle specific functionality using displaydata->xinerama_info
- */
- if (use_xinerama) {
- displaydata->screen = 0;
- displaydata->use_xinerama = use_xinerama;
- displaydata->xinerama_info = xinerama[screen];
- displaydata->xinerama_screen = screen;
- }
- else displaydata->screen = screen;
-#else
- displaydata->screen = screen;
-#endif
- displaydata->visual = vinfo.visual;
- displaydata->depth = vinfo.depth;
-
- /* We use the displaydata screen index here so that this works
- for both the Xinerama case, where we get the overall DPI,
- and the regular X11 screen info case. */
- displaydata->hdpi = (float)DisplayWidth(data->display, displaydata->screen) * 25.4f /
- DisplayWidthMM(data->display, displaydata->screen);
- displaydata->vdpi = (float)DisplayHeight(data->display, displaydata->screen) * 25.4f /
- DisplayHeightMM(data->display, displaydata->screen);
- displaydata->ddpi = SDL_ComputeDiagonalDPI(DisplayWidth(data->display, displaydata->screen),
- DisplayHeight(data->display, displaydata->screen),
- (float)DisplayWidthMM(data->display, displaydata->screen) / 25.4f,
- (float)DisplayHeightMM(data->display, displaydata->screen) / 25.4f);
-
- displaydata->scanline_pad = SDL_BYTESPERPIXEL(mode.format) * 8;
- pixmapFormats = X11_XListPixmapFormats(data->display, &n);
- if (pixmapFormats) {
- for (i = 0; i < n; ++i) {
- if (pixmapFormats[i].depth == displaydata->depth) {
- displaydata->scanline_pad = pixmapFormats[i].scanline_pad;
- break;
- }
- }
- X11_XFree(pixmapFormats);
- }
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- if (use_xinerama) {
- displaydata->x = xinerama[screen].x_org;
- displaydata->y = xinerama[screen].y_org;
- }
- else
-#endif
- {
- displaydata->x = 0;
- displaydata->y = 0;
- }
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if (!displaydata->use_xrandr &&
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- /* XVidMode only works on the screen at the origin */
- (!displaydata->use_xinerama ||
- (displaydata->x == 0 && displaydata->y == 0)) &&
-#endif
- use_vidmode) {
- displaydata->use_vidmode = use_vidmode;
- if (displaydata->use_xinerama) {
- displaydata->vidmode_screen = 0;
- } else {
- displaydata->vidmode_screen = screen;
- }
- XF86VidModeGetModeInfo(data->display, displaydata->vidmode_screen, &modedata->vm_mode);
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
-
- SDL_zero(display);
- if (*display_name) {
- display.name = display_name;
- }
- display.desktop_mode = mode;
- display.current_mode = mode;
- display.driverdata = displaydata;
- SDL_AddVideoDisplay(&display, SDL_FALSE);
- }
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- if (xinerama) X11_XFree(xinerama);
-#endif
-
- if (_this->num_displays == 0) {
- return SDL_SetError("No available displays");
- }
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if (use_vidmode) { /* we intend to remove support for XVidMode soon. */
- SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "SDL is using XVidMode to manage your displays!");
- SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "This almost always means either SDL was misbuilt");
- SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "or your X server is insufficient. Please check your setup!");
- SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Fullscreen and/or multiple displays will not work well.");
- }
-#endif
+#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
return 0;
}
@@ -867,10 +505,6 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
{
Display *display = ((SDL_VideoData *) _this->driverdata)->display;
SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata;
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- int nmodes;
- XF86VidModeModeInfo ** modes;
-#endif
SDL_DisplayMode mode;
/* Unfortunately X11 requires the window to be created with the correct
@@ -882,52 +516,6 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
mode.format = sdl_display->current_mode.format;
mode.driverdata = NULL;
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- if (data->use_xinerama) {
- int screen_w;
- int screen_h;
-
- screen_w = DisplayWidth(display, data->screen);
- screen_h = DisplayHeight(display, data->screen);
-
- if (data->use_vidmode && !data->xinerama_info.x_org && !data->xinerama_info.y_org &&
- (screen_w > data->xinerama_info.width || screen_h > data->xinerama_info.height)) {
- SDL_DisplayModeData *modedata;
- /* Add the full (both screens combined) xinerama mode only on the display that starts at 0,0
- * if we're using vidmode.
- */
- mode.w = screen_w;
- mode.h = screen_h;
- mode.refresh_rate = 0;
- modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
- if (modedata) {
- *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata;
- }
- mode.driverdata = modedata;
- if (!SDL_AddDisplayMode(sdl_display, &mode)) {
- SDL_free(modedata);
- }
- }
- else if (!data->use_xrandr)
- {
- SDL_DisplayModeData *modedata;
- /* Add the current mode of each monitor otherwise if we can't get them from xrandr */
- mode.w = data->xinerama_info.width;
- mode.h = data->xinerama_info.height;
- mode.refresh_rate = 0;
- modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
- if (modedata) {
- *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata;
- }
- mode.driverdata = modedata;
- if (!SDL_AddDisplayMode(sdl_display, &mode)) {
- SDL_free(modedata);
- }
- }
-
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
-
#if SDL_VIDEO_DRIVER_X11_XRANDR
if (data->use_xrandr) {
XRRScreenResources *res;
@@ -960,37 +548,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if (data->use_vidmode &&
- X11_XF86VidModeGetAllModeLines(display, data->vidmode_screen, &nmodes, &modes)) {
- int i;
- SDL_DisplayModeData *modedata;
-
-#ifdef X11MODES_DEBUG
- printf("VidMode modes: (unsorted)\n");
- for (i = 0; i < nmodes; ++i) {
- printf("Mode %d: %d x %d @ %d, flags: 0x%x\n", i,
- modes[i]->hdisplay, modes[i]->vdisplay,
- CalculateXVidModeRefreshRate(modes[i]), modes[i]->flags);
- }
-#endif
- for (i = 0; i < nmodes; ++i) {
- modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
- if (!modedata) {
- continue;
- }
- mode.driverdata = modedata;
-
- if (!SetXVidModeModeInfo(modes[i], &mode) || !SDL_AddDisplayMode(sdl_display, &mode)) {
- SDL_free(modedata);
- }
- }
- X11_XFree(modes);
- return;
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
-
- if (!data->use_xrandr && !data->use_vidmode) {
+ if (!data->use_xrandr) {
SDL_DisplayModeData *modedata;
/* Add the desktop mode */
mode = sdl_display->desktop_mode;
@@ -1105,12 +663,6 @@ freeInfo:
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if (data->use_vidmode) {
- X11_XF86VidModeSwitchToMode(display, data->vidmode_screen, &modedata->vm_mode);
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
-
return 0;
}
@@ -1129,19 +681,6 @@ X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect)
rect->w = sdl_display->current_mode.w;
rect->h = sdl_display->current_mode.h;
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- /* Get the real current bounds of the display */
- if (data->use_xinerama) {
- Display *display = ((SDL_VideoData *) _this->driverdata)->display;
- int screencount;
- XineramaScreenInfo *xinerama = X11_XineramaQueryScreens(display, &screencount);
- if (xinerama) {
- rect->x = xinerama[data->xinerama_screen].x_org;
- rect->y = xinerama[data->xinerama_screen].y_org;
- X11_XFree(xinerama);
- }
- }
-#endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
return 0;
}
diff --git a/src/video/x11/SDL_x11modes.h b/src/video/x11/SDL_x11modes.h
index 5548680..b599e37 100644
--- a/src/video/x11/SDL_x11modes.h
+++ b/src/video/x11/SDL_x11modes.h
@@ -35,35 +35,20 @@ typedef struct
float hdpi;
float vdpi;
- int use_xinerama;
- int use_xrandr;
- int use_vidmode;
-
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
- XineramaScreenInfo xinerama_info;
- int xinerama_screen;
-#endif
+ SDL_bool use_xrandr;
#if SDL_VIDEO_DRIVER_X11_XRANDR
RROutput xrandr_output;
#endif
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- int vidmode_screen;
-#endif
-
} SDL_DisplayData;
typedef struct
{
#if SDL_VIDEO_DRIVER_X11_XRANDR
RRMode xrandr_mode;
+#else
+ int unused; /* just so struct isn't empty. */
#endif
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- XF86VidModeModeInfo vm_mode;
-#endif
-
} SDL_DisplayModeData;
extern int X11_InitModes(_THIS);
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index b87ae02..3d65304 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -260,15 +260,6 @@ SDL_X11_SYM(void,XdbeFreeVisualInfo,(XdbeScreenVisualInfo *visual_info),(visual_
SDL_X11_SYM(XdbeBackBufferAttributes*,XdbeGetBackBufferAttributes,(Display *dpy,XdbeBackBuffer buffer),(dpy,buffer),return)
#endif
-/* Xinerama support */
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
-SDL_X11_MODULE(XINERAMA)
-SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),return)
-SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
-SDL_X11_SYM(Status,XineramaQueryVersion,(Display *a,int *b,int *c),(a,b,c),return)
-SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),return)
-#endif
-
/* XInput2 support for multiple mice, tablets, etc. */
#if SDL_VIDEO_DRIVER_X11_XINPUT2
SDL_X11_MODULE(XINPUT2)
@@ -321,17 +312,6 @@ SDL_X11_MODULE(XSHAPE)
SDL_X11_SYM(void,XShapeCombineMask,(Display *dpy,Window dest,int dest_kind,int x_off,int y_off,Pixmap src,int op),(dpy,dest,dest_kind,x_off,y_off,src,op),)
#endif
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
-SDL_X11_MODULE(XVIDMODE)
-SDL_X11_SYM(Bool,XF86VidModeGetAllModeLines,(Display *a,int b,int *c,XF86VidModeModeInfo ***d),(a,b,c,d),return)
-SDL_X11_SYM(Bool,XF86VidModeGetModeLine,(Display *a,int b,int *c,XF86VidModeModeLine *d),(a,b,c,d),return)
-SDL_X11_SYM(Bool,XF86VidModeGetViewPort,(Display *a,int b,int *c,int *d),(a,b,c,d),return)
-SDL_X11_SYM(Bool,XF86VidModeQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
-SDL_X11_SYM(Bool,XF86VidModeQueryVersion,(Display *a,int *b,int *c),(a,b,c),return)
-SDL_X11_SYM(Bool,XF86VidModeSwitchToMode,(Display *a,int b,XF86VidModeModeInfo *c),(a,b,c),return)
-SDL_X11_SYM(Bool,XF86VidModeLockModeSwitch,(Display *a,int b,int c),(a,b,c),return)
-#endif
-
#undef SDL_X11_MODULE
#undef SDL_X11_SYM
diff --git a/src/video/x11/SDL_x11video.h b/src/video/x11/SDL_x11video.h
index 8c7eb09..2901473 100644
--- a/src/video/x11/SDL_x11video.h
+++ b/src/video/x11/SDL_x11video.h
@@ -37,9 +37,6 @@
#if SDL_VIDEO_DRIVER_X11_XDBE
#include <X11/extensions/Xdbe.h>
#endif
-#if SDL_VIDEO_DRIVER_X11_XINERAMA
-#include <X11/extensions/Xinerama.h>
-#endif
#if SDL_VIDEO_DRIVER_X11_XINPUT2
#include <X11/extensions/XInput2.h>
#endif
@@ -52,9 +49,6 @@
#if SDL_VIDEO_DRIVER_X11_XSHAPE
#include <X11/extensions/shape.h>
#endif
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
-#include <X11/extensions/xf86vmode.h>
-#endif
#include "../../core/linux/SDL_dbus.h"
#include "../../core/linux/SDL_ime.h"
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index d31ac01..142b5c2 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -73,13 +73,6 @@ X11_XIfEventTimeout(Display *display, XEvent *event_return, Bool (*predicate)(),
*/
static SDL_bool
-X11_IsWindowLegacyFullscreen(_THIS, SDL_Window * window)
-{
- SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
- return (data->fswindow != 0);
-}
-
-static SDL_bool
X11_IsWindowMapped(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
@@ -1433,161 +1426,12 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
X11_XFlush(display);
}
-/* This handles fullscreen itself, outside the Window Manager. */
-static void
-X11_BeginWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _display)
-{
- SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
- SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
- Visual *visual = data->visual;
- Display *display = data->videodata->display;
- const int screen = displaydata->screen;
- Window root = RootWindow(display, screen);
- const int def_vis = (visual == DefaultVisual(display, screen));
- unsigned long xattrmask = 0;
- XSetWindowAttributes xattr;
- XEvent ev;
- SDL_Rect rect;
-
- if ( data->fswindow ) {
- return; /* already fullscreen, I hope. */
- }
-
- X11_GetDisplayBounds(_this, _display, &rect);
-
- SDL_zero(xattr);
- xattr.override_redirect = True;
- xattrmask |= CWOverrideRedirect;
- xattr.background_pixel = def_vis ? BlackPixel(display, screen) : 0;
- xattrmask |= CWBackPixel;
- xattr.border_pixel = 0;
- xattrmask |= CWBorderPixel;
- xattr.colormap = data->colormap;
- xattrmask |= CWColormap;
-
- data->fswindow = X11_XCreateWindow(display, root,
- rect.x, rect.y, rect.w, rect.h, 0,
- displaydata->depth, InputOutput,
- visual, xattrmask, &xattr);
-
- X11_XSelectInput(display, data->fswindow, StructureNotifyMask);
- X11_XSetWindowBackground(display, data->fswindow, 0);
- X11_XInstallColormap(display, data->colormap);
- X11_XClearWindow(display, data->fswindow);
- X11_XMapRaised(display, data->fswindow);
-
- /* Make sure the fswindow is in view by warping mouse to the corner */
- X11_XUngrabPointer(display, CurrentTime);
- X11_XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
-
- /* Wait to be mapped, filter Unmap event out if it arrives. */
- X11_XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->fswindow);
- X11_XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->fswindow);
-
-#if SDL_VIDEO_DRIVER_X11_XVIDMODE
- if ( displaydata->use_vidmode ) {
- X11_XF86VidModeLockModeSwitch(display, screen, True);
- }
-#endif
-
- SetWindowBordered(display, displaydata->screen, data->xwindow, SDL_FALSE);
-
- /* Center actual window within our cover-the-screen window. */
- X11_XReparentWindow(display, data->xwindow, data->fswindow,
- (rect.w - window->w) / 2, (rect.h - window->h) / 2);
-
- /* Move the mouse to the upper left to make sure it's on-screen */
- X11_XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
-
- /* Center mouse in the fullscreen window. */
- rect.x += (rect.w / 2);
- rect.y += (rect.h / 2);
- X11_XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
-
- /* Wait to be mapped, filter Unmap event out if it arrives. */
- X11_XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
- X11_XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
-
- SDL_UpdateWindowGrab(window);
-}
-
-static void
-X11_EndWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _display)
-{
- SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
- SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
- Display *display = data->videodata->display;
- const int screen = displaydata->screen;
- Window root = RootWindow(display, screen);
- Window fswindow = data->fswindow;
- XEvent ev;
-
- if (!data->fswindow) {
- return; /* already not fullscreen, I hope. */
- }
-
- data->fswindow = None;
-
-#if SDL_VIDEO_DRIVER_X11_VIDMODE
- if ( displaydata->use_vidmode ) {
- X11_XF86VidModeLockModeSwitch(display, screen, False);
- }
-#endif
-
- SDL_UpdateWindowGrab(window);
-
- X11_XReparentWindow(display, data->xwindow, root, window->x, window->y);
-
- /* flush these events so they don't confuse normal event handling */
- X11_XSync(display, False);
- X11_XCheckIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
- X11_XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
-
- SetWindowBordered(display, screen, data->xwindow,
- (window->flags & SDL_WINDOW_BORDERLESS) == 0);
-
- X11_XWithdrawWindow(display, fswindow, screen);
-
- /* Wait to be unmapped. */
- X11_XIfEvent(display, &ev, &isUnmapNotify, (XPointer)&fswindow);
- X11_XDestroyWindow(display, fswindow);
-}
-
-
void
X11_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * _display, SDL_bool fullscreen)
{
- /* !!! FIXME: SDL_Hint? */
- SDL_bool legacy = SDL_FALSE;
- const char *env = SDL_getenv("SDL_VIDEO_X11_LEGACY_FULLSCREEN");
- if (env) {
- legacy = SDL_atoi(env);
- } else {
- SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
- SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
- if ( displaydata->use_vidmode ) {
- legacy = SDL_TRUE; /* the new stuff only works with XRandR. */
- } else if ( !videodata->net_wm ) {
- legacy = SDL_TRUE; /* The window manager doesn't support it */
- } else {
- /* !!! FIXME: look at the window manager name, and blacklist certain ones? */
- /* http://stackoverflow.com/questions/758648/find-the-name-of-the-x-window-manager */
- legacy = SDL_FALSE; /* try the new way. */
- }
- }
-
- if (legacy) {
- if (fullscreen) {
- X11_BeginWindowFullscreenLegacy(_this, window, _display);
- } else {
- X11_EndWindowFullscreenLegacy(_this, window, _display);
- }
- } else {
- X11_SetWindowFullscreenViaWM(_this, window, _display, fullscreen);
- }
+ X11_SetWindowFullscreenViaWM(_this, window, _display, fullscreen);
}
-
int
X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{
@@ -1699,7 +1543,7 @@ X11_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
unsigned long real_nitems;
SDL_x11Prop atomProp;
- X11_XGetWindowAttributes(display, X11_IsWindowLegacyFullscreen(_this, window) ? data->fswindow : data->xwindow, &attributes);
+ X11_XGetWindowAttributes(display, data->xwindow, &attributes);
if (X11_XScreenNumberOfScreen(attributes.screen) > 0) {
SDL_snprintf(icc_atom_string, sizeof("_ICC_PROFILE_") + 12, "%s%d", "_ICC_PROFILE_", X11_XScreenNumberOfScreen(attributes.screen));
} else {
@@ -1740,7 +1584,6 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display;
- SDL_bool oldstyle_fullscreen;
if (data == NULL) {
return;
@@ -1748,13 +1591,7 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
display = data->videodata->display;
- /* ICCCM2.0-compliant window managers can handle fullscreen windows
- If we're using XVidMode to change resolution we need to confine
- the cursor so we don't pan around the virtual desktop.
- */
- oldstyle_fullscreen = X11_IsWindowLegacyFullscreen(_this, window);
-
- if (oldstyle_fullscreen || grabbed) {
+ if (grabbed) {
/* If the window is unmapped, XGrab calls return GrabNotViewable,
so when we get a MapNotify later, we'll try to update the grab as
appropriate. */
@@ -1788,11 +1625,6 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
/* Raise the window if we grab the mouse */
X11_XRaiseWindow(display, data->xwindow);
-
- /* Now grab the keyboard on old-style fullscreen */
- if (oldstyle_fullscreen) {
- X11_SetWindowKeyboardGrab(_this, window, SDL_TRUE);
- }
} else {
X11_XUngrabPointer(display, CurrentTime);
diff --git a/src/video/x11/SDL_x11window.h b/src/video/x11/SDL_x11window.h
index 6f1c71c..6f7560a 100644
--- a/src/video/x11/SDL_x11window.h
+++ b/src/video/x11/SDL_x11window.h
@@ -44,7 +44,6 @@ typedef struct
{
SDL_Window *window;
Window xwindow;
- Window fswindow; /* used if we can't have the WM handle fullscreen. */
Visual *visual;
Colormap colormap;
#ifndef NO_SHARED_MEMORY
diff --git a/test/testautomation_hints.c b/test/testautomation_hints.c
index 0d1b7b6..a11f8e4 100644
--- a/test/testautomation_hints.c
+++ b/test/testautomation_hints.c
@@ -32,9 +32,7 @@ const char* _HintsEnum[] =
SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,
SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT,
SDL_HINT_VIDEO_WIN_D3DCOMPILER,
- SDL_HINT_VIDEO_X11_XINERAMA,
SDL_HINT_VIDEO_X11_XRANDR,
- SDL_HINT_VIDEO_X11_XVIDMODE,
SDL_HINT_XINPUT_ENABLED,
};
const char* _HintsVerbose[] =
@@ -60,9 +58,7 @@ const char* _HintsVerbose[] =
"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS",
"SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT",
"SDL_VIDEO_WIN_D3DCOMPILER",
- "SDL_VIDEO_X11_XINERAMA",
"SDL_VIDEO_X11_XRANDR",
- "SDL_VIDEO_X11_XVIDMODE",
"SDL_XINPUT_ENABLED"
};