Skip to content

Commit

Permalink
Update to 4.20
Browse files Browse the repository at this point in the history
Includes rebasing qubes patches.

QubesOS/qubes-issues#9807
  • Loading branch information
marmarek committed Feb 26, 2025
1 parent 14ddb55 commit 6f0e463
Show file tree
Hide file tree
Showing 11 changed files with 693 additions and 465 deletions.
963 changes: 583 additions & 380 deletions 0001-Qubes-decoration.patch

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions 0002-Qubes-decoration-custom-colors.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From e5da8df545117dcc8e399bc2917d930c41f0a3f8 Mon Sep 17 00:00:00 2001
From 88624323878eb377a16e4d7fb04bb8ed2f010a90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<[email protected]>
Date: Sat, 16 May 2020 11:43:01 +0200
Subject: [PATCH 2/9] Qubes decoration: custom colors
Subject: [PATCH 2/8] Qubes decoration: custom colors

Authors:
@marmarek
Expand All @@ -15,10 +15,10 @@ Original work done in:
1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/client.c b/src/client.c
index 52d8dbda8..b9b12b96c 100644
index fd7a1e550..83be4b288 100644
--- a/src/client.c
+++ b/src/client.c
@@ -173,15 +173,31 @@ getQubesLabel (Client *c)
@@ -202,15 +202,31 @@ getQubesLabel (Client *c)
ScreenInfo *screen_info;
DisplayInfo *display_info;
Atom atom_label;
Expand Down Expand Up @@ -54,5 +54,5 @@ index 52d8dbda8..b9b12b96c 100644
int actual_format;
unsigned long nitems = 0, bytes_left;
--
2.25.4
2.48.1

10 changes: 5 additions & 5 deletions 0003-Qubes-decoration-black-hack.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From fd8380aa0389bc3501917d90994f3cc291b8a026 Mon Sep 17 00:00:00 2001
From 429841cdac7afd8b35a67b904bdb51be36e76075 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<[email protected]>
Date: Sat, 16 May 2020 11:43:36 +0200
Subject: [PATCH 3/9] Qubes decoration: black hack
Subject: [PATCH 3/8] Qubes decoration: black hack

Authors:
@marmarek
Expand All @@ -15,10 +15,10 @@ Original work done in:
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mypixmap.c b/src/mypixmap.c
index f60413770..52b55ac3e 100644
index fc62dd6e5..7724bd812 100644
--- a/src/mypixmap.c
+++ b/src/mypixmap.c
@@ -615,7 +615,12 @@ pixbuf_create_from_xpm (gpointer handle, xfwmColorSymbol *color_sym, gboolean ov
@@ -624,7 +624,12 @@ pixbuf_create_from_xpm (gpointer handle, xfwmColorSymbol *color_sym, gboolean ov
1.0*color->green/0xFFFF,
1.0*color->blue/0xFFFF,
&h, &s, &v);
Expand All @@ -33,5 +33,5 @@ index f60413770..52b55ac3e 100644
color->green = new_g*0xFFFF;
color->blue = new_b*0xFFFF;
--
2.25.4
2.48.1

10 changes: 5 additions & 5 deletions 0004-Don-t-reset-client-struct.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 1d1d35c342c5defe4acb3f74c56358d67b078d83 Mon Sep 17 00:00:00 2001
From 00b5d547fee762e3e9d68b493473f291d774b347 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<[email protected]>
Date: Sat, 16 May 2020 11:44:28 +0200
Subject: [PATCH 4/9] Don't reset client struct
Subject: [PATCH 4/8] Don't reset client struct

Do not reset client->*_timeout_id fields in clientFrame(). The client struct is
allocated with g_new0(), which fill it with 0 already. But at this point there
Expand All @@ -20,10 +20,10 @@ Original work done in:
1 file changed, 11 deletions(-)

diff --git a/src/client.c b/src/client.c
index b9b12b96c..ac9620f2c 100644
index 83be4b288..efb90c361 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1853,17 +1853,6 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
@@ -1885,17 +1885,6 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
FLAG_SET (c->xfwm_flags, XFWM_FLAG_OPACITY_LOCKED);
}

