```{index} single: SDL_GetWindowWMInfo (SDL2) ``` ```{index} single: SDL2::SDL_GetWindowWMInfo ``` # SDL_GetWindowWMInfo The window manager's own handles for this window, as a hash reference, or undef when SDL will not say. ```perl my $wm = SDL_GetWindowWMInfo($win) or die SDL_GetError(); printf "%s display=%#x window=%#x\n", $wm->{driver}, $wm->{display}, $wm->{window}; ``` `subsystem` is the numeric `SDL_SYSWM_*` value and `driver` is the same lowercase name `SDL_GetCurrentVideoDriver` uses. The remaining keys are the ones that windowing system has: `display` and `window` under X11, `display` and `surface` under Wayland - as plain integers, because they are C pointers and XIDs, not anything Perl can follow. This is what a graphics API that is not OpenGL needs in order to draw on an SDL window: `Peta::WebGPU` creates its surface from exactly these two handles.