grab_server(TRUE);
- /* check if it has already been unmapped by the time we started mapping
+ /* check if it has already been unmapped by the time we started mapping.
the grab does a sync so we don't have to here */
if (XCheckTypedWindowEvent(ob_display, window, DestroyNotify, &e) ||
XCheckTypedWindowEvent(ob_display, window, UnmapNotify, &e))
{
XPutBackEvent(ob_display, &e);
+ ob_debug("Trying to manage unmapped window. Aborting that.\n");
grab_server(FALSE);
return; /* don't manage it */
}
won't be all wacko!!
also, this moves the window to the position where it has been placed
*/
+ ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",
+ self->window, newx, newy, self->area.width, self->area.height);
client_apply_startup_state(self, newx, newy);
keyboard_grab_for_client(self, TRUE);
else
{
/* If time stamp is old, don't steal focus */
- if (self->user_time && self->user_time < client_last_user_time)
+ if (self->user_time &&
+ !event_time_after(self->user_time, client_last_user_time))
+ {
activate = FALSE;
+ }
/* Don't steal focus from globally active clients.
I stole this idea from KWin. It seems nice.
*/
/* choose the correct target */
self = client_focus_target(self);
-#if 0
- if (!client_validate(self))
- return FALSE;
-#endif
-
if (!client_can_focus(self)) {
if (!self->frame->visible) {
/* update the focus lists */
"source=%s\n",
self->window, event_curtime, client_last_user_time,
(user ? "user" : "application"));
- if (!user && event_curtime && event_curtime < client_last_user_time)
+ if (!user && event_curtime &&
+ !event_time_after(event_curtime, client_last_user_time))
+ {
client_hilite(self, TRUE);
- else {
+ } else {
if (client_normal(self) && screen_showing_desktop)
screen_show_desktop(FALSE);
if (self->iconic)