ishovkun / SierraBreeze

OSX-like window decoration for KDE Plasma written in C++
355 stars 40 forks source link

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

Open ZaWertun opened 6 years ago

ZaWertun commented 6 years ago

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 commented 6 years ago

Glitch in Kate: screenshot_20180906_135738

trmdi commented 6 years ago

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?

ZaWertun commented 6 years ago

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 &)

trmdi commented 6 years ago

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

ZaWertun commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@Petross404 , @krisives got any thoughts?

gabrielfern commented 5 years ago

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)

ZaWertun commented 5 years ago

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

ZaWertun commented 5 years ago

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

gabrielfern commented 5 years ago

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