wxPython / Wayland issues

387 views
Skip to first unread message

Matthias Brennwald

unread,
Jan 14, 2021, 7:51:20 AM1/14/21
to wxpython-users
Hello

I am writing a GUI application with wxPython, which uses a "main" window with all the controls, and some "secondary" windows where data gets plotted (using matplotlib). I am working mostly on GNOME/Xorg, but recently also was on GNOME/Wayland, where I observed a few issues with my application. I wonder if these issues are related to wxPython, Wayland, or both. Any thoughts or feedback would be welcome!

Specifically, the issues I am observing are:

(1) On Xorg, the windows get arranged nicely next to each other when the application starts. As long as the screen is not too small, they will not overlap each over.
On Wayland, the windows are just stacked onto each other, covering each other. One has to manually arrange the windows on the screen to avoid the overlaps. As far as I can tell, Wayland does not allow to programmatically position the windows on the screen. However, there must be somethings that I am missing, since the stacked windows are just a mess.

(2) If a long running task is started in my program, the task executes in a separate thread and a "Please Wait..." message is shown as a modal wx.Dialog (as a child of the "main" window). With Xorg, the user can move and resize the "main" and the "secondary" windows on the screen while the thread is running and the modal dialog is shown.
With Wayland, the windows cannot be moved or resized while the modal dialog is active.

(3) At startup, the application creates empty plot panels in the "secondary" windows. The plot panels get painted correctly on Xorg, but on Wayland some parts are just blank (usually about 20% on the bottom and about 20% on the right). Re-plotting or adding data to the plots does not update the blank parts. Moving the windows on the screen does trigger any update or re-painting. The only way to trigger a proper re-painting of the plot panels is to resize the windows.

Any insights would be greatly appreciated!

Matthias

Hugues JEAN-BAPTISTE

unread,
Jan 14, 2021, 1:20:20 PM1/14/21
to Matthias Brennwald, wxpytho...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/81DXMQ.9MFICIMPXCK13%40gmail.com.

Hello Matthias,

I have problems too, but I can't determine the origin ...

(1) On Linux MAGEIA, GNOME/Wayland save programmatically position works well with Python 2.7 / wxPython.2.8.12, but does not work on Python 3.8 / wxPython 4.1.0 or wxPython 4.1.1. Maybe GTK problem ?

In the same environment, I have another problems (would be reproduced In the demo too) with wxGrids on wxPython 4.1.1 and no problem on wxPython 4.1.0. But with wxPython 4.1.0, many many GTK Warnings.

On Windows, Python 3.8 / wxPython.4.1.0 save programmatically position works, no problems with wxGrids, but sometimes all the Python program crashes. All work on Python 2.7 / wxPython 2.8.12.

I have not made tests on GNOME/Xorg ...

I imagine the paint is not yet dry, so I hope wxPython 4.1.2 will appear soon ... :-)

Hugues JEAN-BAPTISTE


Scott Talbert

unread,
Jan 14, 2021, 1:44:18 PM1/14/21
to wxpytho...@googlegroups.com, Matthias Brennwald
On Thu, 14 Jan 2021, Hugues JEAN-BAPTISTE wrote:

> (1) On Linux MAGEIA, GNOME/Wayland save programmatically position works well
> with Python 2.7 / wxPython.2.8.12, but does not work on Python 3.8 /
> wxPython 4.1.0 or wxPython 4.1.1. Maybe GTK problem ?
>
> In the same environment, I have another problems (would be reproduced In the
> demo too) with wxGrids on wxPython 4.1.1 and no problem on wxPython 4.1.0.
> But with wxPython 4.1.0, many many GTK Warnings.
>
> On Windows, Python 3.8 / wxPython.4.1.0 save programmatically position
> works, no problems with wxGrids, but sometimes all the Python program
> crashes. All work on Python 2.7 / wxPython 2.8.12.

I can at least give a hint on this one. wxPython 2.8.12 only supported
GTK2, and GTK2 doesn't support Wayland natively (and always uses
XWayland). So, basically your problems are with wxGTK when running on
Wayland.

Scott

Matthias Brennwald

unread,
Jan 15, 2021, 2:10:59 AM1/15/21
to wxpython-users
On Thu, Jan 14, 2021 at 13:51, Matthias Brennwald <mbre...@gmail.com> wrote:

