[wiki] [sites] [surf][patch][middleclickplumb] fixed patch || 0x1bi

From: <git_AT_suckless.org>
Date: Sat, 15 Aug 2020 18:07:30 +0200

commit 0a818c4e95b61624477bd74febd3c11c90117b9b
Author: 0x1bi <ben_AT_0x1bi.net>
Date: Sat Aug 15 12:07:26 2020 -0400

    [surf][patch][middleclickplumb] fixed patch

diff --git a/surf.suckless.org/patches/middle-click-plumb/index.md b/surf.suckless.org/patches/middle-click-plumb/index.md
index 281bbb01..965eb750 100644
--- a/surf.suckless.org/patches/middle-click-plumb/index.md
+++ b/surf.suckless.org/patches/middle-click-plumb/index.md
_AT_@ -9,7 +9,7 @@ Middle click link or text selection to send it to plumber.
 Download
 --------
 
- * [surf-middleclickplumb-20200815-23cefcc.diff](surf-middleclickplumb-20200815-23cefcc.diff)
+ * [surf-middleclickplumb-20200815-f675414.diff](surf-middleclickplumb-20200815-f675414.diff)
 
 Author
 ------
diff --git a/surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-23cefcc.diff b/surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-f675414.diff
similarity index 82%
rename from surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-23cefcc.diff
rename to surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-f675414.diff
index 2152233b..0c447a77 100644
--- a/surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-23cefcc.diff
+++ b/surf.suckless.org/patches/middle-click-plumb/surf-middleclickplumb-20200815-f675414.diff
_AT_@ -1,7 +1,7 @@
-From 23cefcc76ac69c5648be54c294ea14d5b09a9028 Mon Sep 17 00:00:00 2001
+From f675414e350d9c4face743a1bfc4af8a2cd445cd Mon Sep 17 00:00:00 2001
 From: 0x1bi <ben_AT_0x1bi.net>
-Date: Sat, 15 Aug 2020 11:20:13 -0400
-Subject: [PATCH] added middle click to plumb functionality
+Date: Sat, 15 Aug 2020 12:05:11 -0400
+Subject: [PATCH] fix for middle click to plumb
 
 ---
  config.def.h | 2 +-
_AT_@ -22,7 +22,7 @@ index 34265f6..01d040a 100644
          { OnLink, MODKEY, 1, clicknewwindow, { .i = 1 }, 1 },
          { OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
 diff --git a/surf.c b/surf.c
-index 2b54e3c..0a4a601 100644
+index 2b54e3c..46e6934 100644
 --- a/surf.c
 +++ b/surf.c
 _AT_@ -236,6 +236,7 @@ static void find(Client *c, const Arg *a);
_AT_@ -44,10 +44,10 @@ index 2b54e3c..0a4a601 100644
 +
 + char *s;
 + WebKitHitTestResultContext e = webkit_hit_test_result_get_context(h);
-+ if (e == 2)
-+ return;
-+ s = e == 6 ? s = webkit_hit_test_result_get_link_uri(h) : gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY));
-+
++ if (OnSel & e)
++ s = gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY));
++ else if ((OnLink|OnMedia|OnImg) & e)
++ s = webkit_hit_test_result_get_link_uri(h);
 + arg = (Arg)PLUMB(s);
 + spawn(c, &arg);
 +}
Received on Sat Aug 15 2020 - 18:07:30 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 15 2020 - 18:12:45 CEST