[New-bugs-announce] [issue43655] Tkinter: Not setting _NET_WM_WINDOW_TYPE on FileDialog

Patrick Melix report at bugs.python.org
Mon Mar 29 04:53:43 EDT 2021


New submission from Patrick Melix <github at melix.me>:

While trying to fix window behaviour in a python project (ASE: https://wiki.fysik.dtu.dk/ase/), I came across this problem:

Tkinter does not set the _NET_WM_WINDOW_TYPE when using the FileDialog class or it's derivatives. I could not find a reason for this and it leads to my window manager (i3) not automatically recognising the window as a dialogue (and thus not enabling floating). I think the window types are there exactly for that purpose, so I don't see why not to set this as the default for the FileDialog class.

I was able to change this by adding the line
```self.top.wm_attributes('-type', 'dialog')```
to the initialization of the FileDialog class. See also MR on GitHub.

Since I am an absolute beginner at this please do forgive if I missed something.

----------
components: Tkinter
messages: 389676
nosy: patrickmelix
priority: normal
severity: normal
status: open
title: Tkinter: Not setting _NET_WM_WINDOW_TYPE on FileDialog
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43655>
_______________________________________


More information about the New-bugs-announce mailing list