[webkit-gtk] can be modified in this way?

Adrian Perez de Castro aperez at igalia.com
Fri Jun 15 05:12:11 PDT 2018


On Fri, 15 Jun 2018 18:20:16 +0800 (CST), tugouxp <13824125580 at 163.com> wrote:

>    HI all:
>        on webkit gtk 2.20.2, the createplatformdisplay class,  can the
>        "gdk_wayland_display_get_wl_display(display)" be replaced by
>        "wl_display_connect(nullptr)"
> and i tested it works fine. is they identical by default display?

Most of the time both function calls will return a wl_display connected to the
same display. There might be subtle cases in which the display returned by
wl_display_connect(nullptr) will not be the same as the one being used by
GDK/GTK+ —right now I cannot think of an example— and that would be a problem.

Another problem when using wl_display_connect() is that there will be *two*
connections to Wayland (one created by the function call, plus the one being
used by GDK/GTK+). Obtaning the display being used by GDK reuses the same
connection that GDK (and GTK+) are already using, resulting in less usage of

Understanding what are you trying to achieve would be very helpful, otherwise
I do not see any good reason to for the change. Why do you need the suggested

Best regards,

 Adrián 🎩
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20180615/301122c6/attachment.bin>

More information about the webkit-gtk mailing list