Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package workrave for openSUSE:Factory checked in at 2021-06-04 00:33:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/workrave (Old) and /work/SRC/openSUSE:Factory/.workrave.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "workrave" Fri Jun 4 00:33:39 2021 rev:9 rq:897101 version:1.10.45 Changes: -------- --- /work/SRC/openSUSE:Factory/workrave/workrave.changes 2021-06-01 10:41:19.409207528 +0200 +++ /work/SRC/openSUSE:Factory/.workrave.new.1898/workrave.changes 2021-06-04 00:33:55.360933366 +0200 @@ -1,0 +2,8 @@ +Thu Jun 3 08:25:16 UTC 2021 - Timo Jyrinki <[email protected]> + +- Add back the removed patches that were not included yet in the latest + upstream release that was done already in March. + - Add fix-wayland-gnome-crash.patch, now not needing rebasing + - Add support-gnome-40.patch + +------------------------------------------------------------------- New: ---- fix-wayland-gnome-crash.patch support-gnome-40.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ workrave.spec ++++++ --- /var/tmp/diff_new_pack.ZNYA4F/_old 2021-06-04 00:33:55.896934909 +0200 +++ /var/tmp/diff_new_pack.ZNYA4F/_new 2021-06-04 00:33:55.896934909 +0200 @@ -26,6 +26,10 @@ URL: http://www.workrave.org Source: https://github.com/rcaelers/workrave/archive/v%{upstream_version}.tar.gz Source2: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM fix-wayland-gnome-crash.patch boo#1184773 +Patch0: fix-wayland-gnome-crash.patch +# PATCH-FIX-UPSTREAM support-gnome-40.patch boo#1184863 +Patch1: support-gnome-40.patch BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: automake @@ -68,6 +72,8 @@ %prep %setup -q -n %{name}-%{upstream_version} +%patch0 -p1 +%patch1 -p1 %build ./autogen.sh ++++++ fix-wayland-gnome-crash.patch ++++++ >From 56af818cd3e148069134551aacc7b06043d8541a Mon Sep 17 00:00:00 2001 From: Rob Caelers <[email protected]> Date: Sun, 4 Apr 2021 20:11:24 +0200 Subject: [PATCH] Fix crash in Gnome Shell applet (#281) --- frontend/applets/common/src/timebar.c | 107 ++++++++++---------------- 1 file changed, 40 insertions(+), 67 deletions(-) diff --git a/frontend/applets/common/src/timebar.c b/frontend/applets/common/src/timebar.c index b35004f51..62bcf3282 100644 --- a/frontend/applets/common/src/timebar.c +++ b/frontend/applets/common/src/timebar.c @@ -25,7 +25,7 @@ static void workrave_timebar_class_init(WorkraveTimebarClass *klass); static void workrave_timebar_init(WorkraveTimebar *self); -static void workrave_timebar_init_ui(WorkraveTimebar *self); +static void workrave_timebar_init_ui(WorkraveTimebar *self, cairo_t *c); static void workrave_timebar_draw_filled_box(WorkraveTimebar *self, cairo_t *cr, int x, int y, int width, int height); static void workrave_timebar_draw_frame(WorkraveTimebar *self, cairo_t *cr, int width, int height); static void workrave_timebar_compute_bar_dimensions(WorkraveTimebar *self, int *bar_width, int *sbar_width, int *bar_height); @@ -48,8 +48,6 @@ enum struct _WorkraveTimebarPrivate { - gchar *name; - //! Color of the time-bar. WorkraveColorId bar_color; @@ -77,9 +75,6 @@ struct _WorkraveTimebarPrivate int width; int height; -#ifndef USE_GTK2 - GtkStyleContext *style_context; -#endif PangoContext *pango_context; PangoLayout *pango_layout; }; @@ -129,8 +124,10 @@ workrave_timebar_init(WorkraveTimebar *self) priv->secondary_bar_value = 100; priv->secondary_bar_max_value = 600; priv->bar_text = g_strdup(""); - - workrave_timebar_init_ui(self); + priv->width = 0; + priv->height = 0; + priv->pango_context = NULL; + priv->pango_layout = NULL; } void @@ -239,79 +236,54 @@ workrave_timebar_draw_text(WorkraveTimebar *self, cairo_t *cr) pango_cairo_show_layout(cr, priv->pango_layout); } -#ifndef USE_GTK2 -static void -workrave_timebar_init_ui(WorkraveTimebar *self) +static PangoFontDescription * +workrave_timebar_get_font(void) { - WorkraveTimebarPrivate *priv = workrave_timebar_get_instance_private(self); - - priv->style_context = gtk_style_context_new(); - - GtkWidgetPath *path = gtk_widget_path_new(); - gtk_widget_path_append_type(path, GTK_TYPE_BUTTON); - gtk_style_context_set_path(priv->style_context, path); - gtk_style_context_add_class(priv->style_context, GTK_STYLE_CLASS_TROUGH); - - GdkScreen *screen = gdk_screen_get_default(); - priv->pango_context = gdk_pango_context_get_for_screen(screen); + PangoFontDescription *font_desc; - PangoFontDescription *font_desc = NULL; - gtk_style_context_get(priv->style_context, GTK_STATE_FLAG_ACTIVE, "font", &font_desc, NULL); - - pango_context_set_language(priv->pango_context, gtk_get_default_language()); - pango_context_set_font_description(priv->pango_context, font_desc); - - priv->pango_layout = pango_layout_new(priv->pango_context); - pango_layout_set_text(priv->pango_layout, "-9:59:59", -1); - - pango_layout_get_pixel_size(priv->pango_layout, &priv->width, &priv->height); - - priv->width = MAX(priv->width + 2 * MARGINX, MIN_HORIZONTAL_BAR_WIDTH); - priv->height = MAX(priv->height + 2 * MARGINY, MIN_HORIZONTAL_BAR_HEIGHT); - - gtk_widget_path_free(path); -} - -static void -workrave_timebar_draw_frame(WorkraveTimebar *self, cairo_t *cr, int width, int height) -{ - WorkraveTimebarPrivate *priv = workrave_timebar_get_instance_private(self); - - gtk_style_context_save(priv->style_context); - gtk_style_context_set_state(priv->style_context, (GtkStateFlags)GTK_STATE_FLAG_ACTIVE); +#ifndef USE_GTK2 + if (gdk_screen_get_default()) + { + GtkStyleContext *style = gtk_style_context_new(); + GtkWidgetPath *path = gtk_widget_path_new(); - gtk_render_frame(priv->style_context, cr, 0, 0, width - 1, height - 1); + gtk_widget_path_append_type(path, GTK_TYPE_BUTTON); + gtk_style_context_set_path(style, path); + gtk_widget_path_unref(path); - GdkRGBA color = bar_colors[COLOR_ID_BG]; - set_color(cr, color); - cairo_rectangle(cr, BORDER_SIZE, BORDER_SIZE, width - 2 * BORDER_SIZE, height - 2 * BORDER_SIZE); - cairo_fill(cr); + gtk_style_context_get(style, GTK_STATE_FLAG_NORMAL, GTK_STYLE_PROPERTY_FONT, &font_desc, NULL); + g_object_unref(style); + } + else +#endif + { + font_desc = pango_font_description_from_string("Sans 10"); + } - gtk_style_context_restore(priv->style_context); + return font_desc; } -#else - static void -workrave_timebar_init_ui(WorkraveTimebar *self) +workrave_timebar_init_ui(WorkraveTimebar *self, cairo_t *cr) { WorkraveTimebarPrivate *priv = workrave_timebar_get_instance_private(self); - GdkScreen *screen = gdk_screen_get_default(); - priv->pango_context = gdk_pango_context_get_for_screen(screen); - - const PangoFontDescription *font_desc = pango_font_description_from_string("Sans 10"); + if (priv->pango_layout == NULL) + { + PangoFontDescription *font_desc = workrave_timebar_get_font(); - pango_context_set_language(priv->pango_context, gtk_get_default_language()); - pango_context_set_font_description(priv->pango_context, font_desc); + priv->pango_layout = pango_cairo_create_layout(cr); + priv->pango_context = pango_layout_get_context(priv->pango_layout); - priv->pango_layout = pango_layout_new(priv->pango_context); - pango_layout_set_text(priv->pango_layout, "-9:59:59", -1); + pango_context_set_language(priv->pango_context, gtk_get_default_language()); + pango_context_set_font_description(priv->pango_context, font_desc); - pango_layout_get_pixel_size(priv->pango_layout, &priv->width, &priv->height); + pango_layout_set_text(priv->pango_layout, "-9:59:59", -1); + pango_layout_get_pixel_size(priv->pango_layout, &priv->width, &priv->height); - priv->width = MAX(priv->width + 2 * MARGINX, MIN_HORIZONTAL_BAR_WIDTH); - priv->height = MAX(priv->height + 2 * MARGINY, MIN_HORIZONTAL_BAR_HEIGHT); + priv->width = MAX(priv->width + 2 * MARGINX, MIN_HORIZONTAL_BAR_WIDTH); + priv->height = MAX(priv->height + 2 * MARGINY, MIN_HORIZONTAL_BAR_HEIGHT); + } } static void @@ -341,7 +313,6 @@ workrave_timebar_draw_frame(WorkraveTimebar *self, cairo_t *cr, int width, int h cairo_rectangle(cr, 2, 2, width - 4, height - 4); cairo_fill(cr); } -#endif static void workrave_timebar_draw_filled_box(WorkraveTimebar *self, cairo_t *cr, int x, int y, int width, int height) @@ -403,6 +374,8 @@ workrave_timebar_set_text(WorkraveTimebar *self, const gchar *text) void workrave_timebar_draw(WorkraveTimebar *self, cairo_t *cr) { + workrave_timebar_init_ui(self, cr); + workrave_timebar_draw_bar(self, cr); workrave_timebar_draw_text(self, cr); } ++++++ support-gnome-40.patch ++++++ >From f199d4c5df43612b7d513168a00f8094fe08218a Mon Sep 17 00:00:00 2001 From: Rob Caelers <[email protected]> Date: Tue, 6 Apr 2021 21:30:09 +0200 Subject: [PATCH] Support Gnome Shell 40 (#288) References: https://github.com/rcaelers/workrave/commit/f199d4c5df43612b7d513168a00f8094fe08218a --- frontend/applets/gnome-shell/src/metadata.json.in | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/applets/gnome-shell/src/metadata.json.in b/frontend/applets/gnome-shell/src/metadata.json.in index c10ca8212..1662021e2 100644 --- a/frontend/applets/gnome-shell/src/metadata.json.in +++ b/frontend/applets/gnome-shell/src/metadata.json.in @@ -23,6 +23,7 @@ "3.28", "3.30", "3.32", + "40", "@shell_current@" ], "localedir": "@LOCALEDIR@", "url": "@url@"
