Transparent windows render black with Gtk3.16 and compiz

Bug #1436553 reported by luke on 2015-03-25
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Compiz
Undecided
Unassigned
compiz (Ubuntu)
Medium
Unassigned

Bug Description

Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without unity (in mate compiled with gtk-3) and testing Gtk-3.16 I run into serious issues with failures to render certain Gtk Windows transparent. Hardware is AMD FX 8120 with radeon HD 6750 GPU.

My theme sets popup windows used by menus transparent, and Gtk application windows with client side decoration (CSD) have transparency underlying the GtkHeaderBar. In the latter case this is what makes rounded corners possible. The transparent popup windows used with my theme to support menus resembling gnome-shell's widgets in my hacked Gtk3 version of mate-panel work fine with Gtk3.14 but due to the window issue get black corners with compiz and Gtk-3.16. Windows drawn transparent with cairo still work, but windows set transparent by GTK usually do not,

Changing the window manager to Mutter makes transparency work perfectly. In Gtk-3.14 transparency works in Metacity with compositing enabled, it does not with gtk-3.16.

I am not sure whether this should be considered a compiz bug or a Gtk bug, but since transparency works fine in gnome-shell and mutter (as used by shell), I am not sure the GNOME team would consider this a bug they are willing to fix. If nobody fixes this any GNOME application that forces client side decoration (such as the gtk3-demo or gtk3-widget-factory) will be ugly in Ubuntu unless the client side decorations have square corners.

Related branches

If I understand correctly than this is compiz bug. Compiz should add _GTK_FRAME_EXTENTS to _NET_SUPPORTED.

https://git.gnome.org/browse/gtk+/commit/?id=5ced234144ce63decbf5afc8a3517290b9027018

Reverting above GTK+ commit should "fix" csd windows, but real fix is to add _GTK_FRAME_EXTENTS support to compiz.

Changed in compiz (Ubuntu):
status: New → Confirmed
luke (lukefromdc) wrote :

I can now confirm that building and installing the

https://code.launchpad.net/~albertsmuktupavels/compiz/add-gtk-frame-extents-to-net-supported

compiz branch solves the problem, as far as I can tell solving it entirely.

At the moment I am running Debian Unstable, using the Ubuntu PPA kernel and Mesa on Radeon graphics, this version of compiz, and mate compiled with gtk3.16 hacked for semi-transparent panel menus. Transparency in the panel menus works perfectly, and CSD apps render and can be resized just as if they were running in gnome-shell. Looks like this simple change to src/screen.cpp did it, now there is another issue that comes from Metacity.

