wxGTK and compositor

17 views
Skip to first unread message

Pierre Tomon

unread,
Jan 12, 2023, 5:44:50 AMJan 12
to wx-u...@googlegroups.com
Hi,

I have some applications that depend on wxGTK and I noticed that it
require a compositor to display correctly.
Is possible to disable it, beacause I'm using a pure a X11 server?

Vadim Zeitlin

unread,
Jan 12, 2023, 6:04:10 AMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 11:19:12 +0100 'Pierre Tomon' via wx-users wrote:

PT> I have some applications that depend on wxGTK and I noticed that it
PT> require a compositor to display correctly.

If by "compositor" you mean a Wayland compositor, then, no, it doesn't,
why do you think it does?

PT> Is possible to disable it, beacause I'm using a pure a X11 server?

You should be able to use wxGTK just fine with X11. What problem exactly
are you having?

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Pierre Tomon

unread,
Jan 12, 2023, 7:13:07 AMJan 12
to wx-u...@googlegroups.com
Le Thu, 12 Jan 2023 12:04:07 +0100,
Vadim Zeitlin <va...@wxwidgets.org> a écrit :

> If by "compositor" you mean a Wayland compositor, then, no, it
> doesn't, why do you think it does?
Wayland compositor or X11 compositor.

> You should be able to use wxGTK just fine with X11. What problem
> exactly are you having?
When I run a wxGTK application, a second window is drawn on the
top left of the desktop. It's erased if I place a window above it.
It does not happen with classic GTK apps and if I use a compositor
such as picom.

Vadim Zeitlin

unread,
Jan 12, 2023, 7:17:04 AMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 13:13:04 +0100 'Pierre Tomon' via wx-users wrote:

PT> When I run a wxGTK application, a second window is drawn on the
PT> top left of the desktop. It's erased if I place a window above it.

Sorry, I've never seen it happen and I have no idea why it does, but it's
definitely not expected.

PT> It does not happen with classic GTK apps and if I use a compositor
PT> such as picom.

What is your environment and what do you use when you see the problem
above, Wayland or X? Can you try setting GDK_BACKEND=x11 explicitly if
you're using Wayland to check if this is a Wayland-specific problem?

Pierre Tomon

unread,
Jan 12, 2023, 7:36:13 AMJan 12
to wx-u...@googlegroups.com
Le Thu, 12 Jan 2023 13:17:01 +0100,
Vadim Zeitlin <va...@wxwidgets.org> a écrit :

> What is your environment and what do you use when you see the problem
> above, Wayland or X? Can you try setting GDK_BACKEND=x11 explicitly if
> you're using Wayland to check if this is a Wayland-specific problem?

I'm using Openbox with X only.
GDK_BACKEND=x11 does not solve the issue.

Vadim Zeitlin

unread,
Jan 12, 2023, 7:42:50 AMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 13:36:10 +0100 'Pierre Tomon' via wx-users wrote:

PT> Le Thu, 12 Jan 2023 13:17:01 +0100,
PT> Vadim Zeitlin <va...@wxwidgets.org> a écrit :
PT>
PT> > What is your environment and what do you use when you see the problem
PT> > above, Wayland or X? Can you try setting GDK_BACKEND=x11 explicitly if
PT> > you're using Wayland to check if this is a Wayland-specific problem?
PT>
PT> I'm using Openbox with X only.
PT> GDK_BACKEND=x11 does not solve the issue.

Yes, if you're already using X, selecting it explicitly isn't going to
change anything...

Unfortunately I have absolutely no idea about what's going on here, i.e.
I'm afraid you've found a bug, but I don't know how to fix it. If you can
try debugging this somehow, it would be great if you could please do it.
Otherwise please create an issue for this and attach a screenshot showing
what you see, maybe it will give some clue and at least this will help us
to keep track of this problem.

Thanks,

Simon Richter

unread,
Jan 12, 2023, 7:44:00 AMJan 12
to wx-u...@googlegroups.com
Hi,

On 1/12/23 13:17, Vadim Zeitlin wrote:

> PT> When I run a wxGTK application, a second window is drawn on the
> PT> top left of the desktop. It's erased if I place a window above it.

> Sorry, I've never seen it happen and I have no idea why it does, but it's
> definitely not expected.

