title: How to disable window controls when a modal dialog box is active in TkInter?
body: <p>I am writing a Python application with TkInter. At some point the application (<code>root</code>) displays a dialog box (<code>dlg</code>, which is a <code>Toplevel</code>). In order to make the dialog modal I use the following code:</p>
  
  <pre><code>dlg.focus_set()
  dlg.grab_set()
  dlg.transient(root)
  root.wait_window(dlg)
  </code></pre>
  
  <p>This indeed cancels "custom" events outside the dialog box (like the widgets in the main application window), but it does NOT cancel the window manager events, so that for example clicking on the main application window has it regain focus and it can be moved, resized - and even closed! - while the "modal" dialog is still open.</p>
  
  <p>How can I make my dialog truly modal, so that window manager events for the main application window are also suspended while the dialog box is active?</p>
  
  <p>I am using Python 3.4.3 on Ubuntu 15.04.</p>