Skip to content

Commit 505e1f3

Browse files
garaevdilenemter
authored andcommitted
libmutter15: use hex colors with Cogl.Color.from_string
`Cogl.Color.from_string` can't accept color names like `Clutter.Color.from_string` which results in a segfault with mutter47+
1 parent 129bb25 commit 505e1f3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Background/Background.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class Gala.Background : Object {
103103
#endif
104104
if (color == null) {
105105
#if HAS_MUTTER47
106-
color = Cogl.Color.from_string ("black");
106+
color = Cogl.Color.from_string ("#000000");
107107
#else
108108
color = Clutter.Color.from_string ("black");
109109
#endif
@@ -122,7 +122,7 @@ public class Gala.Background : Object {
122122
#endif
123123
if (second_color == null) {
124124
#if HAS_MUTTER47
125-
second_color = Cogl.Color.from_string ("black");
125+
second_color = Cogl.Color.from_string ("#000000");
126126
#else
127127
second_color = Clutter.Color.from_string ("black");
128128
#endif

src/Background/BackgroundContainer.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Gala.BackgroundContainer : Meta.BackgroundGroup {
2929
});
3030

3131
#if HAS_MUTTER47
32-
background_color = Cogl.Color.from_string ("Black");
32+
background_color = Cogl.Color.from_string ("#000000");
3333
#else
3434
background_color = Clutter.Color.from_string ("Black");
3535
#endif

src/ScreenshotManager.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public class Gala.ScreenshotManager : Object {
244244
flash_actor.set_size (width, height);
245245
flash_actor.set_position (x, y);
246246
#if HAS_MUTTER47
247-
flash_actor.set_background_color (Cogl.Color.from_string ("white"));
247+
flash_actor.set_background_color (Cogl.Color.from_string ("#FFFFFF"));
248248
#elif HAS_MUTTER46
249249
flash_actor.set_background_color (Clutter.Color.from_pixel (0xffffffffu));
250250
#else

src/Widgets/SessionLocker.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class Gala.SessionLocker : Clutter.Actor {
121121
});
122122

123123
#if HAS_MUTTER47
124-
background_color = Cogl.Color.from_string ("black");
124+
background_color = Cogl.Color.from_string ("#000000");
125125
#else
126126
background_color = Clutter.Color.from_string ("black");
127127
#endif

0 commit comments

Comments
 (0)