I think i've found where is the bug. But my C++ skill is to bad to rely only on my patch. Need a review from someone who knows better than me C++.
Package : metacity-2.28.1-0ubuntu5-src
Here's the patch :
Index: src/ui/theme.c =================================================================== --- src/ui/theme.c (revision 1) +++ src/ui/theme.c (revision 14) @@ -4526,5 +4526,5 @@ if ((j == META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND || j == META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND) && - middle_bg_offset < MAX_MIDDLE_BACKGROUNDS) + (middle_bg_offset < (MAX_MIDDLE_BACKGROUNDS - 1))) { ++middle_bg_offset;
I think i've found where is the bug. But my C++ skill is to bad to rely only on my patch. Need a review from someone who knows better than me C++.
Package : metacity- 2.28.1- 0ubuntu5- src
Here's the patch :
Index: src/ui/theme.c ======= ======= ======= ======= ======= ======= ======= ======= ==== TYPE_RIGHT_ MIDDLE_ BACKGROUND ||
j == META_BUTTON_ TYPE_LEFT_ MIDDLE_ BACKGROUND) && BACKGROUNDS) BACKGROUNDS - 1)))
++ middle_ bg_offset;
=======
--- src/ui/theme.c (revision 1)
+++ src/ui/theme.c (revision 14)
@@ -4526,5 +4526,5 @@
if ((j == META_BUTTON_
- middle_bg_offset < MAX_MIDDLE_
+ (middle_bg_offset < (MAX_MIDDLE_
{