Python/Tkinter: Remove titlebar without overrideredirect()
<p>I'm currently working with Tkinter and Python 2.7 on Linux and I was wondering if there was a way to remove the <code>TK()</code> window border frame and title bar without using <code>overrideredirect(1)</code>.</p>

<p>I have my own close button and <code>overrideredirect(1)</code> presents me with a few issues that I can't accept:</p>

<ul>
<li>GUI always on top</li>
<li>can't iconify then deiconify properly</li>
<li>no keyboard input so can't type into fields (see <a href="http://stackoverflow.com/questions/5886280/python-tkinter-overrideredirect-cannot-receive-keystrokes-linux">python tkinter overrideredirect; cannot receive keystrokes (Linux)</a>)</li>
</ul>

<p>I can't use <code>attributes("-fullscreen", True)</code> as the titlebar and borders remain.</p>

<p>The window decoration is all handled by the window manager so what you are trying to do is find a way to tell the window manager to decorate your window differently from a standard application window. Tk provides <code>overrideredirect</code> to have the window manager completely ignore this window but we can also use <a href="https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472629520" rel="nofollow">Extended Window Manager Hints</a> to declare the intended use of this toplevel window to the window manager. This is done for instance for tooltip and splashscreen windows to allow the manager to provide minimal decoration and possibly special animations.</p>

<p>In your case, adding a 'splash' hint should do what you want</p>

<pre><code>root = tk.Tk()
root.wm_attributes('-type', 'splash')
</code></pre>

<p>You will need Tk 8.5 or above for this.</p>

python python-2.7 tkinter