Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package evince for openSUSE:Factory checked 
in at 2021-02-18 20:39:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evince (Old)
 and      /work/SRC/openSUSE:Factory/.evince.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evince"

Thu Feb 18 20:39:23 2021 rev:154 rq:872514 version:3.38.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/evince/evince.changes    2021-01-30 
13:55:30.805931273 +0100
+++ /work/SRC/openSUSE:Factory/.evince.new.28504/evince.changes 2021-02-18 
20:50:00.507303317 +0100
@@ -1,0 +2,13 @@
+Sun Feb 14 15:08:25 UTC 2021 - Bj??rn Lie <[email protected]>
+
+- Update to version 3.38.2:
+  + libdocument:
+    - Fix parameter type in gtk-doc.
+    - Stop trusting phsyical dimensions from monitors.
+  + libview:
+    - Fix support for HiDPI in link preview.
+    - Forgo setting device offset on page surfaces.
+  + pdf: Keep same visual appearance between displayed and copied
+    text.
+
+-------------------------------------------------------------------

Old:
----
  evince-3.38.1.tar.xz

New:
----
  evince-3.38.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evince.spec ++++++
--- /var/tmp/diff_new_pack.wL88Uz/_old  2021-02-18 20:50:01.231304024 +0100
+++ /var/tmp/diff_new_pack.wL88Uz/_new  2021-02-18 20:50:01.235304029 +0100
@@ -20,7 +20,7 @@
 %define pluginAPI 4
 
 Name:           evince
-Version:        3.38.1
+Version:        3.38.2
 Release:        0
 Summary:        GNOME Document Viewer
 License:        GPL-2.0-or-later

++++++ evince-3.38.1.tar.xz -> evince-3.38.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evince-3.38.1/NEWS new/evince-3.38.2/NEWS
--- old/evince-3.38.1/NEWS      2021-01-25 04:08:04.091353700 +0100
+++ new/evince-3.38.2/NEWS      2021-02-14 04:36:17.346985800 +0100
@@ -1,4 +1,22 @@
 ================
+Evince    3.38.2
+================
+
+libdocument:
+  * Fix parameter type in gtk-doc (Mike Vastola)
+  * Stop trusting phsyical dimensions from monitors (#1403, #3115, Mike 
Vastola)
+
+libview:
+  * Fix support for HiDPI in link preview (#1543, Mads Chr. Olesen)
+  * Forgo setting device offset on page surfaces (Andrew Mayorov)
+
+pdf:
+  * keep same visual appearance between displayed and copied text (#1085, 
Nelson Ben??tez Le??n)
+
+Developers:
+  * Andrew Mayorov, Mads Chr. Olesen, Mike Vastola, Nelson Ben??tez Le??n
+
+================
 Evince    3.38.1
 ================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evince-3.38.1/libdocument/ev-document-misc.c 
new/evince-3.38.2/libdocument/ev-document-misc.c
--- old/evince-3.38.1/libdocument/ev-document-misc.c    2021-01-25 
04:08:04.123354000 +0100
+++ new/evince-3.38.2/libdocument/ev-document-misc.c    2021-02-14 
04:36:17.390986400 +0100
@@ -520,7 +520,7 @@
 
 /**
  * ev_document_misc_get_screen_dpi:
- * @screen: a #GtkScreen
+ * @screen: a #GdkScreen
  *
  * Returns: The DPI of @screen, or 96 if the DPI is not available
  *
@@ -552,9 +552,8 @@
  * ev_document_misc_get_widget_dpi:
  * @widget: a #GtkWidget
  *
- * Returns DPI for monitor on which given widget has been realized.
- * Returns DPI of primary monitor or DPI of first monitor in the list inside
- * of GdkDisplay if the widget has not been realized yet.
+ * Returns sensible guess for DPI of monitor on which given widget has been
+ * realized. If HiDPI display, use 192, else 96.
  * Returns 96 as fallback value.
  *
  * Returns: DPI as gdouble
@@ -566,7 +565,7 @@
        GdkDisplay   *display;
        GdkMonitor   *monitor;
        GdkWindow    *window;
-       gdouble       dp, di;
+       gboolean      is_landscape;
 
        display = gtk_widget_get_display (widget);
        window = gtk_widget_get_window (widget);
@@ -578,22 +577,25 @@
                        monitor = gdk_display_get_monitor (display, 0);
        }
 
-       if (monitor != NULL) {
-               /* diagonal in pixels */
-               gdk_monitor_get_geometry (monitor, &geometry);
-               dp = hypot (geometry.width, geometry.height);
-               if (dp == 0)
-                       return 96;
-
-               /* diagonal in inches */
-               di = hypot (gdk_monitor_get_width_mm (monitor), 
gdk_monitor_get_height_mm (monitor)) / 25.4;
-               if (di == 0)
-                       return 96;
+       /* The only safe assumption you can make, on Unix-like/X11 and
+        * Linux/Wayland, is to always set the DPI to 96, regardless of
+        * physical/logical resolution, because that's the only safe
+        * guarantee we can make.
+        * https://gitlab.gnome.org/GNOME/gtk/-/issues/3115#note_904622 */
+       if (monitor == NULL)
+               return 96;
 
-               return (dp / di);
-       } else {
+       gdk_monitor_get_geometry (monitor, &geometry);
+       is_landscape = geometry.width > geometry.height;
+
+       /* DPI is 192 if height ??? 1080 and the orientation is not portrait,
+        * which is, incidentally, how GTK detects HiDPI displays and set a
+        * scaling factor for the logical output
+        * https://gitlab.gnome.org/GNOME/gtk/-/issues/3115#note_904622 */
+       if (is_landscape && geometry.height >= 1080)
+               return 192;
+       else
                return 96;
-       }
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evince-3.38.1/libview/ev-view.c 
new/evince-3.38.2/libview/ev-view.c
--- old/evince-3.38.1/libview/ev-view.c 2021-01-25 04:08:04.127354000 +0100
+++ new/evince-3.38.2/libview/ev-view.c 2021-02-14 04:36:17.394986600 +0100
@@ -158,7 +158,7 @@
                                                              gint              
  y,
                                                              EvLink            
 *link,
                                                              GdkRectangle      
 *area);
