Announcement

Collapse
No announcement yet.

Client Side Decoration Improvements Land In GTK+

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Client Side Decoration Improvements Land In GTK+

    Phoronix: Client Side Decoration Improvements Land In GTK+

    Matthias Clasen landed a few client-side decoration improvements on Sunday night for the GTK tool-kit...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    So with Wayland, it?s GTK that defines the way windows are handled, and not the window manager?

    Comment


    • #3
      Originally posted by stqn View Post
      So with Wayland, it?s GTK that defines the way windows are handled, and not the window manager?
      Wayland clients are required to be able to provide client side decorations. This is the preferred mode of operation but the last discussion I saw about xdg-shell, which provides desktop app specific protocol for Wayland clients, was that applications also have to respect the request to run with no CSD. This allows for the compositor to draw the decorations instead. By the current design you shouldn't see much difference.

      Martin Graesslin, the kwin maintainer, has a good list of reasons why he does not like CSD. He has some good points but I think the issues he mentioned will be fixed via the distribution providing consistent themes across toolkits, additions to xdg-shell, and better common glue libraries between compositors.

      Comment


      • #4
        Originally posted by stqn View Post
        So with Wayland, it?s GTK that defines the way windows are handled, and not the window manager?
        Well, they wrote CSD for Wayland - but in actuality, if you are using Gnome-3.10 (and not using Wayland), then you are already using CSD on X.org (for some core-gnome apps; Nautilus, Gnome-control-center, tweak-tool, etc).

        Client-Side decorations in Gnome are provided by gtkheaderbar; https://developer.gnome.org/gtk3/3.10/GtkHeaderBar.html ... it's very similar to gtkbox (which is essentially a toolbar-type widget, that can include buttons, etc), except with gtkheaderbar you can have things like a close-button / talk to the WM.

        ... on a general note: i hope they fix the gtkheaderbar theming issue, where (in gnome-tweak-tool, for example) they use 2 gtkheaderbar(s), and while the second one themes properly - the first one doesn't respect my gtk3/CCS settings/theming - note the top-left window (gnome-tweak-tool) and it's ugly grey, vertical line that should be the same color as the headerbar (#222222);



        Unfortunately, since I am not a Gnome-Shell user and I can't turn off CSD in Gnome, I am in the process of modding my theme && making sure that all CSD apps use Server-side decorations. (since, Compiz won't draw shadows on CSD windows, afaict). I'd also like to remove the gtkheaderbar close-buttons, but it looks like i would need to patch every app since it is defined in an apps code, not globally :\ - https://developer.gnome.org/gtk3/3.1...w-close-button ... lame.

        well, maybe this year nvidia will release an EGL driver that works with Wayland - then i won't need to hack around gnome's poor integration. ie: some gtk3 apps use SSD, while other core apps use CSD, while gtk2 uses SSD... then, gtk2 + gtk3 themes rarely (if ever) actually match in terms of theming... annoying stuff.

        on the bright-side (once things settle down), it will be nice to not have the window decoration be rendered separately from the window contents - which inherently causes ugly-clipping / aliasing (a particularly noticable example would be KDE or Compiz + wobbly windows.)

        Comment


        • #5
          Originally posted by stqn View Post
          So with Wayland, it?s GTK that defines the way windows are handled, and not the window manager?
          By default I guess you would say? Evidently, there is nothing keeping you from writing a compositor (closest to a WM that wayland has, default demo compositor is weston) that does server-side decorations. Thank goodness, cause CSD is just gross. Hope someone makes one (or hopefully several) before wayland becomes hard to avoid.

          Comment


          • #6
            Originally posted by stqn View Post
            So with Wayland, it?s GTK that defines the way windows are handled, and not the window manager?
            Actually in Wayland its up to the window manager to decide that :P Last I checked Kwin's idea was going to be to expose a config option that allows "All clients use CSD's", "All Clients use SSD's, but if the app provides a custom CSD then let it go ahead and use it" or "All clients use SSD's no matter what."

            If anyone can post a citation to a change of plans please do, because that info came from a Blog post of Martin's from awhile back, so things may have changed in the interim.
            All opinions are my own not those of my employer if you know who they are.

            Comment


            • #7
              Originally posted by Ericg View Post
              but if the app provides a custom CSD then let it go ahead and use it" or "All clients use SSD's no matter what."

              If anyone can post a citation to a change of plans please do, because that info came from a Blog post of Martin's from awhile back, so things may have changed in the interim.
              The discussion was titled "Thoughts about decoration information in the xdg_shell":


              From the above discussion I believe the consensus was that the compositor will just tell the client if it wants the client to display it's own CSD or not.

              Comment

              Working...
              X