Bug 212314 - [GTK4] Make PointerLock work
Summary: [GTK4] Make PointerLock work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 212298
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-05-24 05:40 PDT by Carlos Garcia Campos
Modified: 2020-06-01 04:53 PDT (History)
2 users (show)

See Also:


Attachments
Patch (35.39 KB, patch)
2020-05-24 06:38 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>