X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcwindowbase.C;h=1ef0d5939cc8e697ae71ffe3a94b2bbcdc894b3b;hp=7de7c15d2d13573043729aa9d01dcf9c7d69ead9;hb=04031cc2a664d2a6d9d2a37954c55cc68742d78c;hpb=a4387a272874bd4ed9f010684976f336fa3d0190 diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index 7de7c15d..1ef0d593 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -62,7 +62,6 @@ #include #include - BC_ResizeCall::BC_ResizeCall(int w, int h) { this->w = w; @@ -547,6 +546,7 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title PropModeReplace, (unsigned char *)&XGroupLeader, true); } init_im(); + set_icon(get_resources()->default_icon); } #ifdef HAVE_LIBXXF86VM @@ -1357,7 +1357,7 @@ locking_message = event->xclient.message_type; cursor_entered = 1; } if( cursor_entered ) - XSetInputFocus(display, win, RevertToParent, CurrentTime); + focus(); } event_win = event->xany.window; cursor_x = event->xcrossing.x; @@ -4577,3 +4577,11 @@ void BC_WindowBase::flicker(int n, int ms) set_opaque(); } +void BC_WindowBase::focus() +{ + XWindowAttributes xwa; + XGetWindowAttributes(top_level->display, top_level->win, &xwa); + if( xwa.map_state == IsViewable ) + XSetInputFocus(top_level->display, top_level->win, RevertToParent, CurrentTime); +} +