diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-01-16 17:29:44 +0000 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-01-16 19:26:09 +0000 |
commit | f52cfdabca246a7edb59c234d5a63eb638f63e70 (patch) | |
tree | cf0ab0b0105421366533bf03d947133b09b248c1 /video/out | |
parent | 2bbf880d96e66597f4645b3986ccee5c0bbc98b8 (diff) | |
download | mpv-f52cfdabca246a7edb59c234d5a63eb638f63e70.tar.bz2 mpv-f52cfdabca246a7edb59c234d5a63eb638f63e70.tar.xz |
wayland: only warn when actually missing idle inhibit support
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 9c4041f6e4..9c399b7346 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -2020,10 +2020,6 @@ bool vo_wayland_init(struct vo *vo) wl->video_viewport = wp_viewporter_get_viewport(wl->viewporter, wl->video_surface); } - const char *xdg_current_desktop = getenv("XDG_CURRENT_DESKTOP"); - if (xdg_current_desktop != NULL && strstr(xdg_current_desktop, "GNOME")) - MP_WARN(wl, "GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.\n"); - #if HAVE_WAYLAND_PROTOCOLS_1_27 if (wl->content_type_manager) { wl->content_type = wp_content_type_manager_v1_get_surface_content_type(wl->content_type_manager, wl->surface); @@ -2073,10 +2069,15 @@ bool vo_wayland_init(struct vo *vo) zxdg_decoration_manager_v1_interface.name); } - if (!wl->idle_inhibit_manager) + if (!wl->idle_inhibit_manager) { MP_VERBOSE(wl, "Compositor doesn't support the %s protocol!\n", zwp_idle_inhibit_manager_v1_interface.name); + const char *xdg_current_desktop = getenv("XDG_CURRENT_DESKTOP"); + if (xdg_current_desktop != NULL && strstr(xdg_current_desktop, "GNOME")) + MP_WARN(wl, "GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.\n"); + } + wl->opts = mp_get_config_group(wl, wl->vo->global, &wayland_conf); wl->display_fd = wl_display_get_fd(wl->display); |