[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Fri Dec 23 13:38:45 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=769835

Emmanuele Bassi (:ebassi) <ebassi at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #342410|none                        |needs-work
             status|                            |

--- Comment #17 from Emmanuele Bassi (:ebassi) <ebassi at gmail.com> ---
Review of attachment 342410:

::: gdk/wayland/gdkglcontext-wayland.c
@@ +441,3 @@
+static gboolean
+egl_config_can_disable_swap_interval (GdkDisplay      *display,
+                                      const EGLConfig *config)

EGLConfig is already a pointer; I don't think you need to pass it as a pointer…

@@ +446,3 @@
+  EGLint interval;
+
+  if (!eglGetConfigAttrib (display_wayland->egl_display, *config,

… especially since you're just dereferencing it here.

@@ +483,3 @@
     return NULL;

+  if (!egl_config_can_disable_swap_interval (display, &config))

I'm not convinced this is an appropriate action to take.

If swap interval cannot be disabled then we should fall back to the existing
behaviour; it's not optimal, but saying "you can't have GL because your driver
does not allow disabling swap interval" seems to me far more drastic than
necessary.

Just save the return value inside the GdkGLContext and emit a warning or a
debug message.

@@ +543,3 @@
       eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE,
EGL_NO_SURFACE,
                      EGL_NO_CONTEXT);
+      eglSwapInterval (dpy, 0);

Not sure it's needed, here; we're unbinding everything, which means there's no
context and no surface to swap.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20161223/6a27e81c/attachment.html>


More information about the wayland-bugs mailing list