SierraBreeze icon indicating copy to clipboard operation
SierraBreeze copied to clipboard

First characters of window title not repainted after title change (with left aligned title)

Open ZaWertun opened this issue 6 years ago • 11 comments

Hi there. Thanks for nice theme :)

I found small glitch. It affects any applications that can change it's title (for example Konsole and Firefox, see attached video). Glitch happens only when title is left aligned.

Konsole: https://vimeo.com/288328095 Firefox: https://vimeo.com/288328171

ZaWertun avatar Sep 05 '18 10:09 ZaWertun

Glitch in Kate: screenshot_20180906_135738

ZaWertun avatar Sep 06 '18 11:09 ZaWertun

Maybe the problem comes from the commit: https://github.com/ishovkun/SierraBreeze/commit/c4385de0360eadd80e2b2f70984824944f29d5a3

I'm using this one: https://github.com/ishovkun/SierraBreeze/commit/00512fdc1b4b38133e1835a93e5d1e87f128110a and I can't reproduce the bug.

Can you try that?

trmdi avatar Sep 06 '18 14:09 trmdi

Just tested commit https://github.com/ishovkun/SierraBreeze/commit/00512fdc1b4b38133e1835a93e5d1e87f128110a, still the same glitch. (For the record - I also did not forget to do kwin --replace &)

ZaWertun avatar Sep 06 '18 14:09 ZaWertun

Try changing vsync in "System Settings > Compositor" to "Never". If it doesn't help, try restarting the computer.

trmdi avatar Sep 06 '18 15:09 trmdi

Try changing vsync in "System Settings > Compositor" to "Never".

It already was set to this.

If it doesn't help, try restarting the computer.

I'll better switch back to Breeze then.

ZaWertun avatar Sep 06 '18 15:09 ZaWertun

Just found the cause of this glitch, method Decoration::updateTitleBar computes wrong value for x. It must be at least 27 in my case and computed value was 40.

https://github.com/ishovkun/SierraBreeze/blob/master/breezedecoration.cpp#L236

ZaWertun avatar Sep 07 '18 11:09 ZaWertun

@Petross404 , @krisives got any thoughts?

ZaWertun avatar Sep 07 '18 11:09 ZaWertun

This happens on centered title too. This is how it looks like on center aligned title: Screenshot_20190718_020248 Can you spot the c?

Here the problem with title left aligned as well: Screenshot_20190718_021712 How it should be: Screenshot_20190718_022039

@ZaWertun I changed the line https://github.com/ishovkun/SierraBreeze/blob/master/breezedecoration.cpp#L210 to just update(); and it seems to fix the problem (though probably this is not the best way to solve it)

gabrielfern avatar Jul 18 '19 05:07 gabrielfern

@gabrielfern, it's the best way since it's works without any glitches. Anyway I'm glad that someone confirms this issue.

ZaWertun avatar Jul 18 '19 05:07 ZaWertun

@gabrielfern, you can also check my commit with more correct fix: https://github.com/ZaWertun/SierraBreeze/commit/463076dc125ac0f8305df9eb0ee773c6d73139e5.

ZaWertun avatar Jul 18 '19 05:07 ZaWertun

I think it might be because some other reason, I checked another breeze decoration fork that doesn't have this problem and the code for Decoration::updateTitleBar was the same, and also it uses update(titleBar());. I'm afraid some other bugs pops up. https://github.com/kupiqu/SierraBreezeEnhanced/blob/master/breezedecoration.cpp#L312 https://github.com/kupiqu/SierraBreezeEnhanced/blob/master/breezedecoration.cpp#L332

gabrielfern avatar Jul 18 '19 05:07 gabrielfern