From nobody Fri Dec 03 07:45:06 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 83BF818B788C; Fri, 3 Dec 2021 07:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J54c25Z3Zz3DMt; Fri, 3 Dec 2021 07:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9ED4E4CF5; Fri, 3 Dec 2021 07:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B37j6Lx009444; Fri, 3 Dec 2021 07:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B37j6m5009443; Fri, 3 Dec 2021 07:45:06 GMT (envelope-from git) Date: Fri, 3 Dec 2021 07:45:06 GMT Message-Id: <202112030745.1B37j6m5009443@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 57c50ac3760e - main - x11-toolkits/gtk30: backport 2 patches for wayland List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57c50ac3760e5c07f08ae8bd808685a5ddee521f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638517506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g9z3fCS/1bIQhFJ5v9wJiQ2FEfvosbBtD0KlzaWAzU=; b=QQZtBAj0g+Txjk004OUizS8QzlpTRER3R2pNe/K+2ySHLVyO0gIRCCTL3QOU8G30c0vuX2 LwbObV0DWsOalCeSpCsRzYMWwjYaBmT81Dh8O0sqY5gcf9lnksPtan4njyxuckAB1vjJaz /Hoi3nDBVxGR5NRzvh8YfEL8/n9T6vf4r1UzbisDg5JfIDL8zQps9RSIWoJzDBDzU0+z+2 YPcaE0Tw15GgQb+VnJMvXZCuEduUMrEB3mu6QQkMq/1mhmkZtcjfNdhCT8zMGwKxHPMluH gIdmoJVJ0AotwOMtQ5CvwU7VF8slbZtq67yq2U4t5Al1xy+lFJz1ZokwMo/gpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638517506; a=rsa-sha256; cv=none; b=TLwT8uzGfa1qrrY9r/T2gil6O4vGXKjB94vXWva1NM2alUPPDy8w0IsHeAulDZQX/iWBIf lW67dYhCOeD55iGFV+B++HlL9pcd1nCx5JZFlsO2uvLOX0tWceurRxTgXx5LMHfrrLgYs7 W8fVgK+PqXcHQtkH0fJjCe/AXDOjKXIl8dSkN7Ou95d2Zws790DdCVQfIwd+X3rn7rmkZF ZOniEgSfqQNHpRR0313XJVMu5WiybGVNz1UzwoVMVsyVBYFqncQ1nA+iPHYT/LJ346fD0P FzLHTyO74+LBEgt/iD8VmY+YHYWqROCVVO2bToKCDIKzGR7krBC1CrD5Sl5Ygg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=57c50ac3760e5c07f08ae8bd808685a5ddee521f commit 57c50ac3760e5c07f08ae8bd808685a5ddee521f Author: Baptiste Daroussin AuthorDate: 2021-12-03 07:42:23 +0000 Commit: Baptiste Daroussin CommitDate: 2021-12-03 07:45:02 +0000 x11-toolkits/gtk30: backport 2 patches for wayland Those 2 patches are fixing a bug shown by firefox under wayland: when running a wayland desktop with dual screen and different settings for the 2 screens, the combobox were not functionnal if firefox is on the second screen. --- x11-toolkits/gtk30/Makefile | 4 ++ ...k-if-size-changed-before-hiding-a-surface.patch | 59 ++++++++++++++++++++++ ...-Ignore-wl_output-globals-not-bound-by-us.patch | 34 +++++++++++++ 3 files changed, 97 insertions(+) diff --git a/x11-toolkits/gtk30/Makefile b/x11-toolkits/gtk30/Makefile index 8e3848ad6844..fa9d290eac86 100644 --- a/x11-toolkits/gtk30/Makefile +++ b/x11-toolkits/gtk30/Makefile @@ -4,6 +4,7 @@ PORTNAME= gtk PORTVERSION= 3.24.30 +PORTREVISION= 1 CATEGORIES= x11-toolkits MASTER_SITES= GNOME/sources/gtk+/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} PKGNAMESUFFIX= 3 @@ -13,6 +14,9 @@ DIST_SUBDIR= gnome MAINTAINER= desktop@FreeBSD.org COMMENT= Gimp Toolkit for X11 GUI (current stable version) +EXTRA_PATCHES= ${FILESDIR}/0001-Check-if-size-changed-before-hiding-a-surface.patch:-p1 \ + ${FILESDIR}/0001-Ignore-wl_output-globals-not-bound-by-us.patch:-p1 + LICENSE= LGPL20 PORTSCOUT= limit:1,even diff --git a/x11-toolkits/gtk30/files/0001-Check-if-size-changed-before-hiding-a-surface.patch b/x11-toolkits/gtk30/files/0001-Check-if-size-changed-before-hiding-a-surface.patch new file mode 100644 index 000000000000..578464e41f15 --- /dev/null +++ b/x11-toolkits/gtk30/files/0001-Check-if-size-changed-before-hiding-a-surface.patch @@ -0,0 +1,59 @@ +From 23c7e6e13bbe2c6b736e817f501dc0dd5b242787 Mon Sep 17 00:00:00 2001 +From: Ronan Pigott +Date: Mon, 13 Sep 2021 17:14:14 -0700 +Subject: [PATCH] Check if size changed before hiding a surface + +Commit 68188fc948 introduces a workaround for clients that try to +change the size of a popup after it is created, but inadvertently +introduces an infinite loop of surface creation when the popup enters +two or more wl_outputs with different scales on creation. + +This commit checks if the size actually changed before applying the +workaround and avoids the loop. +--- + gdk/wayland/gdkwindow-wayland.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c +index 1e82dcae3e..5d300a94ce 100644 +--- a/gdk/wayland/gdkwindow-wayland.c ++++ b/gdk/wayland/gdkwindow-wayland.c +@@ -1199,6 +1199,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window, + GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); + gboolean is_xdg_popup; + gboolean is_visible; ++ gboolean size_changed; + + impl->unconfigured_width = calculate_width_without_margin (window, width); + impl->unconfigured_height = calculate_height_without_margin (window, height); +@@ -1206,9 +1207,8 @@ gdk_wayland_window_maybe_configure (GdkWindow *window, + if (should_inhibit_resize (window)) + return; + +- if (window->width == width && +- window->height == height && +- impl->scale == scale) ++ size_changed = (window->width != width || window->height != height); ++ if (!size_changed && impl->scale == scale) + return; + + /* For xdg_popup using an xdg_positioner, there is a race condition if +@@ -1222,6 +1222,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window, + + if (is_xdg_popup && + is_visible && ++ size_changed && + !impl->initial_configure_received && + !impl->configuring_popup) + gdk_window_hide (window); +@@ -1230,6 +1231,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window, + + if (is_xdg_popup && + is_visible && ++ size_changed && + !impl->initial_configure_received && + !impl->configuring_popup) + gdk_window_show (window); +-- +2.33.1 + diff --git a/x11-toolkits/gtk30/files/0001-Ignore-wl_output-globals-not-bound-by-us.patch b/x11-toolkits/gtk30/files/0001-Ignore-wl_output-globals-not-bound-by-us.patch new file mode 100644 index 000000000000..1391d2e38458 --- /dev/null +++ b/x11-toolkits/gtk30/files/0001-Ignore-wl_output-globals-not-bound-by-us.patch @@ -0,0 +1,34 @@ +From 9a4e32892896ce1d0a92f413845f6f7f18f9b456 Mon Sep 17 00:00:00 2001 +From: Ronan Pigott +Date: Sat, 11 Sep 2021 17:22:12 -0700 +Subject: [PATCH] Ignore wl_output globals not bound by us + +Gdk doesn't know the scale of output globals it didn't bind. This +keeps them from entering the output list and triggering erroneous +changes in surface scales. +--- + gdk/wayland/gdkwindow-wayland.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c +index 2d7c42bd7a..1e82dcae3e 100644 +--- a/gdk/wayland/gdkwindow-wayland.c ++++ b/gdk/wayland/gdkwindow-wayland.c +@@ -1520,6 +1520,14 @@ surface_enter (void *data, + { + GdkWindow *window = GDK_WINDOW (data); + GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); ++ GdkWaylandDisplay *display_wayland = ++ GDK_WAYLAND_DISPLAY (gdk_window_get_display (window)); ++ gboolean output_is_unmanaged; ++ ++ output_is_unmanaged = ++ _gdk_wayland_screen_get_output_scale (display_wayland->screen, output) == 0; ++ if (output_is_unmanaged) ++ return; + + GDK_NOTE (EVENTS, + g_message ("surface enter, window %p output %p", window, output)); +-- +2.33.1 +