commit:     b42458700185e08cbef73c0ba2aef0ae649aae74
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 23 19:13:09 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 19:13:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4245870

x11-wm/icewm: Revbump to fix application menu issue

See https://github.com/bbidulock/icewm/issues/527

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 x11-wm/icewm/files/icewm-2.1.0-appmenu_fix.patch   | 37 ++++++++++++++++++++++
 .../{icewm-2.1.0.ebuild => icewm-2.1.0-r1.ebuild}  |  4 +++
 2 files changed, 41 insertions(+)

diff --git a/x11-wm/icewm/files/icewm-2.1.0-appmenu_fix.patch 
b/x11-wm/icewm/files/icewm-2.1.0-appmenu_fix.patch
new file mode 100644
index 00000000000..d159e4d38e3
--- /dev/null
+++ b/x11-wm/icewm/files/icewm-2.1.0-appmenu_fix.patch
@@ -0,0 +1,37 @@
+From 1d28361a69d773ba0d026119ff197d38900eac0a Mon Sep 17 00:00:00 2001
+From: Bert Gijsbers <gijsb...@science.uva.nl>
+Date: Sat, 23 Jan 2021 16:02:21 +0100
+Subject: [PATCH] Don't unarm menu popup buttons for issue #527.
+
+---
+ src/ybutton.cc | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/ybutton.cc b/src/ybutton.cc
+index 1c11756d..745a8f21 100644
+--- a/src/ybutton.cc
++++ b/src/ybutton.cc
+@@ -58,7 +58,7 @@ YButton::~YButton() {
+     }
+     popdown();
+     if (fPopup && fPopup->isShared() == false) {
+-        delete fPopup;
++        delete fPopup; fPopup = nullptr;
+     }
+     if (--buttonObjectCount == 0) {
+         normalButtonFont = null;
+@@ -289,8 +289,13 @@ void YButton::handleButton(const XButtonEvent &button) {
+             setSelected(false);
+         }
+     }
++    bool unarm = fEnabled && fArmed
++              && button.type == ButtonRelease
++              && button.button == Button1
++              && getClickCount() == 1
++              && dragging();
+     YWindow::handleButton(button);
+-    if (fEnabled && button.type == ButtonRelease && button.button == Button1) 
{
++    if (unarm && !fPopupActive) {
+         setArmed(false, false);
+     }
+ }

diff --git a/x11-wm/icewm/icewm-2.1.0.ebuild 
b/x11-wm/icewm/icewm-2.1.0-r1.ebuild
similarity index 98%
rename from x11-wm/icewm/icewm-2.1.0.ebuild
rename to x11-wm/icewm/icewm-2.1.0-r1.ebuild
index ec1d0545c00..57f469f48b7 100644
--- a/x11-wm/icewm/icewm-2.1.0.ebuild
+++ b/x11-wm/icewm/icewm-2.1.0-r1.ebuild
@@ -81,6 +81,10 @@ BDEPEND="
        nls? ( >=sys-devel/gettext-0.19.8 )
 "
 
+PATCHES=(
+       "${FILESDIR}/${P}-appmenu_fix.patch"
+)
+
 pkg_pretend() {
        if use gdk-pixbuf && use imlib ; then
                einfo 'Confilcting USE flags have been enabled:'

Reply via email to