11
11
12
12
# Some tests don't work properly with some video drivers, so check the name
13
13
DRIVER_DUMMY = False
14
+ DRIVER_WAYLAND = False
14
15
DRIVER_X11 = False
15
16
try :
16
17
sdl2 .SDL_Init (sdl2 .SDL_INIT_VIDEO )
17
18
driver_name = sdl2 .SDL_GetCurrentVideoDriver ()
18
19
sdl2 .SDL_Quit ()
19
20
DRIVER_DUMMY = driver_name == b"dummy"
21
+ DRIVER_WAYLAND = driver_name == b"wayland"
20
22
DRIVER_X11 = driver_name == b"x11"
21
23
except :
22
24
pass
@@ -438,6 +440,7 @@ def test_SDL_GetSetWindowTitle(window):
438
440
sdl2 .SDL_SetWindowTitle (window , b"Hello there" )
439
441
assert sdl2 .SDL_GetWindowTitle (window ) == b"Hello there"
440
442
443
+ @pytest .mark .xfail (DRIVER_WAYLAND , reason = "wayland does not allow changing the window icon" )
441
444
def test_SDL_SetWindowIcon (window ):
442
445
sf = surface .SDL_CreateRGBSurface (
443
446
0 , 16 , 16 , 16 , 0xF000 , 0x0F00 , 0x00F0 , 0x000F
@@ -461,7 +464,7 @@ def test_SDL_GetSetWindowData(window):
461
464
retval = sdl2 .SDL_GetWindowData (window , k )
462
465
assert retval .contents .value == v .value
463
466
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" )
465
468
def test_SDL_GetSetWindowPosition (with_sdl ):
466
469
window = _create_window (b"Test" , 10 , 200 , 10 , 10 , 0 )
467
470
px , py = c_int (0 ), c_int (0 )
0 commit comments