From 44181312387cdf80b58675fa94e7786687b6751c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 05:28:20 +0000 Subject: import gtk3-3.22.30-3.el7 --- diff --git a/.gitignore b/.gitignore index 9148dc6..10f5981 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gtk+-3.22.26.tar.xz +SOURCES/gtk+-3.22.30.tar.xz diff --git a/.gtk3.metadata b/.gtk3.metadata index 214f91e..5c7affe 100644 --- a/.gtk3.metadata +++ b/.gtk3.metadata @@ -1 +1 @@ -aa6730ac00ea2352c522c3971f63b708b971bc5f SOURCES/gtk+-3.22.26.tar.xz +1be769c97b4dac9221d63f62f61ef724c55a14a3 SOURCES/gtk+-3.22.30.tar.xz diff --git a/SOURCES/0001-Add-_gtk_printer_get_hard_margins_for_paper_size.patch b/SOURCES/0001-Add-_gtk_printer_get_hard_margins_for_paper_size.patch new file mode 100644 index 0000000..a4e4b67 --- /dev/null +++ b/SOURCES/0001-Add-_gtk_printer_get_hard_margins_for_paper_size.patch @@ -0,0 +1,224 @@ +From fff08fa319dff8542a3f3481a5273523bdfd5dd9 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Mon, 16 Apr 2018 13:53:44 +0200 +Subject: [PATCH] Add _gtk_printer_get_hard_margins_for_paper_size() + +to retreive paper size specific hard margins and use this +to set the hard margins in the print context. +(modified by Marek Kasik ) + +https://bugzilla.gnome.org/show_bug.cgi?id=686109 +--- + gtk/gtkprintbackend.c | 18 +++++++ + gtk/gtkprintbackend.h | 8 +++- + gtk/gtkprinter-private.h | 6 +++ + gtk/gtkprinter.c | 13 +++++ + gtk/gtkprintoperation-unix.c | 4 +- + .../printbackends/cups/gtkprintbackendcups.c | 48 +++++++++++++++++++ + 6 files changed, 95 insertions(+), 2 deletions(-) + +diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c +index cccdbcaaf7..1a730ee3a2 100644 +--- a/gtk/gtkprintbackend.c ++++ b/gtk/gtkprintbackend.c +@@ -350,6 +350,12 @@ static gboolean fallback_printer_get_hard_margins (GtkPrinter + gdouble *bottom, + gdouble *left, + gdouble *right); ++static gboolean fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right); + static GList * fallback_printer_list_papers (GtkPrinter *printer); + static GtkPageSetup * fallback_printer_get_default_page_size (GtkPrinter *printer); + static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer); +@@ -376,6 +382,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class) + class->printer_request_details = fallback_printer_request_details; + class->printer_mark_conflicts = fallback_printer_mark_conflicts; + class->printer_get_hard_margins = fallback_printer_get_hard_margins; ++ class->printer_get_hard_margins_for_paper_size = fallback_printer_get_hard_margins_for_paper_size; + class->printer_list_papers = fallback_printer_list_papers; + class->printer_get_default_page_size = fallback_printer_get_default_page_size; + class->printer_get_capabilities = fallback_printer_get_capabilities; +@@ -499,6 +506,17 @@ fallback_printer_get_hard_margins (GtkPrinter *printer, + return FALSE; + } + ++static gboolean ++fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right) ++{ ++ return FALSE; ++} ++ + static GList * + fallback_printer_list_papers (GtkPrinter *printer) + { +diff --git a/gtk/gtkprintbackend.h b/gtk/gtkprintbackend.h +index f4524e8965..2fa236a8ac 100644 +--- a/gtk/gtkprintbackend.h ++++ b/gtk/gtkprintbackend.h +@@ -133,11 +133,17 @@ struct _GtkPrintBackendClass + gchar **auth_info, + gboolean store_auth_info); + ++ gboolean (*printer_get_hard_margins_for_paper_size) (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right); ++ + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); +- void (*_gtk_reserved4) (void); + }; + + GDK_AVAILABLE_IN_ALL +diff --git a/gtk/gtkprinter-private.h b/gtk/gtkprinter-private.h +index 51ec1a861f..a2c551156a 100644 +--- a/gtk/gtkprinter-private.h ++++ b/gtk/gtkprinter-private.h +@@ -44,6 +44,12 @@ cairo_surface_t * _gtk_printer_create_cairo_surface (GtkPrinter + gdouble height, + GIOChannel *cache_io); + GHashTable * _gtk_printer_get_custom_widgets (GtkPrinter *printer); ++gboolean _gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right); + + /* GtkPrintJob private methods: */ + GDK_AVAILABLE_IN_ALL +diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c +index 5e145ddd69..579fba0859 100644 +--- a/gtk/gtkprinter.c ++++ b/gtk/gtkprinter.c +@@ -941,6 +941,19 @@ _gtk_printer_create_cairo_surface (GtkPrinter *printer, + width, height, cache_io); + } + ++gboolean ++_gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right) ++{ ++ GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (printer->priv->backend); ++ ++ return backend_class->printer_get_hard_margins_for_paper_size (printer, paper_size, top, bottom, left, right); ++} ++ + /** + * gtk_printer_list_papers: + * @printer: a #GtkPrinter +diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c +index 9baf69438e..5dfdfe7e71 100644 +--- a/gtk/gtkprintoperation-unix.c ++++ b/gtk/gtkprintoperation-unix.c +@@ -32,6 +32,7 @@ + #include "gtkprintoperation-private.h" + #include "gtkprintoperation-portal.h" + #include "gtkmessagedialog.h" ++#include "gtkprinter-private.h" + + #include + #include +@@ -536,7 +537,8 @@ finish_print (PrintResponseData *rdata, + + if (gtk_print_settings_get_number_up (settings) < 2) + { +- if (printer && gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right)) ++ if (printer && (_gtk_printer_get_hard_margins_for_paper_size (printer, gtk_page_setup_get_paper_size (page_setup), &top, &bottom, &left, &right) || ++ gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right))) + _gtk_print_context_set_hard_margins (priv->print_context, top, bottom, left, right); + } + else +diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c +index 7d061c5fc9..ccd08e50a0 100644 +--- a/modules/printbackends/cups/gtkprintbackendcups.c ++++ b/modules/printbackends/cups/gtkprintbackendcups.c +@@ -195,6 +195,12 @@ static gboolean cups_printer_get_hard_margins (GtkPrinter + gdouble *bottom, + gdouble *left, + gdouble *right); ++static gboolean cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right); + static GtkPrintCapabilities cups_printer_get_capabilities (GtkPrinter *printer); + static void set_option_from_settings (GtkPrinterOption *option, + GtkPrintSettings *setting); +@@ -372,6 +378,7 @@ gtk_print_backend_cups_class_init (GtkPrintBackendCupsClass *class) + backend_class->printer_list_papers = cups_printer_list_papers; + backend_class->printer_get_default_page_size = cups_printer_get_default_page_size; + backend_class->printer_get_hard_margins = cups_printer_get_hard_margins; ++ backend_class->printer_get_hard_margins_for_paper_size = cups_printer_get_hard_margins_for_paper_size; + backend_class->printer_get_capabilities = cups_printer_get_capabilities; + backend_class->set_password = gtk_print_backend_cups_set_password; + } +@@ -6741,6 +6748,47 @@ cups_printer_get_hard_margins (GtkPrinter *printer, + return result; + } + ++static gboolean ++cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, ++ GtkPaperSize *paper_size, ++ gdouble *top, ++ gdouble *bottom, ++ gdouble *left, ++ gdouble *right) ++{ ++ ppd_file_t *ppd_file; ++ ppd_size_t *size; ++ const gchar *paper_name; ++ int i; ++ ++ ppd_file = gtk_printer_cups_get_ppd (GTK_PRINTER_CUPS (printer)); ++ if (ppd_file == NULL) ++ return FALSE; ++ ++ paper_name = gtk_paper_size_get_ppd_name (paper_size); ++ ++ for (i = 0; i < ppd_file->num_sizes; i++) ++ { ++ size = &ppd_file->sizes[i]; ++ if (g_strcmp0(size->name, paper_name) == 0) ++ { ++ *top = size->length - size->top; ++ *bottom = size->bottom; ++ *left = size->left; ++ *right = size->width - size->right; ++ return TRUE; ++ } ++ } ++ ++ /* Custom size */ ++ *left = ppd_file->custom_margins[0]; ++ *bottom = ppd_file->custom_margins[1]; ++ *right = ppd_file->custom_margins[2]; ++ *top = ppd_file->custom_margins[3]; ++ ++ return TRUE; ++} ++ + static GtkPrintCapabilities + cups_printer_get_capabilities (GtkPrinter *printer) + { +-- +2.17.1 + diff --git a/SOURCES/0001-gdk-Always-emit-motion-after-enter.patch b/SOURCES/0001-gdk-Always-emit-motion-after-enter.patch deleted file mode 100644 index 2b728e5..0000000 --- a/SOURCES/0001-gdk-Always-emit-motion-after-enter.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 12d965a62da72315d2cd201d30abeb79933f6eb2 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Mon, 20 Nov 2017 18:54:40 +0100 -Subject: [PATCH] gdk: Always emit motion after enter - -After a pointer emulating GDK_TOUCH_END event triggering a fake leave -notify with GDK_CROSSING_TOUCH_END mode, pointer_under_window will be -unset, which will make the next motion/touch_update event to trigger -an enter notify event again. - -Up till there, that's fine, however the motion event is just consumed -in favor of the just synthesized enter notify event. This is unexpected -to clients like spice-gtk that will only update coordinates from motion -events, sending both enter and motion will make them happy. ---- - gdk/gdkwindow.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c -index 79804cdacd..3ac80e910a 100644 ---- a/gdk/gdkwindow.c -+++ b/gdk/gdkwindow.c -@@ -9294,8 +9294,9 @@ proxy_pointer_event (GdkDisplay *display, - serial, non_linear); - _gdk_display_set_window_under_pointer (display, device, pointer_window); - } -- else if (source_event->type == GDK_MOTION_NOTIFY || -- source_event->type == GDK_TOUCH_UPDATE) -+ -+ if (source_event->type == GDK_MOTION_NOTIFY || -+ source_event->type == GDK_TOUCH_UPDATE) - { - GdkWindow *event_win; - guint evmask; --- -2.14.3 - diff --git a/SOURCES/0001-gdkseatdefault-Don-t-hide-GdkWindow-on-grab-failure.patch b/SOURCES/0001-gdkseatdefault-Don-t-hide-GdkWindow-on-grab-failure.patch new file mode 100644 index 0000000..3441698 --- /dev/null +++ b/SOURCES/0001-gdkseatdefault-Don-t-hide-GdkWindow-on-grab-failure.patch @@ -0,0 +1,52 @@ +From 2c8b95a518bea2192145efe11219f2e36091b37a Mon Sep 17 00:00:00 2001 +From: Victor Toso +Date: Thu, 24 May 2018 15:42:47 +0200 +Subject: [PATCH] gdkseatdefault: Don't hide GdkWindow on grab failure + +Application is not expecting that. + +Bug found due gdk_seat_grab() failure on Lock Screen. When user +Unlock the screen, the application is visible but does not receive +enter-event any more on X11/GNOME. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968 +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422 + +Signed-off-by: Victor Toso +Signed-off-by: Carlos Garnacho +--- + gdk/gdkseatdefault.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c +index 91a42cd4af..ce4bdc82d2 100644 +--- a/gdk/gdkseatdefault.c ++++ b/gdk/gdkseatdefault.c +@@ -115,8 +115,10 @@ gdk_seat_default_grab (GdkSeat *seat, + GdkSeatDefaultPrivate *priv; + guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME; + GdkGrabStatus status = GDK_GRAB_SUCCESS; ++ gboolean was_visible; + + priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat)); ++ was_visible = gdk_window_is_visible (window); + + if (prepare_func) + (prepare_func) (seat, window, prepare_func_data); +@@ -163,10 +165,12 @@ gdk_seat_default_grab (GdkSeat *seat, + { + if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD) + gdk_device_ungrab (priv->master_pointer, evtime); +- gdk_window_hide (window); + } + } + ++ if (status != GDK_GRAB_SUCCESS && !was_visible) ++ gdk_window_hide (window); ++ + G_GNUC_END_IGNORE_DEPRECATIONS; + + return status; +-- +2.17.0 + diff --git a/SOURCES/0001-x11-Avoid-a-division-by-zero.patch b/SOURCES/0001-x11-Avoid-a-division-by-zero.patch deleted file mode 100644 index 832de44..0000000 --- a/SOURCES/0001-x11-Avoid-a-division-by-zero.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cc967849f7653c697c33571a1a6a55e9ffd966ff Mon Sep 17 00:00:00 2001 -From: Pavel Roskin -Date: Thu, 8 Mar 2018 15:58:42 +0100 -Subject: [PATCH] x11: Avoid a division by zero - -This is similar to f44baf51d9e8616a but for RandR 1.3 servers like -x11rdp and Windows Exceed which don't return a refresh rate. Avoid a -crash when that happens. - -https://bugzilla.gnome.org/show_bug.cgi?id=775546 ---- - gdk/x11/gdkscreen-x11.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c -index 20fd27531e45..272cecd7aa4b 100644 ---- a/gdk/x11/gdkscreen-x11.c -+++ b/gdk/x11/gdkscreen-x11.c -@@ -658,7 +658,8 @@ init_randr13 (GdkScreen *screen, gboolean *changed) - XRRModeInfo *xmode = &resources->modes[j]; - if (xmode->id == crtc->mode) - { -- refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal); -+ if (xmode->hTotal != 0 && xmode->vTotal != 0) -+ refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal * xmode->vTotal); - break; - } - } --- -2.14.3 - diff --git a/SOURCES/x11-Dont-call-XInput-API-for-core-events.patch b/SOURCES/x11-Dont-call-XInput-API-for-core-events.patch deleted file mode 100644 index 1305bf0..0000000 --- a/SOURCES/x11-Dont-call-XInput-API-for-core-events.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4b1c02560f0d8097bf5a11932e52fb72f3e9e94b Mon Sep 17 00:00:00 2001 -From: Benjamin Otte -Date: Mon, 12 Feb 2018 21:09:50 +0100 -Subject: [PATCH] x11: Don't call XInput API for core events - -Fixes emacs crashing with XMing. - -https://bugzilla.redhat.com/show_bug.cgi?id=1483942 ---- - gdk/x11/gdkdisplay-x11.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c -index 3e843d6..75bd34c 100644 ---- a/gdk/x11/gdkdisplay-x11.c -+++ b/gdk/x11/gdkdisplay-x11.c -@@ -3072,6 +3072,16 @@ gdk_x11_display_get_default_seat (GdkDisplay *display) - - seats = gdk_display_list_seats (display); - -+ /* Shortcut only one seat being available. -+ * This path always triggers for core events, so we can freely use XInput below. */ -+ if (g_list_length (seats) == 1) -+ { -+ GdkSeat *seat = seats->data; -+ -+ g_list_free (seats); -+ return seat; -+ } -+ - gdk_x11_display_error_trap_push (display); - result = XIGetClientPointer (GDK_DISPLAY_XDISPLAY (display), - None, &device_id); --- -libgit2 0.26.0 - diff --git a/SPECS/gtk3.spec b/SPECS/gtk3.spec index 1136781..ed6aed4 100644 --- a/SPECS/gtk3.spec +++ b/SPECS/gtk3.spec @@ -2,7 +2,6 @@ %global with_broadway 1 %endif -%global with_wayland 1 %global glib2_version 2.49.4 %global pango_version 1.37.3 %global atk_version 2.15.1 @@ -10,7 +9,7 @@ %global gdk_pixbuf_version 2.30.0 %global xrandr_version 1.5.0 %global wayland_version 1.9.91 -%global wayland_protocols_version 1.9 +%global wayland_protocols_version 1.12 %global epoxy_version 1.0 %global bin_version 3.0.0 @@ -21,8 +20,8 @@ %global __provides_exclude_from ^%{_libdir}/gtk-3.0 Name: gtk3 -Version: 3.22.26 -Release: 4%{?dist} +Version: 3.22.30 +Release: 3%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -34,13 +33,11 @@ Source1: ja.po # https://bugzilla.redhat.com/show_bug.cgi?id=1259292 Patch18: app-chooser-fixes.patch -Patch19: 0001-gdk-Always-emit-motion-after-enter.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1507113 +Patch19: 0001-Add-_gtk_printer_get_hard_margins_for_paper_size.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1483942 -Patch20: x11-Dont-call-XInput-API-for-core-events.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1502788 -Patch21: 0001-x11-Avoid-a-division-by-zero.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1571422 +Patch20: 0001-gdkseatdefault-Don-t-hide-GdkWindow-on-grab-failure.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -68,14 +65,12 @@ BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(colord) BuildRequires: pkgconfig(avahi-gobject) BuildRequires: desktop-file-utils -%if 0%{?with_wayland} BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(wayland-client) >= %{wayland_version} BuildRequires: pkgconfig(wayland-cursor) >= %{wayland_version} BuildRequires: pkgconfig(wayland-egl) >= %{wayland_version} BuildRequires: pkgconfig(wayland-protocols) >= %{wayland_protocols_version} BuildRequires: pkgconfig(xkbcommon) -%endif # standard icons Requires: adwaita-icon-theme @@ -91,13 +86,11 @@ Requires: glib2%{?_isa} >= %{glib2_version} Requires: libepoxy%{?_isa} >= %{epoxy_version} Requires: libXrandr%{?_isa} >= %{xrandr_version} Requires: pango%{?_isa} >= %{pango_version} -%if 0%{?with_wayland} Requires: libwayland-client%{?_isa} >= %{wayland_version} Requires: libwayland-cursor%{?_isa} >= %{wayland_version} -%endif # make sure we have a reasonable gsettings backend -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 7 Recommends: dconf%{?_isa} %else Requires: dconf%{?_isa} @@ -180,7 +173,6 @@ the functionality of the installed %{name} package. %patch18 -p1 %patch19 -p1 %patch20 -p1 -%patch21 -p1 cp %{SOURCE1} po/ @@ -195,14 +187,13 @@ export CFLAGS='-fno-strict-aliasing %optflags' --enable-xcomposite \ --enable-xdamage \ --enable-x11-backend \ -%if 0%{?with_wayland} --enable-wayland-backend \ -%endif %if 0%{?with_broadway} --enable-broadway-backend \ %endif --enable-colord \ - --enable-installed-tests + --enable-installed-tests \ + --with-included-immodules=wayland ) # fight unused direct deps @@ -372,6 +363,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/installed-tests %changelog +* Thu Jun 21 2018 Benjamin Otte - 3.22.30-3 +- Don't hide GdkWindow on grab failure +- Resolves: #1571422 + +* Fri Jun 08 2018 Marek Kasik - 3.22.30-2 +- Get hard margins for current paper size when printing +- Resolves: #1507113 + +* Wed Apr 18 2018 Kalev Lember - 3.22.30-1 +- Update to 3.22.30 +- Resolves: #1569975 + * Mon Apr 09 2018 Debarshi Ray - 3.22.26-4 - Avoid a division by zero with RandR 1.3 - Resolves: #1502788