RĂ©mi Bernon rbernon@codeweavers.com writes:
@@ -700,7 +700,12 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) hwnd, IsWindowEnabled(hwnd), IsWindowVisible(hwnd), GetWindowLongW(hwnd, GWL_STYLE), GetFocus(), GetActiveWindow(), GetForegroundWindow(), last_focus );
if (can_activate_window(hwnd))
if (is_managed(hwnd))
{
set_focus( event->display, hwnd, event_time );
return;
}
else if (can_activate_window(hwnd))
This will completely break the take focus mechanism.
The complicated heuristic to find an appropriate window is very much necessary, you can't just give focus to the window suggested by the window manager. For instance, a disabled window should never receive focus.