I am writing a GUI application with wxPython, which uses a "main" window with all the controls, and some "secondary" windows where data gets plotted (using matplotlib). I am working mostly on GNOME/Xorg, but recently also was on GNOME/Wayland, where I observed a few issues with my application. I wonder if these issues are related to wxPython, Wayland, or both. Any thoughts or feedback would be welcome!

Just to provide a bit more context about my own question: major Linux distros have switched to using Wayland as the default rather than Xorg, or will soon switch. I therefore tend to believe that Wayland has reached a good level of maturity. However, if wxPython has problems with Wayland (as described in my original message), I'll have to consider other ways to get a proper GUI for my application. I would therefore like to better understand the situation of wxPython and Wayland. Would it be wrong to expect that these issues be ironed out within the next few week / months? Should I stick to wxPython or would it be better to consider other GUI frameworks?

Hugues JEAN-BAPTISTE

unread,
Jan 15, 2021, 4:46:49 AM1/15/21
to wxpytho...@googlegroups.com
Hello Scott,

Yes, good information.

My problems seem to disappear with GNOME on Xorg.

Thanks.

Hugues JEAN-BAPTISTE



Charles McKnight

unread,
Jan 15, 2021, 10:28:28 AM1/15/21
to wxpytho...@googlegroups.com
If, as someone responded, the problem is with wxGTK, then there is not much wxPython can do as it is a wrapper for wxWidgets. wxGTK is the underlying library for wxWidgets on Linux so I would suggest bringing the topic up in the wxWidgets forum.

Sent from my iPhone

> On Jan 15, 2021, at 01:46, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:
>
> 
> --
> You received this message because you are subscribed to the Google Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/2e4d5d56-c47c-052b-a393-89532c56314f%40agorinfo.fr.

Steve Barnes

unread,
Jan 15, 2021, 12:48:27 PM1/15/21
to wxpytho...@googlegroups.com

Do you experience any issues running the wxpython Demo suite under Weyland? If you do they you have a perfect minimal example to point to, and for people to try to debug, not then it may be something that you have been doing in your application that XOrg resolves for you but Weyland doesn't.

--

You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.

Matthias Brennwald

unread,
Jan 15, 2021, 4:16:04 PM1/15/21
to wxpytho...@googlegroups.com
On Fr, Jan 15, 2021 at 17:48, Steve Barnes <Gadge...@live.co.uk> wrote:
Do you experience any issues running the wxpython Demo suite under Weyland?

I don't know what the "wxpython Demo suite" is. I am using this: https://packages.debian.org/sid/python3-wxgtk4.0

I don't know if / where there is a "demo" that would go with this.

Scott Talbert

unread,
Jan 15, 2021, 6:11:59 PM1/15/21
to wxpytho...@googlegroups.com

Steve Barnes

unread,
Jan 16, 2021, 4:53:14 AM1/16/21
to wxpytho...@googlegroups.com
Of from a terminal just typing wxdemo __should__ download, unpack and install the wxdemo.

-----Original Message-----
From: wxpytho...@googlegroups.com <wxpytho...@googlegroups.com> On Behalf Of Scott Talbert
Sent: 15 January 2021 23:12
To: wxpytho...@googlegroups.com
Subject: RE: [wxPython-users] Re: wxPython / Wayland issues

On Fri, 15 Jan 2021, Matthias Brennwald wrote:

> On Fr, Jan 15, 2021 at 17:48, Steve Barnes <Gadge...@live.co.uk> wrote:
> Do you experience any issues running the wxpython Demo suite
> under Weyland?
>
>
> I don't know what the "wxpython Demo suite" is. I am using this:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpackages.debian.org%2Fsid%2Fpython3-wxgtk4.0&amp;data=04%7C01%7C%7Ca0cbf31dd30b4fda7cc708d8b9aaf621%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637463491208090885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=XfK02CwYtsW07mI5gHtTTc4yPMoyo7dgV0ZKwg36fec%3D&amp;reserved=0
>
> I don't know if / where there is a "demo" that would go with this.

