GNOME Bugzilla – Bug 683020
Support bypass compositor hints
Last modified: 2012-12-18 18:00:58 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).
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
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.
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.
(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?
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?
(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.
(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?
Attachment 222914 [details] pushed as 3876a1a - Support bypass compositor hints