-static void       link_preview_show_thumbnail                (GdkPixbuf        
  *pixbuf,
+static void       link_preview_show_thumbnail                (cairo_surface_t  
  *page_surface,
                                                              EvView            
 *view);
 static void       link_preview_job_finished_cb               (EvJobThumbnail   
  *job,
                                                              EvView            
 *view);
@@ -2219,6 +2219,7 @@
                guint            link_dest_page;
                EvPoint          link_dest_doc;
                GdkPoint         link_dest_view;
+               gint             device_scale = 1;
 
                ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
 
@@ -2258,10 +2259,13 @@
 
                /* Start thumbnailing job async */
                link_dest_page = ev_link_dest_get_page (dest);
+#ifdef HAVE_HIDPI_SUPPORT
+               device_scale = gtk_widget_get_scale_factor (GTK_WIDGET (view));
+#endif
                view->link_preview.job = ev_job_thumbnail_new (view->document,
                                                               link_dest_page,
                                                               view->rotation,
-                                                              view->scale);
+                                                              view->scale * 
device_scale);
                ev_job_thumbnail_set_output_format (EV_JOB_THUMBNAIL 
(view->link_preview.job),
                                                    EV_JOB_THUMBNAIL_SURFACE);
 
@@ -2275,15 +2279,9 @@
 
                page_surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, 
link_dest_page);
 
-               if (page_surface) {
-                       GdkPixbuf *slice;
-
-                       slice = gdk_pixbuf_get_from_surface (page_surface, 0, 0,
-                                                            
cairo_image_surface_get_width(page_surface),
-                                                            
cairo_image_surface_get_height(page_surface));
-                       link_preview_show_thumbnail (slice, view);
-                       g_object_unref(slice);
-               } else {
+               if (page_surface)
+                       link_preview_show_thumbnail (page_surface, view);
+               else {
                        g_signal_connect (view->link_preview.job, "finished",
                                          G_CALLBACK 
(link_preview_job_finished_cb),
                                          view);
@@ -5165,23 +5163,28 @@
 }
 
 static void
-link_preview_show_thumbnail (GdkPixbuf *pixbuf,
+link_preview_show_thumbnail (cairo_surface_t *page_surface,
                             EvView *view)
 {
-       GtkWidget *popover = view->link_preview.popover;
-       GdkPixbuf *thumbnail_slice;
-       GtkWidget *image_view;
-       gdouble    x, y;   /* position of the link on destination page */
-       gint       pwidth, pheight;  /* dimensions of destination page */
-       gint       vwidth, vheight;  /* dimensions of main view */
-       gint       width, height;    /* dimensions of popup */
-       gint       left, top;
+       GtkWidget       *popover = view->link_preview.popover;
+       GtkWidget       *image_view;
+       gdouble          x, y;   /* position of the link on destination page */
+       gint             pwidth, pheight;  /* dimensions of destination page */
+       gint             vwidth, vheight;  /* dimensions of main view */
+       gint             width, height;    /* dimensions of popup */
+       gint             left, top;
+       gdouble          device_scale_x = 1, device_scale_y = 1;
+       cairo_surface_t *thumbnail_slice;
+       cairo_t         *cr;
 
        x = view->link_preview.left;
        y = view->link_preview.top;
 
-       pwidth = gdk_pixbuf_get_width (pixbuf);
-       pheight = gdk_pixbuf_get_height (pixbuf);
+#ifdef HAVE_HIDPI_SUPPORT
+       cairo_surface_get_device_scale (page_surface, &device_scale_x, 
&device_scale_y);
+#endif
+       pwidth = cairo_image_surface_get_width (page_surface) / device_scale_x;
+       pheight = cairo_image_surface_get_height (page_surface) / 
device_scale_y;
 
        vwidth = gtk_widget_get_allocated_width (GTK_WIDGET (view));
        vheight = gtk_widget_get_allocated_height (GTK_WIDGET (view));
@@ -5214,16 +5217,21 @@
        left = MIN (MAX (0, left), pwidth - width);
        top = MIN (MAX (0, top), pheight - height);
 
-       thumbnail_slice = gdk_pixbuf_new_subpixbuf (pixbuf,
-                                                   left, top,
-                                                   width, height);
-       image_view = gtk_image_new_from_pixbuf (thumbnail_slice);
+       /* paint out the part of the page we want to a separate cairo_surface_t 
*/
+       thumbnail_slice = cairo_surface_create_similar (page_surface, 
CAIRO_CONTENT_COLOR, width, height);
+       cr = cairo_create (thumbnail_slice);
+       cairo_set_source_surface (cr, page_surface, -left, -top);
+       cairo_rectangle (cr, 0, 0, width, height);
+       cairo_fill (cr);
+
+       image_view = gtk_image_new_from_surface (thumbnail_slice);
 
        gtk_widget_destroy (gtk_bin_get_child (GTK_BIN (popover)));
        gtk_container_add (GTK_CONTAINER (popover), image_view);
        gtk_widget_show (image_view);
 
-       g_object_unref (thumbnail_slice);
+       cairo_destroy (cr);
+       cairo_surface_destroy (thumbnail_slice);
 }
 
 static gboolean
@@ -5249,7 +5257,7 @@
                              EvView *view)
 {
        GtkWidget *popover = view->link_preview.popover;
-       GdkPixbuf *pixbuf;
+       gint       device_scale = 1;
 
        if (ev_job_is_failed (EV_JOB (job))) {
                gtk_widget_destroy (popover);
@@ -5260,14 +5268,16 @@
                return;
        }
 
+#ifdef HAVE_HIDPI_SUPPORT
+        device_scale = gtk_widget_get_scale_factor (GTK_WIDGET (view));
+        cairo_surface_set_device_scale (job->thumbnail_surface, device_scale, 
device_scale);
+#endif
+
        if (ev_document_model_get_inverted_colors (view->model))
                ev_document_misc_invert_surface (job->thumbnail_surface);
 
-       pixbuf = ev_document_misc_pixbuf_from_surface (job->thumbnail_surface);
-
-       link_preview_show_thumbnail (pixbuf, view);
+       link_preview_show_thumbnail (job->thumbnail_surface, view);
 
-       g_object_unref (pixbuf);
        g_object_unref (job);
        view->link_preview.job = NULL;
 }
@@ -7387,10 +7397,7 @@
                offset_y /= scale_y;
        }
 
