GLX subwindow origin function of top-level window origin? Pics.
Brought to you by:
marha
In the attached picture (just downloaded) the subwindow's origin should be 0,0 in the client area. If the main window is moved on the desktop, the origin grows further from 0,0 as the main window is moved further from 0,0 in desktop coordinates.
Mouse input events seem to use the correct origin. The subwindow is an HWND, that can be highlighted with Spy++. It's not a glViewport problem in other words. The image is rendered with GLX. Its class in Spy++ is XWinGLTest.
EDITED: I should add that wxWidgets puts the wxGLCanvas into a subwindow. It doesn't have an option to do GLX on the "frame" window. This problem makes wxGLCanvas a nonstarter for VcXsrv.
Hello, could this be related to this?
Well, this project must be dead since this is an old/serious report (so I would switch if I were you) but my thinking at the time is it was down to poor implementation of GLX (OpenGL) since that's a badly supported feature for all Windows X servers.
I was just doing a quick review of Windows servers, so I just uninstalled this one on the same day I reported this. I think it probably is the same thing. It would mean VcXsrv doesn't implement X subwindows correctly if so.
If you open a new ticket would you please cross-post a link to this one's.
Last edit: Mick P. 2020-01-07
Hello,
thanks for your answer. I have no problem with switching to an alternative. But what alternatives are there? The only one I know about is Xming, which I tried and have the same problem with.
Can you point me towards a X-Server that doesn't have that problem?
MobaXterm includes an X server, free for personal use, but not for commercial/business use. I have no idea if it will have the same issue (which I have never seen using VcXsrv).
I think I tried this, and wouldn't call what it does an X server. I think it doesn't work so well for running local apps, which is what you do with WSL. It generates an IP address for itself that you would have to manually add to your client's environment (every time) and its X server is more like an afterthought that doesn't really work all that well if at all. I think one of its options is based on Cygwin's and it had another based on something else.
MobaXterm is built from X.org source code, same as VcXsrv, Xming, and Cygwin. If you use the built-in ssh client to connect to a remote system, it supports X11 forwarding using the DISPLAY variable to display remote X11 applications on the local X server. I admit I haven't experimented with this, since I use VcXsrv.
I would hardly call VcXsrv dead, last release was in July, with 124k downloads since. X.org is a mature codebase, so frequent releases are not necessary.
They share the base source code but only Cygwin's has code inside the X.org source tree. The DISPLAY variable is separate from forwarding I think (which has to do with security/authentication) but I anyway could not use the MobaXterm setup because my WSL bash shell sets DISPLAY to the localhost and that didn't work with it since it generated random addresses.
If VcXsrv isn't dead no one is dealing with this bug, which breaks OpenGL (GLX) or X subwindows one. It looks unmaintained but OpenGL is the red headed stepchild of X servers... I don't actually know if whatever server Linux users use (I assume there's just one on Linux) honors OpenGL functionality or not, but I assume that it does so. In Windows there is no complete implementation of OpenGL.
Last edit: Mick P. 2020-01-09
Cygwin's is the best I think. I don't see this bug with Xming servers (free/paid) so it may be something unrelated. This project looks long dead to me. The others are commercial, and don't do OpenGL so well. I've tried X410 that looks like it's based on Xming's code. The maintainers of these servers aren't great and the servers aren't either, but I assume most do the job for stuff like GTK apps.
Last edit: Mick P. 2020-01-08
I've tried Xming with the latest (2007) release as well facing the same issue.
I've also tried MobaXTerm. It will automatically suggest to use WSL, you can just login to your Ubuntu (or whatever) distro and start the GUI apps from there. They will open with the built in X server. It works, I don't experience the same issues.
I've also tried X410 - in my opinion this is by far the best X server. I can't actually tell you why. It just feels buttery smooth to use. Has no issues at all. The only downsize is the price (50€ currently in the MS Store).
For me X410 is currently $10 in the US store, which is what I got it for. It has a slash through $50. It's always on sale for 80% off, but I don't necessarily recommend it. From what I can tell (I do some development on/for X servers) it's probably nearly identical to the old/free version of Xming with a little extra work on the taskbar integration. Plus it doesn't work (just like Xming) for many applications, near as well as Cygwin's does, which is neither great, at least for OpenGL.
I bought X410 so I could test it with my own software and program any special cases to make it work better, but found it had the same quirks as Xming. So I had more of a reason to try different servers than just to find one that lets me use WSL. (I use WSL to avoid doing cross-platform work on an actual Linux installation.)
I didn't have that experience (some time ago) with MobaXTerm but don't want to discuss it further. I think it's like a swiss army knife program, that's not really an X server that runs in the background.
Installing Cygwin is very simple. I would try that if you haven't. It can also do direct OpenGL if you do 3D work, but is very compatible and stable too.
Well, I've tested X410, for me it does not have the bug. I can't tell anything about other applications because I only use emacs.
I've tried cygwin (and msys2) before I switched to WSL. But overall I found the experience not that great to be honest. It was a pain to set up and overall there were some compability issues I couldn't resolve. I'm quite happy with WSL because it's just a breeze.
I may look into cygwin's X server again. I've also used MobaXTerm, also doesn't have the issue. However I'm looking for just a X server, MobaXTerm actually comes packed with too many things for my liking.