Bug 210329 - [GTK] Avoid direct GdkEvent field usage in GtkUtilities.h
Summary: [GTK] Avoid direct GdkEvent field usage in GtkUtilities.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-04-10 01:52 PDT by Adrian Perez
Modified: 2020-04-10 03:25 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.62 KB, patch)
2020-04-10 01:54 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

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