Implement avtivate_window function

Conflicts:
	src/main.cpp