/* This is focus stealing prevention */
ob_debug_type(OB_DEBUG_FOCUS,
/* This is focus stealing prevention */
ob_debug_type(OB_DEBUG_FOCUS,
- /* If something is focused, and it's not our relative... */
- else if (focus_client && client_search_focus_tree_full(self) == NULL &&
- client_search_focus_group_full(self) == NULL)
- {
+ /* If something is focused... */
+ else if (focus_client) {
/* If the user is working in another window right now, then don't
steal focus */
if (event_last_user_time && launch_time &&
/* If the user is working in another window right now, then don't
steal focus */
if (event_last_user_time && launch_time &&
- /* If it's a transient (and its parents aren't focused) */
- else if (client_has_parent(self)) {
+ /* If the new window is a transient (and its relatives aren't
+ focused) */
+ else if (client_has_parent(self) && !relative_focused) {
activate = FALSE;
ob_debug_type(OB_DEBUG_FOCUS,
"Not focusing the window because it is a "
activate = FALSE;
ob_debug_type(OB_DEBUG_FOCUS,
"Not focusing the window because it is a "
ob_debug("Managed window 0x%lx plate 0x%x (%s)",
window, self->frame->window, self->class);
ob_debug("Managed window 0x%lx plate 0x%x (%s)",
window, self->frame->window, self->class);
hooks_run(OB_HOOK_WIN_CLOSE, self);
/* update the focus lists */
hooks_run(OB_HOOK_WIN_CLOSE, self);
/* update the focus lists */
client_setup_decor_and_functions(self, FALSE);
client_move_resize(self, x, y, w, h);
client_setup_decor_and_functions(self, FALSE);
client_move_resize(self, x, y, w, h);
/* resize the frame to just the titlebar */
frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
/* resize the frame to just the titlebar */
frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
sizeof(answers)/sizeof(answers[0]),
OB_KILL_RESULT_NO, /* default = no */
OB_KILL_RESULT_NO, /* cancel = no */
sizeof(answers)/sizeof(answers[0]),
OB_KILL_RESULT_NO, /* default = no */
OB_KILL_RESULT_NO, /* cancel = no */
client_reconfigure(self, FALSE);
if (old != self->desktop)
client_reconfigure(self, FALSE);
if (old != self->desktop)
client_setup_decor_and_functions(self, TRUE);
client_change_state(self); /* reflect this in the state hints */
client_setup_decor_and_functions(self, TRUE);
client_change_state(self); /* reflect this in the state hints */
- hooks_run((undecorated ?
- OB_HOOK_WIN_UNDECORATED : OB_HOOK_WIN_DECORATED), self);
+ hooks_queue((undecorated ?
+ OB_HOOK_WIN_UNDECORATED : OB_HOOK_WIN_DECORATED), self);