
GNOME Shell and Mutter - anuragsoni
https://feaneron.com/2019/01/31/gnome-shell-and-mutter-better-faster-cleaner/
======
shmerl
Problem of support for default server side decorations with Mutter is still
not resolved. Toolkits like SDL and applications like mpv and the like can't
make basic window controls (like title bar and title bar buttons) look
consistent without it, unless they start depending on GTK.

The issue seems to be on both sides. SDL, mpv and etc. don't want to depend on
GTK, but it looks like Mutter developers don't want to do that either. The end
result is very messy.

Unlike Mutter, KWin for instance does depend on Qt, and provides server side
decorations which allows such non GUI windows easily draw minimal controls and
the title bar.

~~~
lnx01
I consistently have a problem running Mate Desktop where I have to disable CSD
in apps that try to use it by default - off the top of my head, Chrome,
Chromium, Firefox and VSCode all have CSD functionality but are unusable in
Mate Desktop unless CSD is disabled.

~~~
donpdonp
got a link for a description of Client vs Server side decorations?

~~~
eliaspro
A few years ago, some KDE developers invested quite some time in concepts of
creating a CSD/SSD hybrid titled DWD, marrying up the best of both worlds.
Unfortunately it didn't gain any traction, but I still have hopes they'll
tackle this again once all the Wayland work is mostly done.

[https://kver.wordpress.com/2014/10/25/presenting-dwd-a-
candi...](https://kver.wordpress.com/2014/10/25/presenting-dwd-a-candidate-
for-kde-window-decorations/)

[https://kver.wordpress.com/2014/10/25/what-if-kde-started-
us...](https://kver.wordpress.com/2014/10/25/what-if-kde-started-using-client-
side-decorations/)

~~~
solarkraft
It was a terrible idea, inventing a new GUI toolkit for the window manager the
application would have to support (and that they couldn't use with others),
instead of just allowing applications to draw in the title bar/have them do
their own decoration.

------
axaxs
Please remove this silly JS engine that's been implemented, poorly. It didn't
attract mass developers, and it's ruined performance.

~~~
pjmlp
Fully agree, Ubuntu dropping Unity for GNOME made me an happy XFCE user.

I still tried to use it for a couple of months, but the performance difference
is quite noticeable.

~~~
Jasper_
I don't think the JS interface is the main performance bottleneck, honestly. I
would start to look at Clutter and modernizing the GPU backend (e.g. using
UBOs, using the depth buffer, batching texture binds, etc.) before thinking
about killing the JS interpreter.

~~~
floatboth
With Gtk 4 being based on a GPU accelerated scene graph thing, isn't it time
to deprecate Clutter?

~~~
Jasper_
This is a complex question. Using GTK+ in a window manager / compositor is
tricky because GTK+ itself wants to talk to the window manager / compositor.
So it's easy to end up in a deadlock. A DRM/libinput backend would have to be
made for GDK and that's not an easy task, there are a lot of conceptual
mismatches. I'm torn on whether it's the right way to go, basically.

------
sexydefinesher
Its 2019 and the leading linux DE still doesnt have fractional scaling.
Doesn't a single dev use a 1440p screen?

~~~
emersion
No matter how you implement fractional scaling, it's not going to look good.
The reason is simple: half pixels don't exist. If an app wants to draw a 1px
solid border, it can't draw it on a 1.5 scaled display because 1.5 pixel
doesn't exist.

~~~
izacus
It looks good on macOS for years now. Even Windows figured out a way to make
it work on those displays (although it's worse than on macOS).

So your explanation, while common amongst Linux devs, is a rather cheap cop-
out in comparison to the bigger two competitors who have mostly solved the
problem.

The end result is that Linux DEs can be horrible to use on many HiDPI laptops,
which don't have exact resolutions to make integer scaling feasable.

~~~
vetinari
macOS doesn't expose fractional scaling to applications, it is done by the
output encoder by scaling the entire framebuffer. For software, it is strictly
integer only.

It is also careful with the resolutions it supports, it is not just any random
scale requested. It is always to scale down, but not lose many pixels. For
example, with 2560x1600 physical display (rMBP13), you can go to logical
2880x1800 (@1.78 scale) or 3360x2100 (@1.52 scale), but not further.

With Linux (and also Windows), people have weird requests that would not fly
in macOS world.

~~~
izacus
And that is an ok solution as well - something Wayland or other Linux
compositors can't do and force you to be stuck in either "too tiny" or "too
large" uncanny valley of UIs.

~~~
vetinari
Because Linux and Windows users ask for different things than Mac users.

With 2560x1440 display, you won't get fullhd@2x sized desktop (scale 133%) on
Apple. That something expected in Linux or Windows, but Apple will get you at
most 1680x1050@2x (152%, they're 16:10, so different height) here.

It is compounded by the issue, that Apple traditionally used 72 dpi for @1x
scale, while Windows and Linux used 96 dpi. Apple apps look quite good at
lower resolutions, while Linux (ok, Gnome) dug itself into a hole and looks
good on dpis much higher than 96. For Apple, it is acceptable to run 2880x1900
or 3360x2100 on 2560x1600 display, but when Gnome looks passable on
1600x900@1x, good on 1920x1080@1x and you've got 2560x1440, so you need to
display 4K (1920x1080@2x) logical resolution on that... that's more
"interesting".

------
sandGorgon
one request - could you guys help out Teamviewer and Anydesk guys ? cos their
products still dont work on Wayland. There's been zillions of threads and
questions on stackoverflow on this. This would be a godsend

~~~
michaelmrose
In all likelihood it will have to have work done on each and every possible
wayland environment to work unless everyone can agree on standards.

The logical solution is to use X for now.

~~~
diffeomorphism
I thought xdg-desktop-portal was the agreed on standard for that already?

[https://old.reddit.com/r/kde/comments/9i7p8e/complete_waylan...](https://old.reddit.com/r/kde/comments/9i7p8e/complete_wayland_remote_desktop_support_coming_to/)

------
newnewpdro
> Thanks to the fantastic work by Jasper St. Pierre, GJS now supports
> overriding virtual functions.

It's very unfortunate Jasper is no longer participating in the GNOME
community. I'm hopeful he'll one day return.

~~~
Jasper_
Heh, I had no idea I attracted such a wide audience. I'm still around!

These days I'm a professional graphics programmer -- I worked on a few games,
fell in love with that, and I'm currently trying to figure out what's next. I
don't know if Linux and GNOME are the right communities for me anymore for
quite a few reasons.

As always, if people have questions about the work I did, or just want to
chat, please feel free to reach out -- my email is in my git commits :)

------
AHTERIX5000
Interesting! Are those low frame rates visible in graph constrained by energy
savings/minimizing work or caused by performance issues?

