summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2017-05-30 06:11:25 +0900
committerQue Quotion2017-05-30 06:11:25 +0900
commitb839c35f27221eeab58555c7173fae59c63c179b (patch)
tree4ea35bbef87c8e9242a803405d9694cf485148f3
parent8b5b056f26a0d33a3f9aa19dd401bc47e33e9ccb (diff)
downloadaur-b839c35f27221eeab58555c7173fae59c63c179b.tar.gz
New autohide patch; still disabled by default
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD8
-rw-r--r--autohide-evbox.patch104
-rw-r--r--autohide.patch46
4 files changed, 112 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc8b876165b2..0e624f01bc1b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu May 25 10:17:04 UTC 2017
+# Mon May 29 21:10:31 UTC 2017
pkgbase = wingpanel-standalone-git
pkgdesc = Stylish top panel that holds indicators and spawns an application launcher (without Gala dependencies)
pkgver = r286.89956c5
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/elementary/wingpanel
arch = i686
arch = x86_64
@@ -46,13 +46,13 @@ pkgbase = wingpanel-standalone-git
source = minus-galaplugin.patch
source = minus-gala-cmake.patch
source = y-is-broken-cogl.patch
- source = autohide.patch
+ source = autohide-evbox.patch
sha256sums = SKIP
sha256sums = 0fd440cdb4b9871c5ee8812866b365e4a45b29813800345556db74429bacca3e
sha256sums = 1f50f34a7d36fc8331c1080c42c38f8208e35f4551eed97705919d304d410c95
sha256sums = 910130e7033db8874ed8d5e1734c6eb0ce75eed7ddf2620400c2a129cf05755d
sha256sums = df03ebb7fe08da77d51e6b96ab033b5c712530727d9fa2dd61420d2c7923fced
- sha256sums = 2705bd49c38debd20ad2759fa880238661530abdd8962a5373d0b431cd7cf084
+ sha256sums = c5cf804716585e1189e3bcf47a3387c2a3708d39aabfa89681de783da31eaade
pkgname = wingpanel-standalone-git
diff --git a/PKGBUILD b/PKGBUILD
index 2ce41c713f99..76edc774f607 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=wingpanel-standalone-git
pkgver=r286.89956c5
-pkgrel=2
+pkgrel=3
pkgdesc='Stylish top panel that holds indicators and spawns an application launcher (without Gala dependencies)'
arch=('i686' 'x86_64')
url='https://github.com/elementary/wingpanel'
@@ -26,13 +26,13 @@ source=('git+https://github.com/elementary/wingpanel.git'
'minus-galaplugin.patch'
'minus-gala-cmake.patch'
'y-is-broken-cogl.patch'
- 'autohide.patch')
+ 'autohide-evbox.patch')
sha256sums=('SKIP'
'0fd440cdb4b9871c5ee8812866b365e4a45b29813800345556db74429bacca3e'
'1f50f34a7d36fc8331c1080c42c38f8208e35f4551eed97705919d304d410c95'
'910130e7033db8874ed8d5e1734c6eb0ce75eed7ddf2620400c2a129cf05755d'
'df03ebb7fe08da77d51e6b96ab033b5c712530727d9fa2dd61420d2c7923fced'
- '2705bd49c38debd20ad2759fa880238661530abdd8962a5373d0b431cd7cf084')
+ 'c5cf804716585e1189e3bcf47a3387c2a3708d39aabfa89681de783da31eaade')
pkgver() {
cd wingpanel
@@ -58,7 +58,7 @@ prepare() {
#autohide
#msg2 "autohide"
- #patch -Np2 < ../autohide.patch
+ #patch -Np2 < ../autohide-evbox.patch
#Cogl can't be found, although it is installed. Arch-specific? .so bump?
msg2 "minus cgl"
diff --git a/autohide-evbox.patch b/autohide-evbox.patch
new file mode 100644
index 000000000000..ba88ea40bbca
--- /dev/null
+++ b/autohide-evbox.patch
@@ -0,0 +1,104 @@
+--- 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 @@
+
+ private Widgets.Panel panel;
+
++ private Gtk.EventBox box;
++
+ private int monitor_number;
+
+ private int monitor_width;
+@@ -62,10 +64,17 @@
+
+ popover_manager = new Services.PopoverManager (this);
+
++ box = new Gtk.EventBox();
++ box.add_events (Gdk.EventMask.ENTER_NOTIFY_MASK | Gdk.EventMask.LEAVE_NOTIFY_MASK);
++
+ panel = new Widgets.Panel (popover_manager);
+ panel.realize.connect (on_realize);
+
+- this.add (panel);
++ box.add(panel);
++ box.enter_notify_event.connect (reactivate);
++ box.leave_notify_event.connect (on_idle);
++
++ this.add (box);
+ }
+
+ private bool animation_step () {
+@@ -75,7 +84,19 @@
+
+ panel_displacement--;
+
+- update_panel_dimensions ();
++ animate_panel ();
++
++ return true;
++ }
++
++ private bool animation_unstep () {
++ if (panel_displacement >= -1) {
++ return false;
++ }
++
++ panel_displacement++;
++
++ animate_panel ();
+
+ return true;
+ }
+@@ -85,7 +106,26 @@
+
+ //Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
+
+- Timeout.add (300 / panel_height, animation_step);
++ Timeout.add (100 / panel_height, animation_step);
++ Timeout.add (100 / panel_height, animation_unstep);
++ }
++
++ private bool on_idle () {
++ animate_panel ();
++
++ //Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
++
++ Timeout.add (100 / panel_height, animation_unstep);
++
++ return true;
++ }
++
++ private bool reactivate () {
++ animate_panel ();
++
++ Timeout.add (100 / panel_height, animation_step);
++
++ return true;
+ }
+
+ private void update_panel_dimensions () {
+@@ -108,6 +148,24 @@
+ update_struts ();
+ }
+
++ private void animate_panel () {
++ panel_height = panel.get_allocated_height ();
++
++ monitor_number = screen.get_primary_monitor ();
++ Gdk.Rectangle monitor_dimensions;
++ this.screen.get_monitor_geometry (monitor_number, out monitor_dimensions);
++
++ monitor_width = monitor_dimensions.width;
++ monitor_height = monitor_dimensions.height;
++
++ this.set_size_request (monitor_width, (popover_manager.current_indicator != null ? monitor_height : -1));
++
++ monitor_x = monitor_dimensions.x;
++ monitor_y = monitor_dimensions.y;
++
++ this.move (monitor_x, monitor_y - (panel_height + panel_displacement));
++ }
++
+ private void update_visual () {
+ var visual = this.screen.get_rgba_visual ();
+
diff --git a/autohide.patch b/autohide.patch
deleted file mode 100644
index 55b52d48e88d..000000000000
--- a/autohide.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- src/wingpanel/src/PanelWindow.vala 2017-05-14 21:30:04.493149180 +0900
-+++ src/wingpanel/src/PanelWindow.vala.new 2017-05-14 21:34:12.288040769 +0900
-@@ -65,7 +65,9 @@
- panel = new Widgets.Panel (popover_manager);
- panel.realize.connect (on_realize);
-
-+ panel.connect ("enter_notify_event", on_realize);
-+ panel.connect ("leave_notify_event", on_idle);
- this.add (panel);
-
- this.set_size_request (monitor_width, -1);
- this.resize (monitor_width, 1);
-@@ -83,12 +84,32 @@
- return true;
- }
-
-+ private bool animation_unstep () {
-+ if (panel_displacement == -1) {
-+ return false;
-+ }
-+
-+ panel_displacement++;
-+
-+ update_panel_dimensions ();
-+
-+ return true;
-+ }
-+
- private void on_realize () {
- update_panel_dimensions ();
-
- //Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
-
-- Timeout.add (300 / panel_height, animation_step);
-+ Timeout.add (250 / panel_height, animation_step);
-+ }
-+
-+ private void on_idle () {
-+ update_panel_dimensions ();
-+
-+ //Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
-+
-+ Timeout.add (250 / panel_height, animation_unstep);
- }
-
- private void update_panel_dimensions () {