Bug 212314

Summary: [GTK4] Make PointerLock work
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=212592
Bug Depends on: 212298    
Bug Blocks: 210100    
Attachments:
Description Flags
Patch aperez: review+

Description Carlos Garcia Campos 2020-05-24 05:40:27 PDT
There's no gdk_device_warp() nor grabs in GTK4 so we will have to use XLib API.
Comment 1 Carlos Garcia Campos 2020-05-24 06:38:05 PDT
Created attachment 400158 [details]
Patch
Comment 2 Adrian Perez 2020-05-26 08:19:20 PDT
Comment on attachment 400158 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400158&action=review

> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:166
> +#if USE(GTK4)

You don't need this #if, we have a “gdk_event_get_root_coords()”
stub in “GtkVersioning.h” which works for GTK4 :)
Comment 3 Carlos Garcia Campos 2020-05-27 00:54:54 PDT
Comment on attachment 400158 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400158&action=review

>> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:166
>> +#if USE(GTK4)
> 
> You don't need this #if, we have a “gdk_event_get_root_coords()”
> stub in “GtkVersioning.h” which works for GTK4 :)

I left this one on purpose to avoid calling gdk_event_get_coords() again. Maybe it's not worth the super-micro-optimization, though. I'll change to improve the code readability.
Comment 4 Carlos Garcia Campos 2020-05-27 01:09:56 PDT
Committed r262187: <https://trac.webkit.org/changeset/262187>