kupiqu/SierraBreezeEnhanced

horizontal offset only affecting first button, not remaining button, on some windows

zeparu opened this issue · 35 comments

image

i dont know what influences whether or not this bug happens or not

restarting kwin_x11 or changing settings in the decoration settings doesnt fix it

im on the arch -git aur version

I cannot reproduce. What applications are showing this behavior?

I modified a bit the behavior of the horizontal offset. I don't think this will fix the issue but you could give the new version a try

installed the new version, issue still persists

applications that affected are like google chrome, mailspring, discord

(i have all of these maximized and on autostart, if thats something important, telegram for example is windowed and on autostart, and doesnt have this issue. thats the only connecting feature i know right now but it feels very obscure)

Hmm, I don't use any of those. Chromium is not doing this for me, although I don't have it on autostart/maximized. Can you try to restart these applications without autostart/maximization? Does the same happen?

ok experimenting around

opening an application in maximized mode triggers this for me

once i open then windowed, the controls are right

once i maximize a window, the issue comes back

once the issue is there, changing window/maximized change change it anymore

sorry, no idea.

nothing that I try reproduces the issue

ye, me too

i use Xwayland,

@IT-Tagore which apps?

I don't use Wayland, can you try this out on X11?

Naxdy commented

This happens for me on X11. My title bar looks like this (from left to right):

[Close] [Keep window below] [Keep window above] - [Window Title] - [Icon]

I also have it set to hide title bars on maximized windows.

Steps to reproduce:

  1. Open a window in floating mode (notice buttons are correct)
  2. Maximize window
  3. Un-maximize window, notice the buttons are offset incorrectly (looks like [Keep window below] is too far left)

Also note that I do not have any horizontal offset, so I don't think it's related to that.

@IT-Tagore which apps?

I don't use Wayland, can you try this out on X11?

x11 Everything is normal,thanks

This happens for me on X11. My title bar looks like this (from left to right):

[Close] [Keep window below] [Keep window above] - [Window Title] - [Icon]

I also have it set to hide title bars on maximized windows.

Steps to reproduce:

  1. Open a window in floating mode (notice buttons are correct)
  2. Maximize window
  3. Un-maximize window, notice the buttons are offset incorrectly (looks like [Keep window below] is too far left)

Also note that I do not have any horizontal offset, so I don't think it's related to that.

I cannot reproduce.

Does it happen to you with all applications? is it specific of your button configuration?

@IT-Tagore which apps?
I don't use Wayland, can you try this out on X11?

x11 Everything is normal,thanks

This is a very weird issue :-/

Difficult to fix if I cannot reproduce the problem. I may try wayland to see it there

Naxdy commented

@kupiqu it does happen with every application for me, on both X11 and Wayland. The exceptions are CSD apps like GTK of course, since they do not use the decoration.

I've added a screenshot of my full settings. I'm also on Plasma 5.26 in case that makes a difference.

The bug also disappears for any given window if I manually remove its border and then re-add it. Until I maximize it again, of course.

Here are my complete settings:

Screenshot_20221012_101032

Naxdy commented

Here's a recording of the bug on X11:

bug.mp4

Ok, thanks for the screenshot and video. I will try to reproduce. [I also use Plasma 5.26]

Still no way to reproduce. @xNaxdy, wondering if besides the setting Hide window title bar set to Maximized Windows you also have another kwin method removing the titlebar on maximized windows. Can you try to set that option to Never and maximize to check this out?

This might make a difference because the kwin method removes titlebars + borders and this is not the behavior in SBE which only removes the titlebar. That difference could make SBE turn a bit crazy when restoring from maximized windows, perhaps, maybe...

That's the only thing I can think of. If this would be a general issue, I guess more people would complain and I would be able to reproduce it more easily.

Naxdy commented

@kupiqu When I set it to Never, the behavior is this:

  1. Start application non-maximized: buttons are correct
  2. Maximize window: Titlebar still exists, buttons are correct
  3. Un-maximize window: Buttons are incorrect (same as in video)

From this point on, whenever I maximize / un-maximize the window, the buttons are correct in maximized state only, and incorrect in un-maximized state. Again this is fixed by removing the border and re-applying it.

I've also retested this with desktop effects disabled (ALT + Shift + F12), but the behavior is exactly the same (both with title bar hiding, and without)

quick edit: I'm on an NVIDIA GPU in case this matters. I don't have any other GPUs I could test this with though

I see. I'm out of ideas. If I cannot reproduce the issue I cannot fix it :(

