<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="218002666" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/9056" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/9056/hovercard" href="https://github.com/electron/electron/issues/9056">#9056</a></p>
<p dir="auto">It's true that most of the heavy lifting in Wayland compatibility will happen when Chromium adds Wayland support, but there are also X11 odds-and-ends that will need to be addressed in Electron itself.</p>
<p dir="auto">In several places our <code class="notranslate">USE_X11</code> ifdef really just means OS_*NIX, but there are several places where we're calling  XShapeCombineRectangles, XSetTransientForHint, XChangeProperty, et al. These cases will all need Wayland support as well</p>
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">13.0.0</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">windows 20H2</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">10</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">After closing the BrowserWindow, need to close or destroy the embedded BrowserView.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The BrowserView cannot be closed using the following code either</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="browser.removeBrowserView(view);
browser.setBrowserView(null);
view = null;
browser.close();"><pre class="notranslate"><span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">removeBrowserView</span><span class="pl-kos">(</span><span class="pl-s1">view</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">setBrowserView</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">view</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span>
<span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><code class="notranslate">browserView</code> does not provide a <code class="notranslate">close()</code>or <code class="notranslate">destroy()</code> method<br>
<code class="notranslate">browserView.webContents</code> also does not provide a <code class="notranslate">close()</code> or <code class="notranslate">destroy()</code> method</p>
<p dir="auto">When I open and close <code class="notranslate">BrowserWindow</code> several times, the <code class="notranslate">electron.exe</code> process is added infinitely in the system task manager</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto"><em>No response</em></p>