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 683020 - Support bypass compositor hints
Support bypass compositor hints
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-30 06:43 UTC by drago01
Modified: 2012-12-18 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support bypass compositor hints (6.37 KB, patch)
2012-08-30 06:43 UTC, drago01
needs-work Details | Review
Support bypass compositor hints (6.81 KB, patch)
2012-08-30 08:12 UTC, drago01
committed Details | Review

Description drago01 2012-08-30 06:43:28 UTC
Given the recent IRC discussion with anholt it seems we really need something
like this as our heuristic is no longer sufficent (ex: SDL2 games).
Comment 1 drago01 2012-08-30 06:43:30 UTC
Created attachment 222911 [details] [review]
Support bypass compositor hints

Add support for _NET_WM_BYPASS_COMPOSITOR and _NET_WM_DONT_BYPASS_COMPOSITOR
as proposed here: https://mail.gnome.org/archives/wm-spec-list/2012-February/msg00010.html
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-08-30 06:49:41 UTC
Review of attachment 222911 [details] [review]:

::: src/compositor/meta-window-actor.c
@@ +1198,3 @@
+
+  if (!meta_window_is_override_redirect (metaWindow) &&
+      !meta_window_requested_bypass_compositor (metaWindow));

Did you test this? This rogue semicolon means that we're going to always get the return FALSE; below.
Comment 3 drago01 2012-08-30 08:12:13 UTC
Created attachment 222914 [details] [review]
Support bypass compositor hints

Add support for _NET_WM_BYPASS_COMPOSITOR and _NET_WM_DONT_BYPASS_COMPOSITOR
as proposed here: https://mail.gnome.org/archives/wm-spec-list/2012-February/msg00010.html

---

Working and tested version.
Comment 4 drago01 2012-10-24 18:12:38 UTC
(In reply to comment #3)
> Created an attachment (id=222914) [details] [review]
> Support bypass compositor hints
> 
> Add support for _NET_WM_BYPASS_COMPOSITOR and _NET_WM_DONT_BYPASS_COMPOSITOR
> as proposed here:
> https://mail.gnome.org/archives/wm-spec-list/2012-February/msg00010.html
> 
> ---
> 
> Working and tested version.

Given that KDE (https://mail.gnome.org/archives/wm-spec-list/2012-October/msg00002.html) and afaik compiz agreed to implement this spec ... can we get this reviewed?
Comment 5 Florian Müllner 2012-10-24 19:05:11 UTC
Review of attachment 222914 [details] [review]:

::: src/compositor/meta-window-actor.c
@@ +1204,3 @@
     return FALSE;
 
+  if (priv->argb32 && !meta_window_requested_bypass_compositor (metaWindow))

I wonder if it reads cleaner to use grouping like

if (!meta_window_requested_bypass_compositor (metaWindow))
  {
    if (!meta_window_is_override_redirect (metaWindow))
      return FALSE;

    if (priv->argb32)
      return FALSE;
  }

But then easily spotting the conditions that we allow to be overwritten by the bypass_compositor property may not be that interesting, dunno ...

::: src/core/window-props.c
@@ +1644,3 @@
+    }
+
+  window->bypass_compositor = requested_value;

Would it make sense to make bypass_compositor/dont_bypass_compositor GObject properties and notify(), so that we can reevaluate whether the window should be unredirected?
Comment 6 drago01 2012-11-04 10:42:49 UTC
(In reply to comment #5)
>
> ::: src/core/window-props.c
> @@ +1644,3 @@
> +    }
> +
> +  window->bypass_compositor = requested_value;
> 
> Would it make sense to make bypass_compositor/dont_bypass_compositor GObject
> properties and notify(), so that we can reevaluate whether the window should be
> unredirected?

Not sure what you mean by that. We check whether we should unredirect or not in pre_paint_windows ... when the property changes we should catch it there.
Comment 7 drago01 2012-11-21 12:31:56 UTC
(In reply to comment #6)
> (In reply to comment #5)
> >
> > ::: src/core/window-props.c
> > @@ +1644,3 @@
> > +    }
> > +
> > +  window->bypass_compositor = requested_value;
> > 
> > Would it make sense to make bypass_compositor/dont_bypass_compositor GObject
> > properties and notify(), so that we can reevaluate whether the window should be
> > unredirected?
> 
> Not sure what you mean by that. We check whether we should unredirect or not in
> pre_paint_windows ... when the property changes we should catch it there.

Ping?
Comment 8 drago01 2012-12-18 18:00:53 UTC
Attachment 222914 [details] pushed as 3876a1a - Support bypass compositor hints