From 136e62ba1f0f6c37af0d089a04b2b8a2f8f647b9 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Wed, 26 Aug 2026 09:15:12 -0400 Subject: [PATCH] import CS git gtk3-3.24.31-9.el9_8 --- ...ch-behavior-of-BTN_STYLUS-STYLUS2-as.patch | 38 +++++++++++++++++++ SPECS/gtk3.spec | 7 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-gdk-wayland-Switch-behavior-of-BTN_STYLUS-STYLUS2-as.patch diff --git a/SOURCES/0001-gdk-wayland-Switch-behavior-of-BTN_STYLUS-STYLUS2-as.patch b/SOURCES/0001-gdk-wayland-Switch-behavior-of-BTN_STYLUS-STYLUS2-as.patch new file mode 100644 index 0000000..23481a6 --- /dev/null +++ b/SOURCES/0001-gdk-wayland-Switch-behavior-of-BTN_STYLUS-STYLUS2-as.patch @@ -0,0 +1,38 @@ +From e205bdaa89342bb1d47527be0cdfbc1bfb0f5f59 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Wed, 5 Jul 2023 16:24:03 +0200 +Subject: [PATCH] gdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as + middle/right click + +This mapping of stylus evdev input event codes into GDK button numbers +makes gdk/wayland inconsistent with gdk/x11, so depending on the backend +the same button middle-click pastes or right-click pops up menus. + +Make the wayland backend consistent with X11, so that a GNOME wayland +session gets these buttons consistently mapped across all kinds of +clients. + +(cherry-picked from commit e28ff79bec53ecd56885390ba4a66019cde598c6) +--- + gdk/wayland/gdkdevice-wayland.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c +index a1e4771a74..38c2e61efa 100644 +--- a/gdk/wayland/gdkdevice-wayland.c ++++ b/gdk/wayland/gdkdevice-wayland.c +@@ -3963,9 +3963,9 @@ tablet_tool_handle_button (void *data, + tablet->pointer_info.press_serial = serial; + + if (button == BTN_STYLUS) +- n_button = GDK_BUTTON_SECONDARY; +- else if (button == BTN_STYLUS2) + n_button = GDK_BUTTON_MIDDLE; ++ else if (button == BTN_STYLUS2) ++ n_button = GDK_BUTTON_SECONDARY; + else if (button == BTN_STYLUS3) + n_button = 8; /* Back */ + else +-- +2.53.0 + diff --git a/SPECS/gtk3.spec b/SPECS/gtk3.spec index f1b653f..feac19c 100644 --- a/SPECS/gtk3.spec +++ b/SPECS/gtk3.spec @@ -19,7 +19,7 @@ Name: gtk3 Version: 3.24.31 -Release: 8%{?dist} +Release: 9%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -47,6 +47,7 @@ Patch7: remove-size-allocation-critical.patch Patch8: 0001-Differentiate-keypad-keysyms-in-accelerators.patch Patch9: 0002-accellabel-Differentiate-keypad-better.patch Patch10: 0003-shortcutwindow-Differentiate-keypad-better.patch +Patch11: 0001-gdk-wayland-Switch-behavior-of-BTN_STYLUS-STYLUS2-as.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -314,6 +315,10 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests/ %changelog +* Mon Apr 20 2026 Carlos Garnacho - 3.24.31-9 +- Switch stylus button order to match compositor + Resolves: RHEL-146566 + * Tue Jul 2 2025 Matthias Clasen - 3.24.31-8 - Resolves: RHEL-4098