From: Alexandre Julliard Subject: Re: [PATCH v3 02/10] winex11.drv: Call XSetInputFocus only, whenever WM_TAKE_FOCUS is received. Message-Id: <87wodf7h1q.fsf@wine> Date: Tue, 08 Oct 2019 10:55:13 +0200 In-Reply-To: <20191007130216.21159-3-rbernon@codeweavers.com> (=?utf-8?Q?=22R=C3=A9mi?= Bernon"'s message of "Mon, 7 Oct 2019 15:02:08 +0200") References: <20191007130216.21159-1-rbernon@codeweavers.com> <20191007130216.21159-3-rbernon@codeweavers.com> RĂ©mi Bernon writes: > This will trigger a normal FocusIn event for the corresponding window, > which would then call set_focus. > > It makes the handling of Focus events simpler by avoiding different > codepaths depending on whether or not WM_TAKE_FOCUS is used. We can > then also safely delay the WM_ACTIVATE messages without delaying the > input focus from the WM perspective. The problem is that some window managers assign focus to the window before sending WM_TAKE_FOCUS, even though they shouldn't. That's why we have to ignore FocusIn when using take focus mode. -- Alexandre Julliard julliard@winehq.org