Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zeparu opened this issue Sep 3, 2022 · 35 comments
Labels
bug Something isn't working fixed

Comments

@zeparu
Copy link

zeparu commented Sep 3, 2022

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

@kupiqu
Copy link
Owner

kupiqu commented Sep 5, 2022

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

@kupiqu kupiqu added the question Further information is requested label Sep 5, 2022
@zeparu
Copy link
Author

zeparu commented Sep 5, 2022

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)

@kupiqu
Copy link
Owner

kupiqu commented Sep 5, 2022

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?

@zeparu
Copy link
Author

zeparu commented Sep 5, 2022

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

@kupiqu
Copy link
Owner

kupiqu commented Sep 5, 2022

sorry, no idea.

nothing that I try reproduces the issue

@IF-tiger
Copy link

ye, me too

@IF-tiger
Copy link

i use Xwayland,

@kupiqu
Copy link
Owner

kupiqu commented Sep 29, 2022

@IT-Tagore which apps?

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

@Naxdy
Copy link

Naxdy commented Oct 11, 2022

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.

@IF-tiger
Copy link

@IT-Tagore which apps?

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

x11 Everything is normal,thanks

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

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?

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

@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
Copy link

Naxdy commented Oct 12, 2022

@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
Copy link

Naxdy commented Oct 12, 2022

Here's a recording of the bug on X11:

bug.mp4

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

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

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

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
Copy link

Naxdy commented Oct 12, 2022

@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

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

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
Copy link

Naxdy commented Oct 12, 2022

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.

@zeparu
Copy link
Author

zeparu commented Oct 12, 2022

im on an AMD dedicated GPU

@IF-tiger
Copy link

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
Copy link

Naxdy commented Oct 12, 2022

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]

@IF-tiger
Copy link

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

@IF-tiger
Copy link

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

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

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

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

@kupiqu
Copy link
Owner

kupiqu commented Oct 12, 2022

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
Copy link

Naxdy commented Oct 12, 2022

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.

@kupiqu
Copy link
Owner

kupiqu commented Oct 14, 2022

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

@ThakshilaDamsak
Copy link

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

@kupiqu
Copy link
Owner

kupiqu commented Oct 15, 2022

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
Copy link

ThakshilaDamsak commented Oct 16, 2022

@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

@DiabeticCrab
Copy link
Contributor

DiabeticCrab commented Dec 10, 2022

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

@kupiqu
Copy link
Owner

kupiqu commented Mar 20, 2023

I could finally reproduce the issue.

@IF-tiger
Copy link

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

good,Waiting for the boss to repair👍

@kupiqu kupiqu added bug Something isn't working and removed question Further information is requested labels Mar 20, 2023
kupiqu pushed a commit that referenced this issue Mar 20, 2023
@kupiqu kupiqu added the fixed label Mar 20, 2023
@kupiqu
Copy link
Owner

kupiqu commented Mar 20, 2023

Fixed in commit a2bb374. Please test.

@kupiqu kupiqu closed this as completed Mar 20, 2023
@aragubas
Copy link
Contributor

Fixed in commit a2bb374. Please test.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

7 participants