Provided by: libsdl3-doc_3.2.8+ds-1_all bug

NAME

       SDL_CreatePopupWindow - Create a child popup window of the specified parent window.

HEADER FILE

       Defined in SDL3/SDL_video.h

SYNOPSIS

       #include "SDL3/SDL.h"

       SDL_Window * SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, SDL_WindowFlags flags);

DESCRIPTION

       The flags parameter must contain at least one of the following:

       • SDL_WINDOW_TOOLTIP : The popup window is a tooltip
         and will not pass any input events.

       • SDL_WINDOW_POPUP_MENU : The popup window is a
         popup menu. The topmost popup menu will implicitly gain the keyboard
         focus.

       The following flags are not relevant to popup window creation and will be ignored:

       • SDL_WINDOW_MINIMIZEDSDL_WINDOW_MAXIMIZEDSDL_WINDOW_FULLSCREENSDL_WINDOW_BORDERLESS The following flags are incompatible with popup window creation and will cause it
       to fail:

       • SDL_WINDOW_UTILITYSDL_WINDOW_MODAL The parent parameter must be non-null and a valid window. The parent of a popup window
       can be either a regular, toplevel window, or another popup window.

       Popup  windows cannot be minimized, maximized, made fullscreen, raised, flash, be made a modal window, be
       the parent of a toplevel window, or grab the mouse and/or keyboard. Attempts to do so will fail.

       Popup windows implicitly do not have a border/decorations and do not appear on  the  taskbar/dock  or  in
       lists of windows such as alt-tab menus.

       If  a  parent  window  is  hidden  or  destroyed,  any  child popup windows will be recursively hidden or
       destroyed as well. Child popup windows not explicitly hidden will be restored when the parent is shown.

FUNCTION PARAMETERS

       parent the parent of the window, must not be NULL.

       offset_x
              the x position of the popup window relative to the origin of the parent.

       offset_y
              the y position of the popup window relative to the origin of the parent window.

       w      the width of the window.

       h      the height of the window.

       flags

              SDL_WINDOW_TOOLTIP
               or SDL_WINDOW_POPUP_MENU , and zero or more additional SDL_WindowFlags
               OR'd together.

RETURN VALUE

       ( SDL_Window
        *) Returns the window that was created or NULL on failure; call SDL_GetError () for more information.

THREAD SAFETY

       This function should only be called on the main thread.

AVAILABILITY

       This function is available since SDL 3.2.0.

SEE ALSO

       (3), SDL_CreateWindow(3), (3),  SDL_CreateWindowWithProperties(3),  (3),  SDL_DestroyWindow(3),  (3),
       SDL_GetWindowParent(3)

Simple Directmedia Layer                            SDL 3.2.8                           SDL_CreatePopupWindow(3)