https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Ftree%2FwxPy-4.0.x%2Fdemo&amp;data=04%7C01%7C%7Ca0cbf31dd30b4fda7cc708d8b9aaf621%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637463491208090885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ROBB2GeWj6UMA7khJY5VhhefVUKRDfbmqbgHJ2Qrdoo%3D&amp;reserved=0

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
To view this discussion on the web visit https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fwxpython-users%2Falpine.DEB.2.22.394.2101151811450.273155%2540bear.techie.net&amp;data=04%7C01%7C%7Ca0cbf31dd30b4fda7cc708d8b9aaf621%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637463491208090885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=EH5dWIrWh%2BhSOI8ZjBhw1c6OPHdS0gSXCrCKi6CbMU4%3D&amp;reserved=0.

Matthias Brennwald

unread,
Jan 16, 2021, 5:15:22 AM1/16/21
to wxpytho...@googlegroups.com
On Fr, Jan 15, 2021 at 18:11, Scott Talbert <s...@techie.net> wrote:
On Fri, 15 Jan 2021, Matthias Brennwald wrote:
On Fr, Jan 15, 2021 at 17:48, Steve Barnes <Gadge...@live.co.uk> wrote: Do you experience any issues running the wxpython Demo suite under Weyland? I don't know what the "wxpython Demo suite" is. I am using this: https://packages.debian.org/sid/python3-wxgtk4.0 I don't know if / where there is a "demo" that would go with this.
https://github.com/wxWidgets/Phoenix/tree/wxPy-4.0.x/demo

No joy:

>> svn co https://github.com/wxWidgets/Phoenix.git/trunk/demo ~/wx_demo >> cd wx_demo >> python3 demo.py Traceback (most recent call last): File "/home/brennmat/wx_demo/demo.py", line 3, in <module> import Main File "/home/brennmat/wx_demo/Main.py", line 75, in <module> import version ModuleNotFoundError: No module named 'version'


On Sa, Jan 16, 2021 at 09:53, Steve Barnes <Gadge...@live.co.uk> wrote:
Of from a terminal just typing wxdemo __should__ download, unpack and install the wxdemo.

Again, no joy:
>> wxdemo
bash: wxdemo: command not found

Steve Barnes

unread,
Jan 16, 2021, 5:32:20 AM1/16/21
to wxpytho...@googlegroups.com

Scott,

 

What do you get from the following commands?

 

python -c"import wx;print(wx.version(), wx.__file__);"

python -c"from wx.tools import wxget_docs_demo; wxget_docs_demo.demo_main();"

 

Steve

 

From: wxpytho...@googlegroups.com <wxpytho...@googlegroups.com> On Behalf Of Matthias Brennwald
Sent: 16 January 2021 10:15
To: wxpytho...@googlegroups.com
Subject: RE: [wxPython-users] Re: wxPython / Wayland issues

 

 

On Fr, Jan 15, 2021 at 18:11, Scott Talbert <s...@techie.net> wrote:

--

You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.

Scott Talbert

unread,
Jan 16, 2021, 9:13:01 AM1/16/21
to wxpytho...@googlegroups.com
On Sat, 16 Jan 2021, Matthias Brennwald wrote:

> On Fr, Jan 15, 2021 at 18:11, Scott Talbert <s...@techie.net> wrote:
> On Fri, 15 Jan 2021, Matthias Brennwald wrote:
> On Fr, Jan 15, 2021 at 17:48, Steve Barnes
> <Gadge...@live.co.uk> wrote: Do you experience
> any issues running the wxpython Demo suite under
> Weyland? I don't know what the "wxpython Demo suite"
> is. I am using this:
> https://packages.debian.org/sid/python3-wxgtk4.0 I
> don't know if / where there is a "demo" that would
> go with this.
>
> https://github.com/wxWidgets/Phoenix/tree/wxPy-4.0.x/demo
>
>
> No joy:
> >> svn co https://github.com/wxWidgets/Phoenix.git/trunk/demo ~/wx_demo >>
> cd wx_demo >> python3 demo.py Traceback (most recent call last): File
> "/home/brennmat/wx_demo/demo.py", line 3, in <module> import Main File
> "/home/brennmat/wx_demo/Main.py", line 75, in <module> import version
> ModuleNotFoundError: No module named 'version'

Does the svn client work with git repositories? I think Robin removed the
version file from git, but you should be able to just download the
tarball and use the demo in there:

https://files.pythonhosted.org/packages/8a/12/b9ef24e65f531e2cad20450fd1bc3538345f66049f262565dc5c708fe0e6/wxPython-4.0.7.tar.gz

Scott
Reply all
Reply to author
Forward
0 new messages