olaf neophyte and de.po updates, valgrind tweaks, delete green lady, inkscape dpi=96
[goodguy/history.git] / cinelerra-5.1 / guicast / bcwindowbase.C
index 724a44f772907222122912fcc26a51067041bf7b..621c560acb4b5363df11985e77aca1a13a934847 100644 (file)
@@ -4579,6 +4579,9 @@ void BC_WindowBase::flicker(int n, int ms)
 
 void BC_WindowBase::focus()
 {
-       XSetInputFocus(top_level->display, top_level->win, RevertToParent, CurrentTime);
+       XWindowAttributes xwa;
+       XGetWindowAttributes(top_level->display, top_level->win, &xwa);
+       if( xwa.map_state == IsViewable )
+               XSetInputFocus(top_level->display, top_level->win, RevertToParent, CurrentTime);
 }