Neither this branch nor the main compiz branch will build the gtk window decorator with Metacity 3.17 installed, so Emerald must be used for window decoration (I don't have the kde development files installed to build the kde window decorator) at least on my current setup. "build metacity" and "build gtk" must both be disabled or the build errors out.

Given that Metacity itself no longer supports metacity themes I am not sure that can be fixed unless Compiz is to support using the theme set for csd in the gtk theme. Then the decoration will be much too tall.

There is a way get your old window decoration theme back in Emerald. If you have MATE installed you can run marco --replace to screenshot your old metacity theme, then use png files of sections of the decoration to copy your theme in Emerald's "pixmap" engine.

Long term options I see are this:

1: Rewrite Metacity support to use current Metacity and read the css theme, not the legacy metacity themes

2: Replace Metacity support with Marco support. Most compiz installs needing gtk-window-decorator are in Unity or MATE. This would introduce Marco as a build dependency of compiz and thus unity.

3: Split out Marco support and Unity support, have Unity include its own window decorator. Code could be exactly the same, but this removes an external dependency from Unity.

4: Dump Metacity support, take over Emerald mantainance instead. Update Emerald theme engines or just create Emerald themes to march distro default themes.

luke (lukefromdc) wrote :

Updates as of 7-1-2015:

The latest Uubntu update from 6.27 fixes Metacity theme support but NOT transparency. The "add-gtk-frame-extents-to-net-supported" is based on 0.9.12.0, not 0.9.12.1 and it seems the later version stripped out the underlying code that permitted the simple published patch to work. I have not been able to revert that but found another fix: build the older version with the patch-and with the "gtk" directory from the current Ubuntu source substituted. Make sure to enable gsettings in your configuration or it won't read the theme, and to set /usr and not /usr/local as the installation directory or compiz will hang up on loading the plugins. Build, install, and enjoy!

Stephen M. Webb (bregma) on 2015-08-11
Changed in compiz:
status: New → Fix Committed
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Undecided → Medium
luke (lukefromdc) wrote :

I just build compiz from the compiz-0.9.12.1+15.10.20150805 source code on Debian Unstable and gtk3.17. It built fine if I disabled Google protocol buffers, which Cmake lists as giving faster XML loading only. The Ubuntu packages build from this could not be installed because that dependency is not installable right now. My build went fine and ran when compiz was restarted.

Two of the three issues were fixed but one remains: the gtk-window-decorator works fine now, and the transparent calendars and menus in my hacked version of Mate-panel worked perfectly. Unfortunately, issues with CSD applications are NOT fixed, at least not in gtk3.17. I got black borders out to the margin set by the windows rather than compositing of client-side decorated windows. The test program was gnome-disks, it yielded ugly black borders all the way around.

By comparison, my normal build of compiz from the older 0.9.12.0 "add-gtk-frame-extents-to-net-supported" source with the "gtk" directory replaced with that from compiz_0.9.12.1+15.10.20150627.1.orig.tar.gz works fine with CSD applications, rendering the rounded corners just fine with normal compositing. Not only that, the build with gcc 4.9 still works even after the gcc5 transition. I will use this until the newest version fixes the CSD issue, I don't know if this is unique to gtk3.17 right now or somehow related to my build not using the protocol buffers. That I will find out when I can install the offending program without removing Inkscape.

luke (lukefromdc) wrote :

I tested the pubished Ubuntu Wily binary packages Friday night, same results in gtk3.17: a nasty black border around all of GNOME's CSD applications and no shadows in application popup windows. Shadows and other composited effected seemed fine on server-side decorated windows but not popup windows of any kind, which gtk now sees as csd windows.

 At least I was able to force transparency support in my customised MATE build (with 3 lines of added source code per affected window), but GTK 3.17 at least is still not detecting by default that Compiz is a composiitng window manager. It appears that the temporary fix GTK used in 3.16 (no borders but no compositing or shadows) may have been reverted based on those borders, similar to those that appeared with gtk3.15.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.12.1+15.10.20150805-0ubuntu1

---------------
compiz (1:0.9.12.1+15.10.20150805-0ubuntu1) wily; urgency=medium

  [ Alberts Muktupāvels ]
  * Change icon size back to 48px in application switcher plugin. (LP:
    #1237057)

  [ CI Train Bot ]
  * New rebuild forced.

  [ Dmitry Shachnev ]
  * Move window switcher plugins to compiz-plugins-default. (LP:
    #971051, #1465647)
  * debian/compiz-gnome.gsettings-override: Remove unityshell from
    active plugins, and add switcher. (LP: #1469086)

  [ Eleni Maria Stea ]
  * It fixes the 3d windows plugin. Problem: The 3d clipping is
    performed in viewing space (modelview transformation) and should be
    done inside the shader when we use shaders otherwise the viewing
    space pipeline operations will be ignored. Compiz used to perform
    the clipping inside the td plugin using pipeline functions, then it
    was loading a generic shader program (no clipping operations) to
    render the windows and then it rendered the 3d quads around the
    windows using the pipeline (so these were clipped correctly). (LP:
    #1395697)
  * Sometimes the MultipleCubes, Automatic or OneBigCube option might be
    set although we are not in multimonitor. Modified the 3d windows
    plugin to check the number of monitors as well.

  [ Marco Trevisan (Treviño) ]
  * Window: add clientFrame(), to get the client-side decoration extents
    (LP: #1422768, #1436553)
  * Window: compute the correct output using the absolute window
    position (LP: #1475721)

  [ Martin Wimpress ]
  * align MATE profile more closely with Marco

  [ Stephen M. Webb ]
  * Fix a FTBFS when -std=c++11 is used. (LP: #1477654)
  * Fixed the Compiz manpage and --help message to agree with the actual
    command-line options supported. (LP: #1475508)
  * force Compiz to build using C++-11 (required by build dependency
    libgtkmm-3.0-1). (LP: #1477978)

 -- CI Train Bot <email address hidden> Wed, 05 Aug 2015 11:26:51 +0000

Changed in compiz (Ubuntu):
status: Confirmed → Fix Released
luke (lukefromdc) wrote :

Has compiz - 1:0.9.12.1+15.10.20150805-0ubuntu1 been tested with GNOME apps that use client side decoration, WITHOUT any Ubuntu patches that remove CSD and restore normal server side decoration and running by itself without Unity running?

This version does not fix anything for me in gtk3.17 except of course the Metacity 3.16 or later issue. I tested both Ubuntu's packages and my custom build in the Debian Unstable that is now my main system with the same results. I can force popup window transparency in anything I build myself but this does not help GNOME's CSD applications.

There is a rough workaround that allows use of CSD applications, forces square corners and you have to align the mouse with a 1px margin to resize but it works and splits out menu popup windows to get normal shadows. You do get a shadow around a CSD apps-ouside the black margin. Setting that to zero means no resize except from the header bar, so it must be set to 1 and a 1px black border is added to the shadow.

These two sections in a gtk theme will do it, but you still cannot have round corners:

 .window-frame.csd {
 border-radius: 7px;
 border-width: 2px;
 margin: 1px;
 box-shadow: 0 2px 2px 3px alpha(black, 0.5);
}

.window-frame, .window-frame.csd.popup, .window-frame.csd.message-dialog {
 border-radius: 7px;
 border-width: 2px;
 margin: 1px;
 box-shadow: none;
 /* This shadow will appear on cairo-dock popups if you use it, the workaround
 is to create a file called menu.css in ~/config/cairo-dock/current_theme, copy
 the above lines into it, and change the shadow to all zeroes and an alpha of 0.0 */
}

I will continue to follow and test this but for normal use will keep my one-off build of the previous version of compiz with the patches that DO fix all of this.

no longer affects: compiz
luke (lukefromdc) wrote :

This is NOT FIXED by compiz 0.9.12.2, at least not in Debian Unstable with gtk 3.17.9 and has not been fixed on my system by any version I have tried except the version I built myself from https://code.launchpad.net/~albertsmuktupavels/compiz/add-gtk-frame-extents-to-net-supported with the "gtk" directory replaced with a more recent one for Metacity 3.16 support.

Source code for this available at
https://archive.org/download/DebianPackagesForMate-desktopWityGtk3AndCustomPanelTheme/compiz-0.9.12.0extents-supportedgtk3.16-1luke4_amd64.deb

Debian packages for Debian Unstable also published in the same article, which is a collection of MATE-gtk3 packages plus compiz and network-manager-gnome packages:
https://archive.org/details/DebianPackagesForMate-desktopWityGtk3AndCustomPanelTheme

I have yet to get compositing of CSD apps to work on any other compiz version. The modified MATE packages (which support a special transparent panel menu theme) have composition support forced and will work with any version of Compiz, but Debian does not patch GNOME apps to remove CSD so this issue is important there.

Khurshid Alam (khurshid-alam) wrote :

@luke

I agree this is not fixed by compiz yet. If it is not fixed, then why it is marked as "Fixed Release"?

Khurshid Alam (khurshid-alam) wrote :

@luke

Can you explain how did you manage to compile compiz-0.9.12.2 with _GTK_FRAME_EXTENTS patch? For me it is failing , if I let launchpad to build it for me.

Download full text (3.5 KiB)

This patch DOES NOT WORK with compiz 0.9.12.1 or later, as the underlying code that makes it work was removed.
Getting this to work with current compiz would require finding all of the code it uses that was removed between 0.9.12.0
and 0.9.12.1 and adding it back along with the patch. This was more than I was able to do at the time, and yes, I did try.

Due to this mess, I took the old patched 0.9.12.0 version, replaced the gtk directory with one from a post gtk3.16 version
so it could build the window decorator with later versions of gtk3 and metacity. and stashed both the modded source and
debian packages built from it on Archive at:

https://archive.org/details/DebianPackagesForMate-desktopWityGtk3AndCustomPanelTheme

Where I offer debs for mate built with gtk3 and two built versions of compiz: one for Ubuntu, and one for Debian with a
forced restart to get the window decorator working.

Getting anything newer to work will require either reverting the removal of that underlying code or else writing entirely new
code to tell gtk 3.16 and later that compiz is in fact a compositor! The issue seems to be that gtk3.16 and later do not
recognize Compiz as being a compositor and therefore default to not supporting composition with it. Compositio can be
forced in the application code, so I included that in my mate theme support patches which went upstream for 1.12.0 and
later.

On 2/4/2016 at 1:16 AM, "Khurshid Alam" <email address hidden> wrote:
>
>@luke
>
>Can you explain how did you manage to compile compiz-0.9.12.2 with
>_GTK_FRAME_EXTENTS patch? For me it is failing , if I let
>launchpad to
>build it for me.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Windows drawn transparent with cairo still work, but windows set
> transparent by GTK usually do not,
>
> Changing the window manager to Mutter makes transparency work
> perfectly. In Gtk-3.14 transparency works in Metacity with
>compositing
> enabled, it does not with gtk-3.16.
>
> I am not sure whether this should be considered a compiz bug or
>a Gtk
> bug, but since transparency works fine in gnome-shell and mutter
>(as
> used by shell), I am not sure the GNOME team would consider this
>a bug
> ...

Read more...

1) What code was removed?

2) GTK+ 3.16 or newer requires that window manager explicitly advertises that it does support _GTK_FRAME_EXTENTS. If it does not do that then GTK+ thinks that CSD is not supported. This is why windows windows looks like they are running without compositing manager.

It is not GTK+ that does not recognize compoz as compositor - simply compiz does not say - hey I do support _GTK_FRAME_EXTENTS.

It could be "fixed" by adding _GTK_FRAME_EXTENTS to _NET_SUPPORTED - see my branch. But problem is that compiz really does not support _GTK_FRAME_EXTENTS so adding it to _NET_SUPPORTED is wrong.

If it would be enabled then using theme that has .window-frame { margin: ..; box-shadow: ...; } (Adwaita as example) then if you would tile csd window to left or right side of screen then it would not look tiled - there would empty space around window.

Basically missing _GTK_FRAME_EXTENTS support is reason why:
1) Ambiance theme does not add .window-frame { margin: ...; }
1) GTK+ is patched with 0001-gtkwindow-set-transparent-background-color.patch and unity_rbga_tooltips.patch.

If csd window is used without compositor and theme does not has fallback style .solid-csd then rounded corners will be black - color that is set by 0001-gtkwindow-set-transparent-background-color.patch.

luke (lukefromdc) wrote :
Download full text (4.0 KiB)

Only the branch I am using worked in my systems for some reason. I don't know enough
about the internal workings of compiz to explain what was missing, only that when I attempted
to use the other patch (the short one) with newer compiz I got missing functions and that
sort of thing. Was probably nine months ago, I have forgotten the details.

At any rate, most of my work has been in C and not C++ and I really don't know a lot about
the inner workings of compiz, I got my version working by sheer experiment and trial and
error, trying both of the available branches referenced in the bug report.

My advice: attempt to apply the patch, see what comes up missing when you try to build,
and start adding that back, one piece at a time.

On 2/5/2016 at 8:20 AM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>1) What code was removed?
>
>2) GTK+ 3.16 or newer requires that window manager explicitly
>advertises
>that it does support _GTK_FRAME_EXTENTS. If it does not do that
>then
>GTK+ thinks that CSD is not supported. This is why windows windows
>looks
>like they are running without compositing manager.
>
>It is not GTK+ that does not recognize compoz as compositor -
>simply
>compiz does not say - hey I do support _GTK_FRAME_EXTENTS.
>
>It could be "fixed" by adding _GTK_FRAME_EXTENTS to _NET_SUPPORTED
>- see
>my branch. But problem is that compiz really does not support
>_GTK_FRAME_EXTENTS so adding it to _NET_SUPPORTED is wrong.
>
>If it would be enabled then using theme that has .window-frame {
>margin:
>..; box-shadow: ...; } (Adwaita as example) then if you would tile
>csd
>window to left or right side of screen then it would not look
>tiled -
>there would empty space around window.
>
>Basically missing _GTK_FRAME_EXTENTS support is reason why:
>1) Ambiance theme does not add .window-frame { margin: ...; }
>1) GTK+ is patched with 0001-gtkwindow-set-transparent-background-
>color.patch and unity_rbga_tooltips.patch.
>
>If csd window is used without compositor and theme does not has
>fallback
>style .solid-csd then rounded corners will be black - color that
>is set
>by 0001-gtkwindow-set-transparent-background-color.patch.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with comp...

Read more...

Adding back what?

Just did:
bzr branch lp:compiz
bzr merge lp:~albertsmuktupavels/compiz/add-gtk-frame-extents-to-net-supported
dch -i
bzr builddeb -S
pbuilder-dist xenial build ../compiz_0.9.12.2+16.04.20151211-0ubuntu2.dsc

And it built just fine.

luke (lukefromdc) wrote :

I will test that branch and see if it works. Like I said, I do NOT know what all was changed between 0.9.12.0 qnd 0.9.12.1, only that I got all kinds of missing things when I tried to apply the patch that i had success with in 0.9.12.0 with. Sorry if i cannot help more, this was just trial and error with no background in C++ to properly know what I was doing. that trial and error got me a workng Compiz and I left it at that. If your version works in my system I will update to it and push debian packages to the Archive site.

On 2/5/2016 at 3:41 PM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>Adding back what?
>
>Just did:
>bzr branch lp:compiz
>bzr merge lp:~albertsmuktupavels/compiz/add-gtk-frame-extents-to-
>net-supported
>dch -i
>bzr builddeb -S
>pbuilder-dist xenial build ../compiz_0.9.12.2+16.04.20151211-
>0ubuntu2.dsc
>
>And it built just fine.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Windows drawn transparent with cairo still work, but windows set
> transparent by GTK usually do not,
>
> Changing the window manager to Mutter makes transparency work
> perfectly. In Gtk-3.14 transparency works in Metacity with
>compositing
> enabled, it does not with gtk-3.16.
>
> I am not sure whether this should be considered a compiz bug or
>a Gtk
> bug, but since transparency works fine in gnome-shell and mutter
>(as
> used by shell), I am not sure the GNOME team would consider this
>a bug
> they are willing to fix. If nobody fixes this any GNOME
>application
> that forces client side decoration (such as the gtk3-demo or gtk3
> -widget-factory) will be ugly in Ubuntu unless the client side
> decorations have square corners.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1436553/+subs
>criptions

luke (lukefromdc) wrote :

Might have been the client-frame-api branch that didn't build last summer against 0.9.12.1 but I think I tried everything,but as I said with too little knowledge of Compiz internals to really know what I was doing. total trial and error and I simply kept what ended up working.

On 2/5/2016 at 3:41 PM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>Adding back what?
>
>Just did:
>bzr branch lp:compiz
>bzr merge lp:~albertsmuktupavels/compiz/add-gtk-frame-extents-to-
>net-supported
>dch -i
>bzr builddeb -S
>pbuilder-dist xenial build ../compiz_0.9.12.2+16.04.20151211-
>0ubuntu2.dsc
>
>And it built just fine.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Windows drawn transparent with cairo still work, but windows set
> transparent by GTK usually do not,
>
> Changing the window manager to Mutter makes transparency work
> perfectly. In Gtk-3.14 transparency works in Metacity with
>compositing
> enabled, it does not with gtk-3.16.
>
> I am not sure whether this should be considered a compiz bug or
>a Gtk
> bug, but since transparency works fine in gnome-shell and mutter
>(as
> used by shell), I am not sure the GNOME team would consider this
>a bug
> they are willing to fix. If nobody fixes this any GNOME
>application
> that forces client side decoration (such as the gtk3-demo or gtk3
> -widget-factory) will be ugly in Ubuntu unless the client side
> decorations have square corners.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1436553/+subs
>criptions

luke (lukefromdc) wrote :

I just manually applied the add-gtk-frame-extents-to-net-supported (one line, one file) to a
downloaded copy of current Ubuntu Xenial compiz-0.9.12.2+16.04.20151211, built fine,
runs fine. Perhaps the previous confusion came from attempts to build the other branch
referenced in the bug report last summer, maybe of all the things I tried to do with
0.9.12.1 I missed this one combination? Anyway, I've got it working here, gtk window
decorator and all, built against GTK 3.19.8 on top of all else.

Tested it with gnome-disks, compositing works fine and the rounded corners work!

On 2/5/2016 at 3:41 PM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>Adding back what?
>
>Just did:
>bzr branch lp:compiz
>bzr merge lp:~albertsmuktupavels/compiz/add-gtk-frame-extents-to-
>net-supported
>dch -i
>bzr builddeb -S
>pbuilder-dist xenial build ../compiz_0.9.12.2+16.04.20151211-
>0ubuntu2.dsc
>
>And it built just fine.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Windows drawn transparent with cairo still work, but windows set
> transparent by GTK usually do not,
>
> Changing the window manager to Mutter makes transparency work
> perfectly. In Gtk-3.14 transparency works in Metacity with
>compositing
> enabled, it does not with gtk-3.16.
>
> I am not sure whether this should be considered a compiz bug or
>a Gtk
> bug, but since transparency works fine in gnome-shell and mutter
>(as
> used by shell), I am not sure the GNOME team would consider this
>a bug
> they are willing to fix. If nobody fixes this any GNOME
>application
> that forces client side decoration (such as the gtk3-demo or gtk3
> -widget-factory) will be ugly in Ubuntu unless the client side
> decorations have square corners.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1436553/+subs
>criptions

If you tried to merge client-frame-api branch that it could cause problem, because it is already merged.

Rounded corners works, but there is new problems. Select theme that adds margin != 0 on .window-frame - for example Adwaita and then try to tile CSD window to left or right side of screen.

luke (lukefromdc) wrote :
Download full text (4.1 KiB)

I've never used tiling so naturally I would never see that bug. I did see a similar result,
where if I drag gnome-disks to the top edge it doesn't always go all the way there.
For my purposes that's OK, but probably not for someone using tiling. That margin
always exists, it's what becomes the black border without this fix, it's just transparent
now. Perhaps GTK3.16 and later drop the margin when a window is tiled if and only if
the WM is not recognized as a compositor? How do mutter/shell/muffin/cinnamon
deal with this?

BTW, in gtk3.20, "window.frame" changes to "decoration."

OK, the question this raises if a fix for both issues at once is not found is this: which
is worse, ugly borders on CSD apps or CSD apps that don't tile all the way to the
edge? Right now the choice is one or the other, and I suspect that will be different from
user to user. If the compositing support is deemed more important, than it could be
merged now and the tiling worried about later.

Also, compiz as currently used by Ubuntu is enough of a problem with gtk3.16 and later
that not fixing this could spur Ubuntu devs to speed up the transition to Unity 8 and
drop compiz support altogether for flavors like Ubuntu MATE. I doubt they would change
course now and do this for 16.04, but there is the real chance that 16.04 will be the last
time the flagship "ubuntu" version uses compiz and it is an LTS release. Thus, a strong
reason to try and get things right by fixing both bugs. Not merging the compositing fix
increases the risk that it will fall by the wayside like it did last Spring.

I don't know how to work with bzr at all other than cut and paste the code to clone the
repo locally-and with something the side of compiz, that creates bandwidth problems
on my connection. Thus the local application of patches to downloaded tarballs-and any
mistakes that might have created last summer.

On 2/6/2016 at 6:30 AM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>If you tried to merge client-frame-api branch that it could cause
>problem, because it is already merged.
>
>Rounded corners works, but there is new problems. Select theme
>that adds
>margin != 0 on .window-frame - for example Adwaita and then try to
>tile
>CSD window to left or right side of screen.
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked...

Read more...

Download full text (6.6 KiB)

On Sat, Feb 6, 2016 at 8:56 PM, luke <email address hidden> wrote:

> I've never used tiling so naturally I would never see that bug. I did see
> a similar result,
> where if I drag gnome-disks to the top edge it doesn't always go all the
> way there.
> For my purposes that's OK, but probably not for someone using tiling. That
> margin
> always exists, it's what becomes the black border without this fix, it's
> just transparent
> now. Perhaps GTK3.16 and later drop the margin when a window is tiled if
> and only if
> the WM is not recognized as a compositor? How do
> mutter/shell/muffin/cinnamon
> deal with this?
>

These windows managers simply does support _GTK_FRAME_EXTENTS and they also
report it by adding _GTK_FRAME_EXTENTS to _NET_SUPPORTED.

BTW, in gtk3.20, "window.frame" changes to "decoration."
>

Yes, I know. More work for theme authors, but this is not problem for
ubuntu 16.04 as it will not include GTK+ 3.20.

OK, the question this raises if a fix for both issues at once is not found
> is this: which
> is worse, ugly borders on CSD apps or CSD apps that don't tile all the way
> to the
> edge? Right now the choice is one or the other, and I suspect that will be
> different from
> user to user. If the compositing support is deemed more important, than
> it could be
> merged now and the tiling worried about later.
>

My personal opinion is - this "fix" should be merged. :) But I am not
ubuntu developer...

Also, compiz as currently used by Ubuntu is enough of a problem with
> gtk3.16 and later
> that not fixing this could spur Ubuntu devs to speed up the transition to
> Unity 8 and
> drop compiz support altogether for flavors like Ubuntu MATE. I doubt they
> would change
> course now and do this for 16.04, but there is the real chance that 16.04
> will be the last
> time the flagship "ubuntu" version uses compiz and it is an LTS release.
> Thus, a strong
> reason to try and get things right by fixing both bugs. Not merging the
> compositing fix
> increases the risk that it will fall by the wayside like it did last
> Spring.
>
> I don't know how to work with bzr at all other than cut and paste the code
> to clone the
> repo locally-and with something the side of compiz, that creates
> bandwidth problems
> on my connection. Thus the local application of patches to downloaded
> tarballs-and any
> mistakes that might have created last summer.
>
>
> On 2/6/2016 at 6:30 AM, "Alberts Muktupāvels" <email address hidden>
> wrote:
> >
> >If you tried to merge client-frame-api branch that it could cause
> >problem, because it is already merged.
> >
> >Rounded corners works, but there is new problems. Select theme
> >that adds
> >margin != 0 on .window-frame - for example Adwaita and then try to
> >tile
> >CSD window to left or right side of screen.
> >
> >--
> >You received this bug notification because you are subscribed to
> >the bug
> >report.
> >https://bugs.launchpad.net/bugs/1436553
> >
> >Title:
> > Transparent windows render black with Gtk3.16 and compiz
> >
> >Status in compiz package in Ubuntu:
> > Fix Released
> >
> >Bug description:
> > Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
> >unity (in
> >...

Read more...

luke (lukefromdc) wrote :

One more thing: At least in gtk3.20, tiled window decorations can be themed differently, just as maximized windows can be. probably this is true in older versions as well, so the margin on tiled windows issue can be fixed in the themes without changing the margins on a normal window. In my experience, a margin of zero gives a CSD window that cannot be resized.

Can someone set this bug back to new or confirmed? It is definitely not fixed...

luke (lukefromdc) wrote :

I don't know how to reset it to new and could not call it "confirmed" as the original reporter. The only fix I have ever found that works is the never-merged extant patch. Now with Unity being dumped some are saying Ubuntu might stop maintainance on compiz 0.9. That leaves me wondering if compiz-reloaded (0.8) will be the last maintained branch. If so, I might have to port this patch over to it, though I have yet to test compiz-reloaded.

luke, do you also have everything greyed out if you try changing bug status?

That was not fix... While it fixes something it introduce new problems... So compiz must be tested with csd windows + theme that has good csd window support...

So if you want this fixed, please help. Build compiz from my new branch and test it with theme that has good CSD window support and as minimum report plugins that are affected.

To see problem, selected Adwaita and try to tile (try to vertically maximize on half screen, grid plugin) CSD window... You will see that there is "empty" space around window...

luke (lukefromdc) wrote :

I was able to set it back to "new" as there is no "fix insufficient" status.

Even logging into Launchpad is a nuisance because they use the referrer header that I
normally block as an anti-tracking measure. It has to be changed for this and then changed
back.

On 4/11/2017 at 3:16 PM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>luke, do you also have everything greyed out if you try changing
>bug
>status?
>
>That was not fix... While it fixes something it introduce new
>problems... So compiz must be tested with csd windows + theme that
>has
>good csd window support...
>
>So if you want this fixed, please help. Build compiz from my new
>branch
>and test it with theme that has good CSD window support and as
>minimum
>report plugins that are affected.
>
>To see problem, selected Adwaita and try to tile (try to vertically
>maximize on half screen, grid plugin) CSD window... You will see
>that
>there is "empty" space around window...
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in Compiz:
> New
>Status in compiz package in Ubuntu:
> Fix Released
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Windows drawn transparent with cairo still work, but windows set
> transparent by GTK usually do not,
>
> Changing the window manager to Mutter makes transparency work
> perfectly. In Gtk-3.14 transparency works in Metacity with
>compositing
> enabled, it does not with gtk-3.16.
>
> I am not sure whether this should be considered a compiz bug or
>a Gtk
> bug, but since transparency works fine in gnome-shell and mutter
>(as
> used by shell), I am not sure the GNOME team would consider this
>a bug
> they are willing to fix. If nobody fixes this any GNOME
>application
> that forces client side decoration (such as the gtk3-demo or gtk3
> -widget-factory) will be ugly in Ubuntu unless the client side
> decorations have square corners.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/compiz/+bug/1436553/+subscriptions

Changed in compiz (Ubuntu):
status: Fix Released → New
luke (lukefromdc) wrote :

I just tested your build, behavior with CSD apps and tiling was apparently the same as with the older single-line patch applied, as I normally apply it to all my builds. I fired up gnome-disks, and it could not be tiled to the edge nor even dragged to the edge with either build. For my uses this is OK as I use few CSD apps and never tile them.

I fired up GtkInspector and may have found the problem, at least in gnome-disks. When the application is maximized, the window state comes up as "background csd maximized" but when it is tiled only as "background csd" meaning theme cannot so easily separate out the tiled state. The maximum box-shadow radius controls the gap left when tiling, so it appears we have a choice beteeen black corners on all CSD apps and gaps between and around them when tiled. Server-side decorated apps tile fine, at least in my theme. I'll take the gaps over the black corners or forced use of a square-edged theme.

I build compiz locally with a fix that works for my use case, and that's about all I am hoping for at this point. My theme does support tiling, for which I have exactly one use case which does not involve CSD windows.

Fix might be to have compiz put a "tiled" state on all tiled CSD windows (if possible), then load a CSS file to force the box shadow to "none" when tiled

On Tue, Apr 11, 2017 at 11:32 PM, luke <email address hidden> wrote:

> I just tested your build, behavior with CSD apps and tiling was
> apparently the same as with the older single-line patch applied, as I
> normally apply it to all my builds. I fired up gnome-disks, and it could
> not be tiled to the edge nor even dragged to the edge with either build.
> For my uses this is OK as I use few CSD apps and never tile them.
>

Yes, because that branch still need many fixes...

Currently it just adds _GTK_FRAME_EXTENTS and fixes resize rectangle size
for resize and move plugins. Default mode must be changed to outline or
rectangle to test that.

I fired up GtkInspector and may have found the problem, at least in
> gnome-disks. When the application is maximized, the window state comes
> up as "background csd maximized" but when it is tiled only as
> "background csd" meaning theme cannot so easily separate out the tiled
> state. The maximum box-shadow radius controls the gap left when tiling,
> so it appears we have a choice beteeen black corners on all CSD apps and
> gaps between and around them when tiled. Server-side decorated apps tile
> fine, at least in my theme. I'll take the gaps over the black corners or
> forced use of a square-edged theme.
>

What app? For example I can not tile nautilus window, but it works fine
with gedit (with metacity). That could be reason why style class is
missing. Simply window is not really tiled, it is just resized. Gedit has
tile class with both window managers - compiz & metacity.

I build compiz locally with a fix that works for my use case, and that's
> about all I am hoping for at this point. My theme does support tiling,
> for which I have exactly one use case which does not involve CSD
> windows.
>
> Fix might be to have compiz put a "tiled" state on all tiled CSD windows
> (if possible), then load a CSS file to force the box shadow to "none"
> when tiled
>

It is not compiz job...

luke (lukefromdc) wrote :
Download full text (4.0 KiB)

App was gnome-disks

On 4/12/2017 at 6:10 AM, "Alberts Muktupāvels" <email address hidden> wrote:
>
>On Tue, Apr 11, 2017 at 11:32 PM, luke <email address hidden>
>wrote:
>
>> I just tested your build, behavior with CSD apps and tiling was
>> apparently the same as with the older single-line patch applied,
>as I
>> normally apply it to all my builds. I fired up gnome-disks, and
>it could
>> not be tiled to the edge nor even dragged to the edge with
>either build.
>> For my uses this is OK as I use few CSD apps and never tile them.
>>
>
>Yes, because that branch still need many fixes...
>
>Currently it just adds _GTK_FRAME_EXTENTS and fixes resize
>rectangle size
>for resize and move plugins. Default mode must be changed to
>outline or
>rectangle to test that.
>
>I fired up GtkInspector and may have found the problem, at least in
>> gnome-disks. When the application is maximized, the window state
>comes
>> up as "background csd maximized" but when it is tiled only as
>> "background csd" meaning theme cannot so easily separate out the
>tiled
>> state. The maximum box-shadow radius controls the gap left when
>tiling,
>> so it appears we have a choice beteeen black corners on all CSD
>apps and
>> gaps between and around them when tiled. Server-side decorated
>apps tile
>> fine, at least in my theme. I'll take the gaps over the black
>corners or
>> forced use of a square-edged theme.
>>
>
>What app? For example I can not tile nautilus window, but it works
>fine
>with gedit (with metacity). That could be reason why style class is
>missing. Simply window is not really tiled, it is just resized.
>Gedit has
>tile class with both window managers - compiz & metacity.
>
>I build compiz locally with a fix that works for my use case, and
>that's
>> about all I am hoping for at this point. My theme does support
>tiling,
>> for which I have exactly one use case which does not involve CSD
>> windows.
>>
>> Fix might be to have compiz put a "tiled" state on all tiled CSD
>windows
>> (if possible), then load a CSS file to force the box shadow to
>"none"
>> when tiled
>>
>
>It is not compiz job...
>
>--
>You received this bug notification because you are subscribed to
>the bug
>report.
>https://bugs.launchpad.net/bugs/1436553
>
>Title:
> Transparent windows render black with Gtk3.16 and compiz
>
>Status in Compiz:
> New
>Status in compiz package in Ubuntu:
> New
>
>Bug description:
> Running compiz_1%3a0.9.12.0+15.04.20150202-0ubuntu1 without
>unity (in
> mate compiled with gtk-3) and testing Gtk-3.16 I run into serious
> issues with failures to render certain Gtk Windows transparent.
> Hardware is AMD FX 8120 with radeon HD 6750 GPU.
>
> My theme sets popup windows used by menus transparent, and Gtk
> application windows with client side decoration (CSD) have
> transparency underlying the GtkHeaderBar. In the latter case
>this is
> what makes rounded corners possible. The transparent popup
>windows
> used with my theme to support menus resembling gnome-shell's
>widgets
> in my hacked Gtk3 version of mate-panel work fine with Gtk3.14
>but due
> to the window issue get black corners with compiz and Gtk-3.16.
> Wi...

Read more...

luke (lukefromdc) wrote :

The latest changes (as of r41131) WORK: transparent corners work fine is CSD apps, and they can be moved to the edge and tiled with no gaps at all. Good enough the source and build .deb will be uploaded to my Archive page of packages for Debian Unstable

It might look like it works, but that branch is not enough and it might not be even right way to fix things. :( I will not continue to work on this...

luke (lukefromdc) wrote :

What is this branch doing wrong? Out of the messages I get from Compiz in .xsession-errors, only these appear to be warnings and I don't think they are new (I KNOW the one about decoration is not)

compiz (core) - Info: Starting plugin: ccp
compiz (core) - Info: Loading plugin: composite
compiz (core) - Info: Starting plugin: composite
Failure: Module initialization failed
compiz (core) - Info: Loading plugin: opengl
compiz (core) - Info: Starting plugin: opengl

compiz (decor) - Warn: No default decoration found, placement will not be correct

I see one more commit since last night, I am going to apply that to my build.

I assume this branch will remain available at this repository? Ubuntu is likely to abandon compiz with their focus on GNOME, and compiz-reloaded is talking about possibly switching their fork to 0.9.13 with the Unity support stripped out. In the 0.8 branch of compiz all attempts by multiple authors to advertise GTK_FRAME_EXTENTS support broke plugins interacting with windows.
https://github.com/compiz-reloaded/compiz/pull/8

Thus, if compiz 0.8 becomes the last version standing, I will have to patch Gtk not to require GTK_FRAME_EXTENTS support (revert the offending commit locally) so any version of compiz will work.

luke (lukefromdc) wrote :

With Ubuntu abandoning Unity, compiz-reloaded just starting their roadmap, and the future of the entire 0.9 branch uncertain, I have copied this code as of r4114 to
https://github.com/lukefromdc/compiz
so there is always available source for the build Debian packages I publish. I have made one change of my own to it: reset the default for the Glide2 animation to look like it did in the circa 2008 versions of compiz.

If you continue work on this branch, I plan to use it as well. If Ubuntu merges it I can drop the Github repo until Ubuntu drops compiz.

I said - might not do right things...

Try to vertically tile / maximize gedit window. Then move focus to other window and then back to gedit. I tried to fix that and got new problems.

It is not simple fix - there is reason why ubuntu started to patch gtk+ and other things to get it working, most likely it was easier then getting proper csd support in compiz.

And you are thinking wrong - gtk+ does not have any offending commits. It is compiz problem / bug that requires proper fix...

luke (lukefromdc) wrote :

I see resize still needs work for manual stretching,
I have tiling set up for corners rather than vertical, so didn't see the "half screen, full size
vertical issue. Starts out oversize, then returns to correct size if focussed, unfocussed,
and focussed again. My 1/4 size tiling setup used when building Debian packages works
perfectly, so this looks like something is getting counted twice,

I'll make a note of this on my Archive repo

When network-manager-applet ffrom current git master or from 1.8.4 is run in
indicator mode, the lock icons is not displayed for any encrypted connection,
and this warning appears:

failed assert dest_y >= 0 && dest_y + dest_height <= dest->height in gdk_pixbuf_composite

I found the offending function, and scaled the composite image down by 2px to make it work
in https://github.com/GNOME/network-manager-applet/pull/5

The github page is only a mirror, and GNOME uses Bugzilla to manage bugs and fixes.
The account I used to report a GTK 3.22 issue last year was no longer recognized, I had
a heck of a time getting it set up. That's because I use highly locked down and restricted browser
to block commercial tracking and some other unintended websites also break. It can take hours
to debug this, and require running such sites by themselves with special settings. Thus I have no
idea whether the account was purged or the site changed their security settings. I don't connect
to the Internet with a default browser at all.

I figured I'd send you a heads-up about this bug, as some distro will no doubt encounter it.
Locally, it's fixed on my systems.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Anonymous (reason) wrote :

Bug is pretty major. 14.04 is still LTS guys, and a LOT of people are holding on because of the systemd wars. PLEASE can anyone help me figure out how to alleviate this bug without a kernel rebuild or something that could totally crash my OS? Isn't there just some Compiz setting I could adjust, or something?

Anonymous (reason) wrote :

There's something interesting in the Blender builds. There's a blender-softwaregl script that seems to "fix" the semi-transparent window bug for my system. Blender normal is flashing because of this bug, blender-softwaregl fixes the problem. Can this script fix be applied to other programs, somehow?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers