#include <X11/XF86keysym.h>
#include <X11/Sunkeysym.h>
-
BC_ResizeCall::BC_ResizeCall(int w, int h)
{
this->w = w;
PropModeReplace, (unsigned char *)&XGroupLeader, true);
}
init_im();
+ set_icon(get_resources()->default_icon);
}
#ifdef HAVE_LIBXXF86VM
cursor_entered = 1;
}
if( cursor_entered )
- XSetInputFocus(display, win, RevertToParent, CurrentTime);
+ focus();
}
event_win = event->xany.window;
cursor_x = event->xcrossing.x;
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);
+}
+