fix crashing when Xnamespace is enabled and a minor improvement
currently, the xserver can crash when running with xnamespace extension enabled when closing clients. this is due to the client's namespace being cleared when the client closes but before other code is done using its value. this pr solves this by adding a new client state before ClientStateGone and having all other code use this new state. this way xnamespace can clear the client's namespace after the other code is done using its value.
this pr also changes code in xnamespace to print everything into the xserver's log by having all XNS log macros call LogMessage() instead and replacing all instances of printf with XNS_LOG().
closes: #486
hmm, maybe it's better adding action field to NewClientInfoRec telling what really happens, so we look at this instead of the current state. And then add another call right at the place where the client is destroyed
sounds good to me for now. i'll try and see what happens.
@metux is it all good now?
after sleeping over this, I'm thinking we should do it a much simpler way: just add new new callback that's fired when a client is actually destroyed, and leave the existing hook alone.
Here's a very simple and straightforward approach: just adding a new callback.
https://github.com/X11Libre/xserver/pull/1090
Once that's merged, we easily use it for fixing this bug - no need to ever tinker with client-state's
Here's a very simple and straightforward approach: just adding a new callback.
#1090
Once that's merged, we easily use it for fixing this bug - no need to ever tinker with client-state's
Hacked up a quick fix based on this in branch wip/client-destroy-hook - haven't had the time to really test it yet.
Here's a very simple and straightforward approach: just adding a new callback.
#1090
Once that's merged, we easily use it for fixing this bug - no need to ever tinker with client-state's
It's merged now, so we can use it.
@mahiro21h needs rebase and resolving conflicts. perhaps the issue already is resolved by recent commits (new callback)
Merge Conflict found
@mahiro21h needs rebase