Skip to content

Commit

Permalink
xfwm4: treat black label as a special case
Browse files Browse the repository at this point in the history
Otherwise it is the same as gray, because it isn't really a color in HSV
color scale.

QubesOS/qubes-issues#2120
  • Loading branch information
marmarek committed Jul 13, 2016
1 parent eedb3af commit 18206b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions xfwm4/xfwm4-4.12.3-qubes-decoration-black-hack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Index: xfwm4-4.12.3/src/mypixmap.c
===================================================================
--- xfwm4-4.12.3.orig/src/mypixmap.c
+++ xfwm4-4.12.3/src/mypixmap.c
@@ -612,7 +612,12 @@ pixbuf_create_from_xpm (gpointer handle,
1.0*color->green/0xFFFF,
1.0*color->blue/0xFFFF,
&h, &s, &v);
- gtk_hsv_to_rgb(override_h, override_s, v, &new_r, &new_g, &new_b);
+ /* Special case for black label, otherwise it is the same as gray -
+ * see #2120 */
+ if (override_h == 0.0 && override_s == 0.0 && override_v == 0.0)
+ gtk_hsv_to_rgb(override_h, override_s, v * 0.2, &new_r, &new_g, &new_b);
+ else
+ gtk_hsv_to_rgb(override_h, override_s, v, &new_r, &new_g, &new_b);
color->red = new_r*0xFFFF;
color->green = new_g*0xFFFF;
color->blue = new_b*0xFFFF;
2 changes: 2 additions & 0 deletions xfwm4/xfwm4.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Patch20: xfwm4-4.6.1-cleanup-idle-queue.patch

Patch100: xfwm4-4.12.3-qubes-decoration.patch
Patch101: xfwm4-4.12.3-qubes-decoration-custom-colors.patch
Patch102: xfwm4-4.12.3-qubes-decoration-black-hack.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Expand Down Expand Up @@ -49,6 +50,7 @@ xfwm4 is a window manager compatible with GNOME, GNOME2, KDE2, KDE3 and Xfce.

%patch100 -p1 -b .qubes
%patch101 -p1 -b .qubes-custom-color
%patch102 -p1 -b .qubes-black-hack


%build
Expand Down

0 comments on commit 18206b4

Please sign in to comment.