req input focus wdw be viewable
authorGood Guy <good1.2guy@gmail.com>
Sun, 9 Sep 2018 20:21:51 +0000 (14:21 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 9 Sep 2018 20:21:51 +0000 (14:21 -0600)
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);
 }