-       cairo_surface_set_device_offset (surface,
-                                        offset_x * device_scale_x,
-                                        offset_y * device_scale_y);
-       cairo_set_source_surface (cr, surface, 0, 0);
+       cairo_set_source_surface (cr, surface, -offset_x, -offset_y);
        cairo_paint (cr);
        cairo_restore (cr);
 }
@@ -10100,7 +10107,10 @@
 
        ev_document_doc_mutex_unlock ();
        
-       normalized_text = g_utf8_normalize (text->str, text->len, 
G_NORMALIZE_NFKC);
+       /* For copying text from the document to the clipboard, we want a 
normalization
+        * that preserves 'canonical equivalence' i.e. that text after 
normalization
+        * is not visually different than the original text. Issue #1085 */
+       normalized_text = g_utf8_normalize (text->str, text->len, 
G_NORMALIZE_NFC);
        g_string_free (text, TRUE);
        return normalized_text;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evince-3.38.1/meson.build 
new/evince-3.38.2/meson.build
--- old/evince-3.38.1/meson.build       2021-01-25 04:08:04.127354000 +0100
+++ new/evince-3.38.2/meson.build       2021-02-14 04:36:17.394986600 +0100
@@ -1,6 +1,6 @@
 project(
   'evince', ['c', 'cpp'],
-  version: '3.38.1',
+  version: '3.38.2',
   license: 'GPL2+',
   default_options: 'buildtype=debugoptimized',
   meson_version: '>= 0.50.0',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evince-3.38.1/org.gnome.Evince.appdata.xml.in 
new/evince-3.38.2/org.gnome.Evince.appdata.xml.in
--- old/evince-3.38.1/org.gnome.Evince.appdata.xml.in   2021-01-25 
04:08:04.127354000 +0100
+++ new/evince-3.38.2/org.gnome.Evince.appdata.xml.in   2021-02-14 
04:36:17.394986600 +0100
@@ -82,6 +82,13 @@
     <content_attribute id="money-gambling">none</content_attribute>
   </content_rating>
   <releases>
+    <release version="3.38.2" date="2021-02-14">
+      <issues>
+        <issue>https://gitlab.gnome.org/GNOME/evince/issues/1085</issue>
+        <issue>https://gitlab.gnome.org/GNOME/evince/issues/1403</issue>
+        <issue>https://gitlab.gnome.org/GNOME/evince/issues/1543</issue>
+      </issues>
+    </release>
     <release version="3.38.1" date="2021-01-25">
       <issues>
         <issue>https://gitlab.gnome.org/GNOME/evince/issues/#1333</issue>

Reply via email to