implemented swapbuffers on linus window but keep working unproperly