[X2Go-Dev] [PATCH] Fix threading on OS X.
Mihai Moldovan
ionic at ionic.de
Wed Feb 22 02:30:17 CET 2012
Hi Alex
* On 20.02.2012 09:14 AM, Oleksandr Shneyder wrote:
> It is really nice that somebody want to make x2goclient working on Mac.
Why "wants"? It actually kinda is... ;)
> Unfortunately, building x2goclient for Mac is not enough. There are some
> features in x2goclient (especially managing of nx-proxy window) which
> can not be written with Qt methods, but only with system API (libx11 and
> winapi).
So what? This has never been a problem on Linux, why would it be on OS X?
> In addition, there are many changes from version to version in
> Mac OS itself. Especially it relevant to X11. The behaviour of X11 can
> be changed even within the same version of Mac OS with every new version
> of X11.
Luckily, the X11 API is pretty stable from what I have seen. I've been
using x2goclient with X11R6.8 before (default Xorg version Apple ships,
horribly outdated) up to X11R7.8 (I guess? xorg-server 1.11 which isn't
even officially released yet IIRC) and it never broke. nx didn't either.
Even other programs like wine or GTK based programs I use every now and
then never had any compatibility issues for me. However, I have to admit
that my setup is somewhat special and I'd like to test on vanilla stuff
too, even including OS X 10.7 (I'm still on 10.6.)
> So, you should be sure, that changes you made in x2goclient
> working with actual versions of mac and X11.
Yeah, I always do. :)
> Please be sure also, that
> changes you making in code of x2go client will not break its
> functionality on other systems and you always using the
> #if defined ( Q_OS_DARWIN )
> #endif
> clauses
Sure, anything else would be really stupid and I employed the macro,
too, right from the beginning.
> I still plan to rewrite code of x2goclient to make it more
> understandable for other people and make hacking of it easier.
Sounds like a good idea, some parts are difficult to understand and have
fragments of previously used approaches to tackle a problem which
weren't removed and are thus merely causing confusion when reading the code.
As such, allow me one question: SshMasterConnection is using a 512 KByte
buffer for I/O operations via SSH. This sounds a little bit high and is
probably only useful in LAN environments or over high-speed broadband
connections. Anyway, I could live with that. What strikes me odd is
allocating this buffer on the stack in the local method. Wouldn't it be
better to use a pointer as a class variable, allocate it in the class
constructor on the heap via new char[512*1024] and leave it as-is (it
will be automatically deleted once the class terminates)? Also, I see
with the current implementation as in general, variables/arrays
allocated on the stack are not zero-initialized and may contain memory
garbage - do we really want this? Class variables are always
zero-initialized so that's another good reason to prefer this method.
Thanks for reading this wall of text.
Best regards,
Mihai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4369 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20120222/dd03e988/attachment.bin>
More information about the x2go-dev
mailing list