1 |
jer 14/06/04 17:37:08 |
2 |
|
3 |
Added: easystroke-0.6.0-reinstate-signal-handlers.patch |
4 |
easystroke-0.6.0-buttons-scroll-send.patch |
5 |
Log: |
6 |
Add upstream patches for bug #512428 by Small Penguin. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A792A613) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 x11-misc/easystroke/files/easystroke-0.6.0-reinstate-signal-handlers.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/easystroke/files/easystroke-0.6.0-reinstate-signal-handlers.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/easystroke/files/easystroke-0.6.0-reinstate-signal-handlers.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: easystroke-0.6.0-reinstate-signal-handlers.patch |
17 |
=================================================================== |
18 |
From 7bda4bd9c705413598ee9b534884bc7f23704932 Mon Sep 17 00:00:00 2001 |
19 |
From: Thomas Jaeger <ThJaeger@×××××.com> |
20 |
Date: Thu, 20 Jun 2013 01:45:20 -0400 |
21 |
Subject: Reinstate signal handlers that got lost in the gtk3 transition |
22 |
|
23 |
Also, fix a segfault when handling SIGINT. |
24 |
--- |
25 |
main.cc | 11 ++++++++++- |
26 |
1 file changed, 10 insertions(+), 1 deletion(-) |
27 |
|
28 |
diff --git a/main.cc b/main.cc |
29 |
index 55d0b3c..8cd9c56 100644 |
30 |
--- a/main.cc |
31 |
+++ b/main.cc |
32 |
@@ -161,7 +161,12 @@ void quit() { |
33 |
xstate->bail_out(); |
34 |
dead = true; |
35 |
win->hide(); |
36 |
- xstate->queue(sigc::ptr_fun(&Gtk::Main::quit)); |
37 |
+ Glib::RefPtr<Gio::Application> app = Gio::Application::get_default(); |
38 |
+ xstate->queue(sigc::mem_fun(*app.operator->(), &Gio::Application::quit)); |
39 |
+} |
40 |
+ |
41 |
+void sig_int(int) { |
42 |
+ quit(); |
43 |
} |
44 |
|
45 |
class App : public Gtk::Application, Base { |
46 |
@@ -371,6 +376,10 @@ void App::on_activate() { |
47 |
|
48 |
create_config_dir(); |
49 |
unsetenv("DESKTOP_AUTOSTART_ID"); |
50 |
+ |
51 |
+ signal(SIGINT, &sig_int); |
52 |
+ signal(SIGCHLD, SIG_IGN); |
53 |
+ |
54 |
dpy = XOpenDisplay(NULL); |
55 |
if (!dpy) { |
56 |
printf(_("Couldn't open display.\n")); |
57 |
-- |
58 |
1.8.4 |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
1.1 x11-misc/easystroke/files/easystroke-0.6.0-buttons-scroll-send.patch |
64 |
|
65 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/easystroke/files/easystroke-0.6.0-buttons-scroll-send.patch?rev=1.1&view=markup |
66 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/easystroke/files/easystroke-0.6.0-buttons-scroll-send.patch?rev=1.1&content-type=text/plain |
67 |
|
68 |
Index: easystroke-0.6.0-buttons-scroll-send.patch |
69 |
=================================================================== |
70 |
From 5388934e722308cd314d65e362ddfaf6e5ab6c94 Mon Sep 17 00:00:00 2001 |
71 |
From: Thomas Jaeger <ThJaeger@×××××.com> |
72 |
Date: Sat, 13 Apr 2013 14:10:35 -0400 |
73 |
Subject: Make buttons and scroll work properly with 'send' |
74 |
|
75 |
--- |
76 |
handler.cc | 6 ++++-- |
77 |
1 file changed, 4 insertions(+), 2 deletions(-) |
78 |
|
79 |
diff --git a/handler.cc b/handler.cc |
80 |
index f47aae3..c1bd279 100644 |
81 |
--- a/handler.cc |
82 |
+++ b/handler.cc |
83 |
@@ -545,7 +545,7 @@ class AbstractScrollHandler : public Handler { |
84 |
|
85 |
protected: |
86 |
AbstractScrollHandler() : last_t(0), offset_x(0.0), offset_y(0.0) { |
87 |
- if (!prefs.move_back.get() || xstate->current_dev->absolute) |
88 |
+ if (!prefs.move_back.get() || (xstate->current_dev && xstate->current_dev->absolute)) |
89 |
return; |
90 |
Window dummy1, dummy2; |
91 |
int dummy3, dummy4; |
92 |
@@ -563,7 +563,7 @@ protected: |
93 |
} |
94 |
protected: |
95 |
void move_back() { |
96 |
- if (!prefs.move_back.get() || xstate->current_dev->absolute) |
97 |
+ if (!prefs.move_back.get() || (xstate->current_dev && xstate->current_dev->absolute)) |
98 |
return; |
99 |
XTestFakeMotionEvent(dpy, DefaultScreen(dpy), orig_x, orig_y, 0); |
100 |
} |
101 |
@@ -1115,6 +1115,8 @@ XState::XState() : current_dev(NULL), in_proximity(false), accepted(true) { |
102 |
|
103 |
void XState::run_action(RAction act) { |
104 |
RModifiers mods = act->prepare(); |
105 |
+ IF_BUTTON(act, b) |
106 |
+ return handler->replace_child(new ButtonHandler(mods, b)); |
107 |
if (IS_IGNORE(act)) |
108 |
return handler->replace_child(new IgnoreHandler(mods)); |
109 |
if (IS_SCROLL(act)) |
110 |
-- |
111 |
1.8.4 |