Expand All @@ -42,5 +42,5 @@ index b9b12b96c..ac9620f2c 100644
c->class.res_class = NULL;
XGetClassHint (display_info->dpy, w, &c->class);
--
2.25.4
2.48.1

10 changes: 5 additions & 5 deletions 0005-Qubes-decoration-handle-guivm-windows-prefix.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 2c3257dc8d88dd1ce7c9bcb32c521705958fb60f Mon Sep 17 00:00:00 2001
From 64cc243c33ae10e02ceee6c19a5dc2f6081043d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<[email protected]>
Date: Sat, 16 May 2020 11:44:53 +0200
Subject: [PATCH 5/9] Qubes decoration: handle guivm windows prefix
Subject: [PATCH 5/8] Qubes decoration: handle guivm windows prefix

Authors:
@fepitre
Expand All @@ -14,10 +14,10 @@ Original work done in:
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index ac9620f2c..aa66f008d 100644
index efb90c361..7d67d2353 100644
--- a/src/client.c
+++ b/src/client.c
@@ -262,12 +262,32 @@ getQubesVmName (Client *c)
@@ -291,12 +291,32 @@ getQubesVmName (Client *c)
c->qubes_vmname = g_strdup (_("[ERROR Reading VM name?!] "));
}
} else {
Expand Down Expand Up @@ -52,5 +52,5 @@ index ac9620f2c..aa66f008d 100644

static gchar*
--
2.25.4
2.48.1

92 changes: 57 additions & 35 deletions 0006-Qubes-decoration-title-colors.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 97766a511b020482874ea68bd3d18fa20963bb71 Mon Sep 17 00:00:00 2001
From bb501a689a1e3f289ba785b25c23e85db712e19a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<[email protected]>
Date: Sat, 16 May 2020 11:45:13 +0200
Subject: [PATCH 6/9] Qubes decoration: title colors
Subject: [PATCH 6/8] Qubes decoration: title colors

Add dark and light title colors

Expand All @@ -22,55 +22,78 @@ Authors:
Original work done in:
- QubesOS/qubes-desktop-linux-xfce4-xfwm4
---
src/frame.c | 5 +++--
src/frame.c | 11 +++++------
src/screen.h | 2 ++
src/settings.c | 19 +++++++++++++++++++
src/settings.c | 18 ++++++++++++++++++
src/settings.h | 11 +++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
4 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/src/frame.c b/src/frame.c
index dee79071c..9f4ed0d05 100644
index 07aac60ca..5434e2e5c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -320,7 +320,8 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
frameFillTitlePixmap (c, state, TITLE_3, x, w3, top_height, title_pm, top_pm);
title_x = hoffset + x;
cairo_translate (cr, title_x, title_y);
- if (screen_info->params->title_shadow[state])
+ if (c->qubes_label_color == QUBES_LABEL_DOM0 &&
+ screen_info->params->title_shadow[state])
@@ -156,12 +156,11 @@ frameFillTitlePixmap (Client * c, int state, int part, int x, int w, int h, xfwm
}

static void
-frameDrawTitleText (ScreenInfo * screen_info, cairo_t * cr, PangoLayout * layout, int state, int x, int y)
+frameDrawTitleText (ScreenInfo * screen_info, Decoration *decoration, bool enable_shadow, cairo_t * cr, PangoLayout * layout, int state, int x, int y)
{
cairo_translate (cr, x, y);
- if (screen_info->params->title_shadow[state])
+ if (enable_shadow && screen_info->params->title_shadow[state])
{
- // TODO?
gdk_cairo_set_source_rgba (cr, &screen_info->title_shadow_colors[state]);
if (screen_info->params->title_shadow[state] == TITLE_SHADOW_UNDER)
{
gdk_cairo_set_source_rgba (cr, &screen_info->title_shadow_colors[state]);
if (screen_info->params->title_shadow[state] == TITLE_SHADOW_UNDER)
@@ -342,7 +343,7 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
cairo_translate (cr, 0, -1);
}
@@ -182,7 +181,7 @@ frameDrawTitleText (ScreenInfo * screen_info, cairo_t * cr, PangoLayout * layout
cairo_translate (cr, 0, -1);
}
- gdk_cairo_set_source_rgba (cr, &screen_info->title_colors[state]);
+ gdk_cairo_set_source_rgba (cr, &decoration->title_colors[state]);
pango_cairo_show_layout (cr, layout);
x = x + w3;
}
- gdk_cairo_set_source_rgba (cr, &screen_info->title_colors[state]);
+ gdk_cairo_set_source_rgba (cr, &decoration->title_colors[state]);
pango_cairo_show_layout (cr, layout);
}

@@ -358,7 +357,7 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
cairo_rectangle(cr, title_x, title_y, right - w4, frameDecorationTop (decoration));
cairo_clip(cr);

- frameDrawTitleText (screen_info, cr, layout, state, title_x, title_y);
+ frameDrawTitleText (screen_info, decoration, c->qubes_label_color == QUBES_LABEL_DOM0, cr, layout, state, title_x, title_y);

cairo_restore(cr);
}
@@ -377,7 +376,7 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
{
frameFillTitlePixmap (c, state, TITLE_3, x, w3, top_height, title_pm, top_pm);
title_x = hoffset + x;
- frameDrawTitleText (screen_info, cr, layout, state, title_x, title_y);
+ frameDrawTitleText (screen_info, decoration, c->qubes_label_color == QUBES_LABEL_DOM0, cr, layout, state, title_x, title_y);
x = x + w3;
}

