Bug 210158 - [GTK4] Make PAL::systemBeep() work
Summary: [GTK4] Make PAL::systemBeep() work
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-07 15:01 PDT by Adrian Perez
Modified: 2020-04-08 13:55 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.31 KB, patch)
2020-04-07 15:08 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch for lnding (2.33 KB, patch)
2020-04-08 07:50 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-07 15:01:06 PDT
gdk_beep() is no more in GTK4
Comment 1 Adrian Perez 2020-04-07 15:08:35 PDT
Created attachment 395744 [details]
Patch
Comment 2 Adrian Perez 2020-04-08 00:58:22 PDT
Thanks, I'll land this once the patch for bug #210154 is
in the tree =)
Comment 3 Michael Catanzaro 2020-04-08 06:24:19 PDT
Comment on attachment 395744 [details]
Patch

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

> Source/WebCore/PAL/pal/system/gtk/SoundGtk.cpp:31
> +    if (auto* display = gdk_display_get_default())
> +        gdk_display_beep(display);

This is available since GDK 2.2. There's no need to use #if here.
Comment 4 Adrian Perez 2020-04-08 07:44:50 PDT
(In reply to Michael Catanzaro from comment #3)
> Comment on attachment 395744 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=395744&action=review
> 
> > Source/WebCore/PAL/pal/system/gtk/SoundGtk.cpp:31
> > +    if (auto* display = gdk_display_get_default())
> > +        gdk_display_beep(display);
> 
> This is available since GDK 2.2. There's no need to use #if here.

Good point, I'll remove the conditional

Note to self: Always check which version first introduced a symbol,
for those cases where we can update the code in ways that it will
work both with GTK3 and GTK4.
Comment 5 Adrian Perez 2020-04-08 07:50:11 PDT
Created attachment 395808 [details]
Patch for lnding
Comment 6 Adrian Perez 2020-04-08 13:55:38 PDT
Committed r259754: <https://trac.webkit.org/changeset/259754>