diff options
author | NRK <nrk@disroot.org> | 2023-06-29 03:02:22 +0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-13 19:57:55 +0000 |
commit | 5d2d7cde8efb14c6b752148e81881c2ce74c5870 (patch) | |
tree | 909a6df516d12099e31e6996e462b04e985ab396 /video/out/x11_common.c | |
parent | e85d70f84f501d9277d3ac841f68b1971bd13916 (diff) | |
download | mpv-5d2d7cde8efb14c6b752148e81881c2ce74c5870.tar.bz2 mpv-5d2d7cde8efb14c6b752148e81881c2ce74c5870.tar.xz |
x11_common: avoid unnecessary XUnmapWindow() call
XDestroyWindow() is called immediately after, which also unmaps window
if needed. according to the manpage:
> If the window specified by the w argument is mapped, it is unmapped
> automatically.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 03d624ac0c..7ce974d5ce 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -834,10 +834,8 @@ void vo_x11_uninit(struct vo *vo) set_screensaver(x11, true); - if (x11->window != None && x11->window != x11->rootwin) { - XUnmapWindow(x11->display, x11->window); + if (x11->window != None && x11->window != x11->rootwin) XDestroyWindow(x11->display, x11->window); - } if (x11->xic) XDestroyIC(x11->xic); if (x11->colormap != None) |