linux bugfixes for window handlers