mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	@@ -1659,6 +1659,17 @@ extern "C" {
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
 | 
					#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *  \brief Mark X11 windows as override-redirect.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  If set, this _might_ increase framerate at the expense of the desktop
 | 
				
			||||||
 | 
					 *  not working as expected. Override-redirect windows aren't noticed by the
 | 
				
			||||||
 | 
					 *  window manager at all.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  You should probably only use this for fullscreen windows, and you probably
 | 
				
			||||||
 | 
					 *  shouldn't even use it for that. But it's here if you want to try!
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 *  \brief  An enumeration of hint priorities
 | 
					 *  \brief  An enumeration of hint priorities
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -372,6 +372,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
 | 
				
			|||||||
    SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
 | 
					    SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
 | 
				
			||||||
    SDL_DisplayData *displaydata =
 | 
					    SDL_DisplayData *displaydata =
 | 
				
			||||||
        (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
 | 
					        (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
 | 
				
			||||||
 | 
					    const SDL_bool force_override_redirect = SDL_GetHintBoolean(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, SDL_FALSE);
 | 
				
			||||||
    SDL_WindowData *windowdata;
 | 
					    SDL_WindowData *windowdata;
 | 
				
			||||||
    Display *display = data->display;
 | 
					    Display *display = data->display;
 | 
				
			||||||
    int screen = displaydata->screen;
 | 
					    int screen = displaydata->screen;
 | 
				
			||||||
@@ -444,7 +445,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
 | 
				
			|||||||
        depth = displaydata->depth;
 | 
					        depth = displaydata->depth;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    xattr.override_redirect = ((window->flags & SDL_WINDOW_TOOLTIP) || (window->flags & SDL_WINDOW_POPUP_MENU)) ? True : False;
 | 
					    xattr.override_redirect = ((window->flags & SDL_WINDOW_TOOLTIP) || (window->flags & SDL_WINDOW_POPUP_MENU) || force_override_redirect) ? True : False;
 | 
				
			||||||
    xattr.backing_store = NotUseful;
 | 
					    xattr.backing_store = NotUseful;
 | 
				
			||||||
    xattr.background_pixmap = None;
 | 
					    xattr.background_pixmap = None;
 | 
				
			||||||
    xattr.border_pixel = 0;
 | 
					    xattr.border_pixel = 0;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user