Not sure NVIDIA matters (I don't have it), but you could try to switch to intel in nvidia-settings for testing purposes: https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu

Naxdy commented

Sadly I'm on an AMD desktop with no integrated graphics. If @zeparu and @IT-Tagore also have an NVIDIA card, then perhaps this is the common denominator?

If I get around to it, I will install it on my laptop and test it using integrated graphics.

im on an AMD dedicated GPU

I think it may have something to do with the style of the theme (rounded corners, curvature of the titleBar), and there will be problems with the rounded corner implementation of kde to match the theme,but,I have encountered a situation where adjusting the lateral offset button spacing is squeezed (when the button position is on the left side of the titlebar) and everything I am currently using is normal,thanks

Naxdy commented

I think it may have something to do with the style of the theme (rounded corners, curvature of the titleBar), and there will be problems with the rounded corner implementation of kde to match the theme,but,I have encountered a situation where adjusting the lateral offset button spacing is squeezed (when the button position is on the left side of the titlebar) and everything I am currently using is normal,thanks

You're right, if I move the three buttons to the right hand side of the title bar, the issue does not exist. Likewise, if I put a buffer between the three buttons and the left window edge, the issue also does not exist, e.g.:

[Icon] [Close] [any button] [any button] - [Title]

I adjusted the button to the right (maybe not for this reason)
image

我认为这可能与主题的风格(圆角,titleBar的曲率)有关,并且kde的圆角实现以匹配主题会出现问题,但是,我遇到了调整横向偏移按钮间距被挤压的情况(当按钮位置在标题栏的左侧时),我目前使用的一切都是正常的,谢谢

你是对的,如果我将三个按钮移动到标题栏的右侧,则问题不存在。同样,如果我在三个按钮和左窗口边缘之间放置一个缓冲区,则问题也不存在,例如:

[图标][关闭][任何按钮][任何按钮] - [标题]

Yes, so I chose the right angle of the edge to avoid this problem

You're right, if I move the three buttons to the right hand side of the title bar, the issue does not exist. Likewise, if I put a buffer between the three buttons and the left window edge, the issue also does not exist, e.g.:

[Icon] [Close] [any button] [any button] - [Title]

Can you tell me your button configuration when the issue is present? Maybe I can reproduce then...

Naxdy commented

You're right, if I move the three buttons to the right hand side of the title bar, the issue does not exist. Likewise, if I put a buffer between the three buttons and the left window edge, the issue also does not exist, e.g.:
[Icon] [Close] [any button] [any button] - [Title]

Can you tell me your button configuration when the issue is present? Maybe I can reproduce then...

As I mentioned a bit earlier, my current config is this:

L - M - R
[Close] [Keep window below] [Keep window above] - [Title] - [Icon]

Also, this issue becomes a lot more obvious with an increased horizontal offset (with 15px, [Close] and [Keep window blow] are almost 100% overlapping), but even with horizontal offset 0 it is noticeable.

You're right, if I move the three buttons to the right hand side of the title bar, the issue does not exist. Likewise, if I put a buffer between the three buttons and the left window edge, the issue also does not exist, e.g.:
[Icon] [Close] [any button] [any button] - [Title]

Can you tell me your button configuration when the issue is present? Maybe I can reproduce then...

As I mentioned a bit earlier, my current config is this:

L - M - R [Close] [Keep window below] [Keep window above] - [Title] - [Icon]

Also, this issue becomes a lot more obvious with an increased horizontal offset (with 15px, [Close] and [Keep window blow] are almost 100% overlapping), but even with horizontal offset 0 it is noticeable.

Nothing. This doesn't happen in my system, no matter what I try. If somebody can try nvidia vs intel to discard this happening on nvidia cards, it would be great

I have an intel intergrated graphics. It happens to me too.

I have an intel intergrated graphics. It happens to me too.

@ThakshilaDamsak, can you share the [org.kde.kdecoration2] section of $HOME/.config/kwinrc in your system?

@ThakshilaDamsak, can you share the [org.kde.kdecoration2] section of $HOME/.config/kwinrc in your system?

[org.kde.kdecoration2]
BorderSize=None
BorderSizeAuto=false
ButtonsOnLeft=XIA
ButtonsOnRight=HFM
CloseOnDoubleClickOnMenu=true
library=org.kde.sierrabreezeenhanced
theme=Sierra Breeze Enhanced

I'm affected aswell. Kwin wayland with AMD graphics. Last good commit of SBE is: 74f9ef4

It seems like all affected users (incl. me) have their window control buttons on the left hand side of the title bar.

Edit: I tested the commits after that one by one. The issue is introduced with the #85 fix: b0a5734

I don't know what exactly is wrong here, but it definitely has something to do with the changes introduced to button offset calculation in that commit. In the meantime I made a patch that reverts b0a5734 and fb8e165 (the v1.3.1 commit) because the latter builds on the former, while leaving the changes from other commits intact. This is working for me so far.

0001-Workaround-111-by reverting-fb8e165-and-b0a573

I could finally reproduce the issue.

我终于可以重现这个问题了。

good,Waiting for the boss to repair👍

Fixed in commit a2bb374. Please test.

Fixed in commit a2bb374. Please test.

Oh neat I'll test it today at 6 PM (GMT -3) when I log in xP