musescore / musescore/MuseScore

[MU4 Issue] Context menus have thick black outline on WMs with disabled translucency

Open
#15,399 5 comments 0 reactions 1 assignee View on GitHub

@Eism is already working on this.

Since Jul 16, 2023.

needs design os: linux P2 UI
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Describe the bug
Context menus have a thick black outline. I strongly believe this is due to missing support for window managers without translucency, because I saw similar bugs in some (not all!) other Qt programs.

I personally use xfwm4 on X11, with translucency disabled. I guess that this happens on some other window managers, too.

However, MuseScore's code looks like it tries to detect and handle that: https://github.com/musescore/MuseScore/blob/326d4706593f234e3ec391a67cb5598871e1b4c8/thirdparty/KDDockWidgets/src/private/Utils_p.h#L146-L153 (found via a quick search; the lines around it look right, but I didn't look at it in detail.)

To Reproduce
Steps to reproduce the behavior:

  1. Use xfwm. (Probably the easiest way to do it is to run a Virtual Machine using VirtualBox/qemu/whatever, install Debian using an image like this, and select "xfce" during the installation process.)
  2. Disable compositing (run xfwm4-tweaks-settings, in the tab "Compositor" uncheck the box "Enable display compositing")
  3. Open MuseScore (e.g. by downloading it as AppImage)
  4. Right-Click somewhere

Expected behavior
A nice context menu appears.

Actual behavior
A context menu appears, with very thick, black outline, that doesn't look like it's supposed to be like that.

Screenshots

Here's what it looks like:
Bildschirmfoto_2022-12-19_21-44-36

Here's what it could look like (not a Screenshot, but rather edited to look less terrible):
fictional

Here's how to configure xfwm4, in case you want to reproduce step 2 exactly:
Bildschirmfoto_2022-12-19_21-58-23

Just in case someone thinks my setup is broken and no Qt app can possibly work on my system, here's frescobaldi, which has a Qt UI, showing a context menu:
Bildschirmfoto_2022-12-19_22-26-01

Platform information

  • Linux, specifically Debian
  • X11, with xfwm4 as window manager, and translucency disabled (see "To Reproduce, Step 2")

Additional context
The code looks like setting KDDW_NO_TRANSLUCENCY might have an influence, but it doesn't change anything. Running it as KDDW_NO_TRANSLUCENCY=1 ./MuseScore-4.0.0-x86_64.AppImage shows the same black thick border. Either I'm doing something wrong (very likely), or perhaps AppImage prevents the envvar from reaching the windowManagerHasTranslucency function. Or I simply misunderstand something, and MuseScore can't handle non-translucent window managers at all.

Also, whenever a context menu is opened, the following line appears in the log:

22:15:12.816 | WARN  | main_thread | Qt         | QQmlComponent: Created graphical object was not placed in the graphics scene.

I'm not sure whether this is related.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.