Bug 210329

Summary: [GTK] Avoid direct GdkEvent field usage in GtkUtilities.h
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKitGTKAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, cdumez, cgarcia, mcatanzaro, zan
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 210100    
Attachments:
Description Flags
Patch none

Description Adrian Perez 2020-04-10 01:52:00 PDT
Accessing GdkEvent field events is deprecated in
GTK3 and unsupported in GTK4. Let's not do that
in “Source/WebCore/platform/gtk/GtkUtilities.h” :)
Comment 1 Adrian Perez 2020-04-10 01:54:30 PDT
Created attachment 396067 [details]
Patch
Comment 2 Adrian Perez 2020-04-10 02:10:22 PDT
Comment on attachment 396067 [details]
Patch

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

> Source/WebCore/platform/gtk/GtkUtilities.h:37
> +    const auto eventTime = gdk_event_get_time(reinterpret_cast<GdkEvent*>(const_cast<GdkEventType*>(event)));

FTR, the “const_cast” here is needed because the accessor does no longer
have “const” as type qualifier in GTK4, even when its code does not modify
the GdkEvent.
Comment 3 EWS 2020-04-10 03:25:34 PDT
Committed r259854: <https://trac.webkit.org/changeset/259854>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396067 [details].