mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
x11: Mark backing_store as NotUseful when creating windows.
This can give some performance boost, and save some resources, as there's no reason to keep a copy of an SDL window's contents on the server: most SDL apps are redrawing completely every frame, and the API allows for expose events to tell an app a redraw is needed anyhow. (And compositors are free to ignore this setting if it makes sense to do so, according to the Xlib docs.) Reference Issue #3776.
This commit is contained in:
parent
9c063468d6
commit
1f482174b5
@ -445,6 +445,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||
}
|
||||
|
||||
xattr.override_redirect = ((window->flags & SDL_WINDOW_TOOLTIP) || (window->flags & SDL_WINDOW_POPUP_MENU)) ? True : False;
|
||||
xattr.backing_store = NotUseful;
|
||||
xattr.background_pixmap = None;
|
||||
xattr.border_pixel = 0;
|
||||
|
||||
@ -531,7 +532,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||
window->x, window->y, window->w, window->h,
|
||||
0, depth, InputOutput, visual,
|
||||
(CWOverrideRedirect | CWBackPixmap | CWBorderPixel |
|
||||
CWColormap), &xattr);
|
||||
CWBackingStore | CWColormap), &xattr);
|
||||
if (!w) {
|
||||
return SDL_SetError("Couldn't create window");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user