Preliminary Wayland support

Bug #975355 reported by Darxus
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Low
Unassigned

Bug Description

To work with wayland, gdk_x11_ calls and Xlib calls need to be wrapped in build-time and run-time backend checks: http://developer.gnome.org/gtk3/3.3/ch24s02.html#id1502079

$ grep -r gdk_x11 .
./midori/sokoke.c: Atom save_mode_atom = gdk_x11_get_xatom_by_name_for_display (
./midori/midori-browser.c: gdk_x11_xatom_to_atom (XA_INTEGER),

$ grep -r Xlib .
./midori/main.c: #include <X11/Xlib.h>

http://wayland.freedesktop.org/gtk.html

The wayland backend in GTK+ 3.4 works, so as soon as these are done midori should be usable with wayland.

Tags: wayland
Darxus (darxus)
tags: added: wayland
Revision history for this message
gue5t gue5t (gue5t) wrote :

I put some work into getting webkitgtk working with wayland and then tested out midori. We do indeed need runtime checks in a few places. The attached patch is a good start, but we need to do some other work to make Wayland (and other GDK backends) work perfectly with midori, e.g. add runtime checks for the version string instead of always "X11" if it was available at compile time.

To get webkitgtk 1.8.3 to build, I had to reimplement webkit's GtkWidgetBackingStoreX11.cpp in terms of wayland surfaces, and to do /that/ I had to make the symbol gdk_wayland_create_cairo_surface (in GTK3) visible; presumably those two packages will make their own efforts to fix things, but in the meantime this was enough to get midori up and running. It should be noted that libunique3 is not wayland-compatible; I had to pass --disable-unique to configure.

I'll submit additional bug reports for fixes to individual wayland-specific issues, but this is, again, enough to build and run for now.

Revision history for this message
Cris Dywan (kalikiana) wrote :

That GDK_IS_X11_DISPLAY looks dubious - why is it hardcoded to TRUE?

Revision history for this message
Cris Dywan (kalikiana) wrote :

The #define is there because older GTK+ releases don't have those macros. It's safe to "hard-code" TRUE because it's always inside an X11 check anyway. Wayland here we come!

Changed in midori:
status: New → Fix Committed
Revision history for this message
Darxus (darxus) wrote :

After talking to gue5t some about this, I don't think it should be marked "fix committed" because the necessary changes haven't been completed or submitted to webkitgtk.

Changed in midori:
status: Fix Committed → New
Revision history for this message
gue5t gue5t (gue5t) wrote :

I'm not sure what classification exactly this should have, but it's not quite "New". On the midori side our work for preliminary Wayland support is done, but for end-users it's not going to be usable until other projects make some progress (I'm working on getting my webkit patch to work better with the other code so it can be submitted to upstream, but that wouldn't be doable until upstream GDK exposes gdk_wayland_create_cairo_surface). "In Progress" is probably most applicable.

Changed in midori:
status: New → In Progress
Cody Garver (codygarver)
summary: - Wayland support
+ Preliminary Wayland support
Changed in midori:
status: In Progress → Fix Released
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.