summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-06-21 23:13:44 -0500
committerDudemanguy <random342@airmail.cc>2022-06-22 18:09:11 +0000
commit652f09a7a6665be2a04ff8ec4f741de435bd536f (patch)
tree64259646673fb739e96e267d28b74f8a4b0e1b96 /video/out/x11_common.h
parent1ffdb9128d87dffe869c1e9f4024a16bfd0022c4 (diff)
downloadmpv-652f09a7a6665be2a04ff8ec4f741de435bd536f.tar.bz2
mpv-652f09a7a6665be2a04ff8ec4f741de435bd536f.tar.xz
x11: avoid XPresent API calls when it's not needed
This commit kind of mixes several related things together. The main thing is to avoid calling any XPresent functions or internal functions related to presentation when the feature is not auto-whitelisted or enabled by the user. Internally rework this so it all works off of a use_present bool (have_present is eliminated because having a non-zero present_code covers exactly the same thing) and make sure it updates on runtime. Finally, put some actual logging in here whenever XPresent is enabled/disabled. Fixes #10326.
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index e08beca7b0..0134935daa 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -76,7 +76,7 @@ struct vo_x11_state {
double screensaver_time_last;
struct mp_present *present;
- bool have_present;
+ bool use_present;
int present_code;
XIM xim;