Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xarchiver: fix double-clicking regression
@ 2022-08-06  3:32 classabbyamp
  2022-08-07 22:41 ` [PR PATCH] [Merged]: " classabbyamp
  0 siblings, 1 reply; 2+ messages in thread
From: classabbyamp @ 2022-08-06  3:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages fix/xarchiver
https://github.com/void-linux/void-packages/pull/38495

xarchiver: fix double-clicking regression
fixes #38487

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (built the package)

@TeusLollo, can you [test this](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#testing-pull-requests)?


A patch file from https://github.com/void-linux/void-packages/pull/38495.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/xarchiver-38495.patch --]
[-- Type: text/x-diff, Size: 3684 bytes --]

From b36d4bd2980a72561e43fb2b0951def1488ea8d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 5 Aug 2022 23:31:08 -0400
Subject: [PATCH] xarchiver: fix double-clicking regression

fixes #38487
---
 srcpkgs/xarchiver/patches/doubleclick.patch | 75 +++++++++++++++++++++
 srcpkgs/xarchiver/template                  |  2 +-
 2 files changed, 76 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xarchiver/patches/doubleclick.patch

diff --git a/srcpkgs/xarchiver/patches/doubleclick.patch b/srcpkgs/xarchiver/patches/doubleclick.patch
new file mode 100644
index 000000000000..aaac2c6b16e0
--- /dev/null
+++ b/srcpkgs/xarchiver/patches/doubleclick.patch
@@ -0,0 +1,75 @@
+From f245d8714690af30064a2e5ec94bd2374288c2b9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
+Date: Sat, 2 Jul 2022 23:47:36 +0200
+Subject: [PATCH 1/2] Simplify code
+
+The state of the modifier keys is available in event->state.
+---
+ src/window.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/window.c b/src/window.c
+index 1ec0e02c..e9760386 100644
+--- a/src/window.c
++++ b/src/window.c
+@@ -2620,11 +2620,7 @@ gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *even
+ 
+ 		if (event->button == 1)
+ 		{
+-			GdkModifierType state;
+-
+-			gdk_event_get_state((GdkEvent *) event, &state);
+-
+-			if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
++			if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
+ 				return TRUE;
+ 			else
+ 				return FALSE;
+
+From 5d18fd23e8242678dbe47c232bc60b47f8fd75b0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
+Date: Sat, 2 Jul 2022 23:51:40 +0200
+Subject: [PATCH 2/2] Re-enable left mouse button double clicks
+
+Check the time between two left mouse button clicks and if they are
+fast enough, fake a double-click event.
+
+Left mouse button double clicks have been unintentionally disabled by
+the change in commit e81d108c429e29b13ef1759c05033a6f3c645ac1 in order
+to allow dragging of multiple rows.
+
+This fixes github issue #148, reported by aianson.
+---
+ src/window.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/window.c b/src/window.c
+index e9760386..b9591aed 100644
+--- a/src/window.c
++++ b/src/window.c
+@@ -2597,6 +2597,7 @@ void xa_location_entry_activated (GtkEntry *entry,gpointer user_data)
+ 
+ gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *event, XArchive *archive)
+ {
++	static guint32 last_button1;
+ 	XEntry *entry;
+ 	GtkTreePath *path;
+ 	GtkTreeIter iter;
+@@ -2620,10 +2621,17 @@ gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *even
+ 
+ 		if (event->button == 1)
+ 		{
++			if (event->time - last_button1 > 250)
++			{
++				last_button1 = event->time;
++
+ 			if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
+ 				return TRUE;
+ 			else
+ 				return FALSE;
++			}
++			else
++				event->button = 2;
+ 		}
+ 
+ 		if (!gtk_tree_selection_iter_is_selected(selection, &iter))
diff --git a/srcpkgs/xarchiver/template b/srcpkgs/xarchiver/template
index 56c781bea0dd..c0403f69ac47 100644
--- a/srcpkgs/xarchiver/template
+++ b/srcpkgs/xarchiver/template
@@ -1,7 +1,7 @@
 # Template file for 'xarchiver'
 pkgname=xarchiver
 version=0.5.4.18
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--disable-doc --enable-gtk2=no"
 hostmakedepends="pkg-config intltool"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: xarchiver: fix double-clicking regression
  2022-08-06  3:32 [PR PATCH] xarchiver: fix double-clicking regression classabbyamp
@ 2022-08-07 22:41 ` classabbyamp
  0 siblings, 0 replies; 2+ messages in thread
From: classabbyamp @ 2022-08-07 22:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

There's a merged pull request on the void-packages repository

xarchiver: fix double-clicking regression
https://github.com/void-linux/void-packages/pull/38495

Description:
fixes #38487

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (built the package)

@TeusLollo, can you [test this](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#testing-pull-requests)?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-07 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06  3:32 [PR PATCH] xarchiver: fix double-clicking regression classabbyamp
2022-08-07 22:41 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).