1111
1212# Some tests don't work properly with some video drivers, so check the name
1313DRIVER_DUMMY = False
14+ DRIVER_WAYLAND = False
1415DRIVER_X11 = False
1516try :
1617 sdl2 .SDL_Init (sdl2 .SDL_INIT_VIDEO )
1718 driver_name = sdl2 .SDL_GetCurrentVideoDriver ()
1819 sdl2 .SDL_Quit ()
1920 DRIVER_DUMMY = driver_name == b"dummy"
21+ DRIVER_WAYLAND = driver_name == b"wayland"
2022 DRIVER_X11 = driver_name == b"x11"
2123except :
2224 pass
@@ -438,6 +440,7 @@ def test_SDL_GetSetWindowTitle(window):
438440 sdl2 .SDL_SetWindowTitle (window , b"Hello there" )
439441 assert sdl2 .SDL_GetWindowTitle (window ) == b"Hello there"
440442
443+ @pytest .mark .xfail (DRIVER_WAYLAND , reason = "wayland does not allow changing the window icon" )
441444def test_SDL_SetWindowIcon (window ):
442445 sf = surface .SDL_CreateRGBSurface (
443446 0 , 16 , 16 , 16 , 0xF000 , 0x0F00 , 0x00F0 , 0x000F
@@ -461,7 +464,7 @@ def test_SDL_GetSetWindowData(window):
461464 retval = sdl2 .SDL_GetWindowData (window , k )
462465 assert retval .contents .value == v .value
463466
464- @pytest .mark .xfail (DRIVER_X11 , reason = "Wonky with some window managers" )
467+ @pytest .mark .xfail (DRIVER_X11 or DRIVER_WAYLAND , reason = "Wonky with some window managers" )
465468def test_SDL_GetSetWindowPosition (with_sdl ):
466469 window = _create_window (b"Test" , 10 , 200 , 10 , 10 , 0 )
467470 px , py = c_int (0 ), c_int (0 )
0 commit comments