Index: src/workspaces.c =================================================================== --- src/workspaces.c (revision 24755) +++ src/workspaces.c (working copy) @@ -383,7 +383,7 @@ { if (new_focus) { - clientSetFocus (screen_info, new_focus, timestamp, NO_FOCUS_FLAG); + clientSetFocus (screen_info, new_focus, timestamp, FOCUS_SORT); } else { Index: src/events.c =================================================================== --- src/events.c (revision 24755) +++ src/events.c (working copy) @@ -1446,7 +1446,7 @@ { if (screen_info->params->prevent_focus_stealing) { - ev->value_mask &= ~CWStackMode; + ev->value_mask &= ~(CWSibling | CWStackMode); TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION); clientSetNetState (c); Index: src/misc.c =================================================================== --- src/misc.c (revision 24755) +++ src/misc.c (working copy) @@ -117,6 +117,7 @@ ev.window = w; ev.message_type = display_info->atoms[WM_PROTOCOLS]; ev.format = 32; + ev.send_event = TRUE; ev.data.l[0] = display_info->atoms[atom_id]; ev.data.l[1] = timestamp; XSendEvent (myScreenGetXDisplay (screen_info), w, FALSE, 0L, (XEvent *)&ev);