diff --git a/src/screen.h b/src/screen.h
index cd60f6e3d..58af7af25 100644
index cf03da208..ccbf611cc 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -96,6 +96,8 @@ struct _Decoration
xfwmPixmap sides[SIDE_COUNT][2];
xfwmPixmap title[TITLE_COUNT][2];
@@ -98,6 +98,8 @@ struct _Decoration
xfwmPixmap top[TITLE_COUNT][2];
xfwmPixmap corners_stretch[CORNER_COUNT][2];
xfwmPixmap sides_stretch[SIDE_COUNT][2];
+
+ GdkRGBA title_colors[2];
};

struct _ScreenInfo
diff --git a/src/settings.c b/src/settings.c
index 56428f021..3f7452878 100644
index 44dd3b011..a89aad3d2 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -398,6 +398,25 @@ Decoration *getDecorationForColor(ScreenInfo *screen_info, guint32 color)
xfwmPixmapLoad (screen_info, &decoration->top[i][INACTIVE], theme, imagename, screen_info->colsym, color);
}
@@ -417,6 +417,24 @@ Decoration *getDecorationForColor(ScreenInfo *screen_info, guint32 color)
g_strlcpy (imagename, "title-inactive-stretch", sizeof (imagename));
xfwmPixmapLoad (screen_info, &decoration->sides_stretch[SIDE_TOP][INACTIVE], theme, imagename, screen_info->colsym, color);

+ if (color == QUBES_LABEL_DOM0) {
+ decoration->title_colors[0] = screen_info->title_colors[0];
Expand All @@ -90,15 +113,14 @@ index 56428f021..3f7452878 100644
+ decoration->title_colors[1] = qubes_title_colors_dark[1];
+ }
+ }
+
g_hash_table_insert(screen_info->decoration, GINT_TO_POINTER(color), decoration);
return decoration;
}
diff --git a/src/settings.h b/src/settings.h
index 9f4000f6a..6ed534186 100644
index 4c2a40b2d..2ad175132 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -190,6 +190,17 @@ static const guint qubes_label_colors[] = {
@@ -195,6 +195,17 @@ static const guint qubes_label_colors[] = {
0x000000, /* QUBES_LABEL_BLACK */
};

Expand All @@ -117,5 +139,5 @@ index 9f4000f6a..6ed534186 100644
{
gchar *option;
--
2.25.4
2.48.1

Loading

0 comments on commit 6f0e463

Please sign in to comment.