From: Good Guy Date: Sun, 9 Sep 2018 20:21:51 +0000 (-0600) Subject: req input focus wdw be viewable X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=3b781cd7b4b9c477e637adb876a229d2781ee33b;p=goodguy%2Fhistory.git req input focus wdw be viewable --- diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index 724a44f7..621c560a 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -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); }