[PATCH] winex11.drv: Wait for XGrabPointer to succeed on FocusIn events.

Rémi Bernon rbernon at codeweavers.com
Wed Sep 18 07:31:41 CDT 2019


On 9/18/19 2:22 PM, Rémi Bernon wrote:
> On 9/18/19 2:13 PM, Rémi Bernon wrote:
>>       case NotifyUngrab:
>> +        wait_for_pointer_ungrab( event->display );
>>           keyboard_grabbed = FALSE;
>>           retry_grab_clipping_window();
>>           return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab 
>> events w.r.t focus */
> 
> Note that this line, when using mutter/gnome-shell at least, will make 
> it almost impossible to switch to activity view using the Super key.
> 
> There's a small delay between the moment mutter releases the keyboard 
> grab and sends the event, and the moment gnome-shell itself grabs the 
> cursor and keyboard and if the application grabs the cursor in between - 
> like it is done here even for a brief moment, gnome-shell is unable to 
> get its grab and does not open the view.
> 
> In Proton we've specifically added a delay before that to let 
> gnome-shell get its grab, but the mutter workarounds are not upstreamed. 
> I could add a delay here as well, without the mutter specific check, if 
> it seems appropriate.

Although since 92177b0b161e91f1d609615d89d8e3199feea33f we were already 
retrying immediately to grab the pointer in retry_grab_clipping_window, 
so this patch won't change much. The delay might help anyway for both cases.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list