GNOME Bugzilla – Bug 663550
The interface for gdk-wayland should be updated
Last modified: 2012-01-29 08:48:16 UTC
gdk-wayland can not be compiled. Need to update the interfaces.
sent 3 patches to the mail list(gtk-devel-list@gnome.org and wayland-devel@lists.freedesktop.com) for your review to resolve this problem The mail names are: [gtk-wayland v2 PATCH 1/3] update wl_visual related operations to eglconfig [gtk-wayland v2 PATCH 2/3] gtk-wayland: update interfaces bindings and display sync APIs [gtk-wayland v2 PATCH 3/3] ignore the windows updates with wrong width and height
Created attachment 200876 [details] [review] Because wl_visual related interfaces are removed in wayland, the code can not be compiled.
Created attachment 200877 [details] [review] The code can not be compiled, because the wl_display related interfaces are changed in wayland. The code can not be compiled, because the wl_display related interfaces are changed in wayland. Update wl_display_sync_callback APIs to wl_callback_add_listener and wl_display_roundtrip for display sync. Because wl_xxx_create is removed in wayland. Update it to wl_display_bind for binding related interfaces like wl_shm_interface. Clean compositor listener which is used for visual changing.
Created attachment 200878 [details] [review] We meet segment fault according to the wrong width and height. When running applications over wayland, like testcombo. We meet segment fault according to the wrong width and height. Ignore these window's updates.
Review of attachment 200876 [details] [review]: I understand that the wayland backend is experimental, and it has a different coding style already, but it would be nice if you used the GTK+ coding style, as documented in Git: http://git.gnome.org/browse/gtk+/tree/docs/CODING-STYLE ::: gdk/wayland/gdkdisplay-wayland.c @@ +244,3 @@ + if (!eglChooseConfig(display_wayland->egl_display, premul_argb_cfg_attribs, + display_wayland->premultiplied_argb_config, 1, &n) || n != 1) { + fprintf(stderr, "failed to choose premul argb config\n"); please, use g_warning() instead of fprintf(). g_warning() will go through the GLib logging facilities. @@ +250,3 @@ + if (!eglChooseConfig(display_wayland->egl_display, rgb_cfg_attribs, + display_wayland->rgb_config, 1, &n) || n != 1) { + display_wayland->premultiplied_argb_config = NULL; same as above: use g_warning() @@ +255,3 @@ + if (!eglChooseConfig(display_wayland->egl_display, argb_cfg_attribs, + display_wayland->argb_config, 1, &n) || n != 1) { + if (!eglChooseConfig(display_wayland->egl_display, rgb_cfg_attribs, same as above: use g_warning() @@ +259,3 @@ + } + + fprintf(stderr, "failed to choose rgb config\n"); I'm not so sure about having these environment variables. also, they should be under the GDK namespace.
Review of attachment 200878 [details] [review]: ::: gdk/gdkwindow.c @@ +3893,3 @@ GdkRectangle clip_box; + if( window->width < 0 || window->height < 0 ) please, follow the coding style. also, I'm not so sure this is really an issue in GTK/GDK: we expect GdkWindows to be at least 1x1; why is Wayland giving us a negative size?
Review of attachment 200877 [details] [review]: apart from the coding style, this looks good.
Comment on attachment 200876 [details] [review] Because wl_visual related interfaces are removed in wayland, the code can not be compiled. I will update a new one for it.
Comment on attachment 200877 [details] [review] The code can not be compiled, because the wl_display related interfaces are changed in wayland. I will update a new one for it.
Created attachment 202621 [details] [review] wl_visual related interfaces update patch v2
Created attachment 202622 [details] [review] wl_display related interfaces update patches v2
Comment on attachment 200878 [details] [review] We meet segment fault according to the wrong width and height. agree, I will have a deeper look.
Created attachment 202627 [details] [review] wl_visual related interfaces update patch v2
Juan, Are any of your changes appropriate after all the updates that have been made to master since December?
Hey Rob, I saw the patches in the gtk trunk, looks like this problem was resolved pretty good and even went along with wayland upstream. It's really great. :) (In reply to comment #14) > Juan, > Are any of your changes appropriate after all the updates that have been made > to master since December?