I have the same thing with KiCad, also using plain X11, and I can
reproduce this in Xvnc as well.

Video: https://psi5.com/~geier/wx-artifacts.ogv

Simon
OpenPGP_signature

Vadim Zeitlin

unread,
Jan 12, 2023, 7:53:06 AMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 13:43:54 +0100 Simon Richter wrote:

SR> On 1/12/23 13:17, Vadim Zeitlin wrote:
SR>
SR> > PT> When I run a wxGTK application, a second window is drawn on the
SR> > PT> top left of the desktop. It's erased if I place a window above it.
SR>
SR> > Sorry, I've never seen it happen and I have no idea why it does, but it's
SR> > definitely not expected.
SR>
SR> I have the same thing with KiCad, also using plain X11, and I can
SR> reproduce this in Xvnc as well.

Interesting (not in a good way, but interesting nevertheless), thanks.
Does this happen with the minimal wx sample on your system too or only
KiCad? And, also, how exactly do you launch Xvnc? I should be able to
reproduce this in this way.

Thanks,

Simon Richter

unread,
Jan 12, 2023, 8:02:39 AMJan 12
to wx-u...@googlegroups.com
Hi Vadim,

On 1/12/23 13:53, Vadim Zeitlin wrote:

> SR> I have the same thing with KiCad, also using plain X11, and I can
> SR> reproduce this in Xvnc as well.

> Interesting (not in a good way, but interesting nevertheless), thanks.
> Does this happen with the minimal wx sample on your system too or only
> KiCad? And, also, how exactly do you launch Xvnc? I should be able to
> reproduce this in this way.

Not with the minimal example, but with the AUI example:
https://psi5.com/~geier/wx-artifacts.png

I started Xvnc with

$ startx /usr/bin/fvwm -- /usr/bin/Xvnc -depth 24 -geometry 1920x1080

so nothing special in the invocation.

Simon
OpenPGP_signature

Vadim Zeitlin

unread,
Jan 12, 2023, 10:27:43 AMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 14:02:34 +0100 Simon Richter wrote:

SR> Not with the minimal example, but with the AUI example:
SR> https://psi5.com/~geier/wx-artifacts.png

Thanks, it's very helpful to know that it can be reproduced with it.

SR> I started Xvnc with
SR>
SR> $ startx /usr/bin/fvwm -- /usr/bin/Xvnc -depth 24 -geometry 1920x1080
SR>
SR> so nothing special in the invocation.

And thanks again, I do see exactly the same thing as you do when using the
VNC server from tigervnc-standalone-server Debian package. Weirdly enough,
I didn't see it at first, when I was launching the sample from an ssh
session, but I do see it if I do

$ GDK_BACKEND=x11 ./samples/aui/auidemo

in an xterm launched inside Xtigervnc itself.

I still have no idea what's going on here but at least now I can start
doing random things in the hope that one of them works -- or someone
actually knowing what's going on fixes it in the meanwhile.

BTW, to begin with, I've tried checking if a simple GTK application showed
the same problem, but I can't even make it appear at any other position
than (0,0) and calling gtk_window_move() doesn't seem to have any effect,
even though it works for wxGTK, apparently.

I'm afraid I have to stop here for now because I really hadn't planned on
spending time on this today, so I've just created

https://github.com/wxWidgets/wxWidgets/issues/23135

for now, please feel free to subscribe to it and, of course, any ideas
about fixing this would be very welcome.

Regards,

Vadim Zeitlin

unread,
Jan 12, 2023, 6:34:37 PMJan 12
to wx-u...@googlegroups.com
On Thu, 12 Jan 2023 16:27:38 +0100 I wrote:

Me> I'm afraid I have to stop here for now because I really hadn't planned on
Me> spending time on this today, so I've just created
Me>
Me> https://github.com/wxWidgets/wxWidgets/issues/23135

Just to close this thread, I think I did fix this problem now in

https://github.com/wxWidgets/wxWidgets/commit/12497372fc01a512c0d392ec612b2359206c80c7

Please retest with the latest master (or by just applying this trivial fix
to your local copy) and let me know if you still see any problems.

I plan to backport this to 3.2 too soon and include it in 3.2.2 release.

Thanks in advance for testing,
Reply all
Reply to author
Forward
0 new messages