void-packages/srcpkgs/drawterm/patches/gui_x11_thirdbutton.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

17 lines
348 B
Diff

--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -1004,8 +1004,12 @@ xmouse(XEvent *e)
ms.buttons |= 1;
if(s & Button2Mask)
ms.buttons |= 2;
- if(s & Button3Mask)
- ms.buttons |= 4;
+ if(s & Button3Mask){
+ if (s & ShiftMask)
+ ms.buttons |= 2;
+ else
+ ms.buttons |= 4;
+ }
if(s & Button4Mask)
ms.buttons |= 8;
if(s & Button5Mask)