summarylogtreecommitdiffstats
path: root/autohide-evbox.patch
diff options
context:
space:
mode:
authorQue Quotion2017-06-01 01:26:19 +0900
committerQue Quotion2017-06-01 01:26:19 +0900
commitb099aaecd33abf81db21456271e5a7137cdd05be (patch)
treefd6c30f822bc362923d28054f4f9248a6a873fa4 /autohide-evbox.patch
parentfef272949a939d16eb64d7b69e203d22148dde7d (diff)
downloadaur-b099aaecd33abf81db21456271e5a7137cdd05be.tar.gz
kill timers to fix infinite loops!
Diffstat (limited to 'autohide-evbox.patch')
-rw-r--r--autohide-evbox.patch18
1 files changed, 12 insertions, 6 deletions
diff --git a/autohide-evbox.patch b/autohide-evbox.patch
index 7a862a20a4a..1f0c35fb6e4 100644
--- a/autohide-evbox.patch
+++ b/autohide-evbox.patch
@@ -1,11 +1,13 @@
--- src/wingpanel/src/PanelWindow.vala.old 2017-05-30 05:11:04.862053641 +0900
+++ src/wingpanel/src/PanelWindow.vala 2017-05-30 05:15:50.025099860 +0900
-@@ -22,6 +22,8 @@
+@@ -22,6 +22,10 @@
private Widgets.Panel panel;
+ private Gtk.EventBox box;
+
++ uint timeout;
++
private int monitor_number;
private int monitor_width;
@@ -49,7 +51,7 @@
return true;
}
-@@ -85,7 +106,23 @@
+@@ -85,7 +106,27 @@
//Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
@@ -58,17 +60,21 @@
+ }
+
+ private bool on_idle () {
-+ animate_panel ();
++ if (timeout > 0) {
++ Source.remove (timeout);
++ }
+
-+ Timeout.add (100 / panel_height, animation_unstep);
++ timeout = Timeout.add (100 / panel_height, animation_unstep);
+
+ return true;
+ }
+
+ private bool reactivate () {
-+ animate_panel ();
++ if (timeout > 0) {
++ Source.remove (timeout);
++ }
+
-+ Timeout.add (100 / panel_height, animation_step);
++ timeout = Timeout.add (100 / panel_height, animation_step);
+
+ return true;
}