After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663550 - The interface for gdk-wayland should be updated
The interface for gdk-wayland should be updated
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-11-07 12:13 UTC by Juan
Modified: 2012-01-29 08:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Because wl_visual related interfaces are removed in wayland, the code can not be compiled. (9.12 KB, patch)
2011-11-07 12:40 UTC, Juan
reviewed Details | Review
The code can not be compiled, because the wl_display related interfaces are changed in wayland. (3.54 KB, patch)
2011-11-07 12:41 UTC, Juan
reviewed Details | Review
We meet segment fault according to the wrong width and height. (940 bytes, patch)
2011-11-07 12:42 UTC, Juan
needs-work Details | Review
wl_visual related interfaces update patch v2 (11.97 KB, patch)
2011-12-02 15:07 UTC, Juan
none Details | Review
wl_display related interfaces update patches v2 (4.30 KB, patch)
2011-12-02 15:08 UTC, Juan
none Details | Review
wl_visual related interfaces update patch v2 (12.32 KB, patch)
2011-12-02 15:50 UTC, Juan
none Details | Review

Description Juan 2011-11-07 12:13:27 UTC
gdk-wayland can not be compiled. Need to update the interfaces.
Comment 1 Juan 2011-11-07 12:29:02 UTC
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
Comment 2 Juan 2011-11-07 12:40:16 UTC
Created attachment 200876 [details] [review]
Because wl_visual related interfaces are removed in wayland, the code can not be compiled.
Comment 3 Juan 2011-11-07 12:41:24 UTC
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.
Comment 4 Juan 2011-11-07 12:42:44 UTC
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.
Comment 5 Emmanuele Bassi (:ebassi) 2011-11-30 11:35:26 UTC
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.
Comment 6 Emmanuele Bassi (:ebassi) 2011-11-30 11:37:15 UTC
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?
Comment 7 Emmanuele Bassi (:ebassi) 2011-11-30 11:39:45 UTC
Review of attachment 200877 [details] [review]:

apart from the coding style, this looks good.
Comment 8 Juan 2011-12-02 15:04:09 UTC
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 9 Juan 2011-12-02 15:04:56 UTC
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.
Comment 10 Juan 2011-12-02 15:07:41 UTC
Created attachment 202621 [details] [review]
wl_visual related interfaces update patch v2
Comment 11 Juan 2011-12-02 15:08:58 UTC
Created attachment 202622 [details] [review]
wl_display related interfaces update patches v2
Comment 12 Juan 2011-12-02 15:10:11 UTC
Comment on attachment 200878 [details] [review]
We meet segment fault according to the wrong width and height. 

agree, I will have a deeper look.
Comment 13 Juan 2011-12-02 15:50:01 UTC
Created attachment 202627 [details] [review]
wl_visual related interfaces update patch v2
Comment 14 Rob Bradford 2012-01-25 18:51:59 UTC
Juan,

Are any of your changes appropriate after all the updates that have been made to master since December?
Comment 15 Juan 2012-01-29 08:48:16 UTC
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?