mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
Disable X11 compositor bypass
Compositor bypass is meant for fullscreen games consuming lots of GPU resources. For a light app that will usually be windowed, this only causes unnecessary compositor suspends, especially visible (and annoying) with complying window manager like KWin. Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
committed by
Romain Vimont
parent
068253a3a2
commit
b941854c73
@@ -69,6 +69,13 @@ sdl_init_and_configure(bool display) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SCRCPY_SDL_HAS_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR
|
||||
// Disable compositor bypassing on X11
|
||||
if (!SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0")) {
|
||||
LOGW("Could not disable X11 compositor bypass");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Do not disable the screensaver when scrcpy is running
|
||||
SDL_EnableScreenSaver();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user