diff --git a/src/render/render_opengl.cpp b/src/render/render_opengl.cpp
index aaf5f1c2288ce75369c30fba74f46be1fd80e829..e61e1b442c702664b7870c3101a9c9dd5badfa09 100644
--- a/src/render/render_opengl.cpp
+++ b/src/render/render_opengl.cpp
@@ -224,7 +224,7 @@ void  Render_opengl::paintGL(){
     string buf_txt;  
 
     resizeGL(width(), height());
- 
+    setFocus(Qt::ActiveWindowFocusReason);/* give the focus to the render area for mouse and keyboard events */
     glClearDepth(1.0);
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);