summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2018-03-04 01:59:35 +0900
committerQue Quotion2018-03-04 01:59:35 +0900
commit8baeb79f66ecaec4f85826931560d1fe29507c76 (patch)
tree931253da2b874016d3fa451e8d6810e56b66d48c
parentc429e856e257fffc5bab84f58eabced0d58b1c3c (diff)
downloadaur-8baeb79f66ecaec4f85826931560d1fe29507c76.tar.gz
Add a gsetting for autohide, default off
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD8
-rw-r--r--autohide-evbox.patch45
-rw-r--r--minus-backgroundmanager.patch29
-rw-r--r--minus-galaplugin.patch39
5 files changed, 90 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c890ced2ca..88656d2e1bf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Wed Oct 18 18:16:05 UTC 2017
pkgbase = wingpanel-standalone-git
pkgdesc = Stylish top panel that holds indicators and spawns an application launcher (without Gala dependencies)
- pkgver = r322.ba79059
+ pkgver = r345.ec08fc6
pkgrel = 1
url = https://github.com/elementary/wingpanel
arch = i686
@@ -49,11 +47,11 @@ pkgbase = wingpanel-standalone-git
source = y-is-broken-cogl.patch
source = autohide-evbox.patch
sha256sums = SKIP
- sha256sums = 92220350b702dcfa0586ff5400909c89173f75feb50847b7176bf5f9714a8a1b
- sha256sums = cea553913c2f44ad73886642f01abd2b21bbccb19d8dc2eb271d89a39cb20dc7
+ sha256sums = bb9aa2a62256dc45633a7ee9fd9e0f3536f5dbce01e13ed138a8e7cb5a1da83a
+ sha256sums = 49e077acacfec80696a3ec29f13ed1e3c7cdcae54b53a419f5e9bc853c4684e3
sha256sums = 47934e9aff119cedcfe7d184078ad60d3d715e07f1ca7cb1715e50b2e0c517e8
sha256sums = b1902c1d44ac546df63cd0224a7d2ef2cb6394ca556512c30c370d387db7bbab
- sha256sums = da1b562caefc8e12c537e39bcedf713ad8ff68dc5fcf41a9c9c5fb574c5bfbec
+ sha256sums = 9e436ff3da488ed2ce9b74a3714d2766a19f27e54d48694d126d3d1db572c06d
pkgname = wingpanel-standalone-git
diff --git a/PKGBUILD b/PKGBUILD
index d0504079924..cdd02cf94be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
pkgname=wingpanel-standalone-git
-pkgver=r322.ba79059
+pkgver=r345.ec08fc6
pkgrel=1
pkgdesc='Stylish top panel that holds indicators and spawns an application launcher (without Gala dependencies)'
arch=('i686' 'x86_64')
@@ -29,11 +29,11 @@ source=('git+https://github.com/elementary/wingpanel.git'
'y-is-broken-cogl.patch'
'autohide-evbox.patch')
sha256sums=('SKIP'
- '92220350b702dcfa0586ff5400909c89173f75feb50847b7176bf5f9714a8a1b'
- 'cea553913c2f44ad73886642f01abd2b21bbccb19d8dc2eb271d89a39cb20dc7'
+ 'bb9aa2a62256dc45633a7ee9fd9e0f3536f5dbce01e13ed138a8e7cb5a1da83a'
+ '49e077acacfec80696a3ec29f13ed1e3c7cdcae54b53a419f5e9bc853c4684e3'
'47934e9aff119cedcfe7d184078ad60d3d715e07f1ca7cb1715e50b2e0c517e8'
'b1902c1d44ac546df63cd0224a7d2ef2cb6394ca556512c30c370d387db7bbab'
- 'da1b562caefc8e12c537e39bcedf713ad8ff68dc5fcf41a9c9c5fb574c5bfbec')
+ '9e436ff3da488ed2ce9b74a3714d2766a19f27e54d48694d126d3d1db572c06d')
pkgver() {
cd wingpanel
diff --git a/autohide-evbox.patch b/autohide-evbox.patch
index 33ad8bfca86..e412cba6c64 100644
--- a/autohide-evbox.patch
+++ b/autohide-evbox.patch
@@ -1,3 +1,27 @@
+--- src/wingpanel/schemas/org.pantheon.desktop.wingpanel.gschema.xml 2017-12-26 14:53:03.354809958 +0900
++++ src/wingpanel/schemas/org.pantheon.desktop.wingpanel.gschema.xml.new 2018-01-21 23:41:18.703206040 +0900
+@@ -6,5 +6,10 @@
+ <summary>Sets if the panel uses transparency.</summary>
+ <description>Disable this to provide higher contrasts and make indicators better readable.</description>
+ </key>
++ <key type="b" name="autohide">
++ <default>false</default>
++ <summary>Sets if the panel will autohide.</summary>
++ <description>Enable this to increase available desktop area and reduce clutter.</description>
++ </key>
+ </schema>
+ </schemalist>
+--- src/wingpanel/src/Services/Settings.vala 2017-12-26 14:53:03.354809958 +0900
++++ src/wingpanel/src/Services/Settings.vala.new 2018-01-21 23:46:25.919860486 +0900
+@@ -23,6 +23,8 @@
+
+ public bool use_transparency { get; set; }
+
++ public bool autohide { get; set; }
++
+ public PanelSettings () {
+ base ("org.pantheon.desktop.wingpanel");
+ }
--- src/wingpanel/src/PanelWindow.vala 2017-06-01 02:18:32.090889031 +0900
+++ src/wingpanel/src/PanelWindow.vala.patched 2017-06-01 02:11:40.814767918 +0900
@@ -22,4 +22,9 @@
@@ -10,6 +34,14 @@
+
private int monitor_number;
private int monitor_width;
+@@ -35,6 +35,7 @@
+ private bool expanded = false;
+ private int panel_displacement;
+ private uint shrink_timeout = 0;
++ private bool autohide = Services.PanelSettings.get_default ().autohide;
+
+ public PanelWindow (Gtk.Application application) {
+ Object (
@@ -61,6 +61,9 @@
update_visual ();
@@ -20,14 +52,16 @@
panel = new Widgets.Panel (popover_manager);
panel.realize.connect (on_realize);
-@@ -80,17 +83,35 @@
+@@ -80,17 +83,40 @@
application.add_accelerator ("<Control>Tab", "app.cycle", null);
application.add_accelerator ("<Control><Shift>Tab", "app.cycle-back", null);
- add (panel);
+ box.add(panel);
-+ box.enter_notify_event.connect (reactivate);
-+ box.leave_notify_event.connect (on_idle);
++ if (autohide == true) {
++ box.enter_notify_event.connect (reactivate);
++ box.leave_notify_event.connect (on_idle);
++ }
+
+ add (box);
}
@@ -39,8 +73,11 @@
}
panel_displacement--;
-
+
++ if (autohide == false) {
- update_panel_dimensions ();
++ update_panel_dimensions ();
++ }
+ animate_panel ();
+
+ return true;
diff --git a/minus-backgroundmanager.patch b/minus-backgroundmanager.patch
index 1275172ca0c..174d2b8feeb 100644
--- a/minus-backgroundmanager.patch
+++ b/minus-backgroundmanager.patch
@@ -54,9 +54,19 @@
- }
+ } */
}
---- src/wingpanel/src/Services/BackgroundManager.vala 2017-10-13 02:50:16.753650103 +0900
-+++ /dev/null 2017-10-13 01:49:26.502721048 +0900
-@@ -1,132 +0,0 @@
+--- src/wingpanel/src/CMakeLists.txt 2017-10-13 03:28:23.119421691 +0900
++++ src/wingpanel/src/CMakeLists.txt.new 2017-10-13 03:30:12.838158479 +0900
+@@ -10,7 +10,6 @@
+ Services/IndicatorSorter.vala
+ Services/PopoverManager.vala
+ Services/Settings.vala
+- Services/BackgroundManager.vala
+ )
+
+ vala_precompile (CLIENT_VALA_C ${CMAKE_PROJECT_NAME}
+--- src/wingpanel/src/Services/BackgroundManager.vala 2018-03-04 00:30:27.781440874 +0900
++++ /dev/null 2018-03-03 20:05:09.041298375 +0900
+@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
- *
@@ -81,7 +91,8 @@
- LIGHT,
- DARK,
- MAXIMIZED,
-- TRANSLUCENT
+- TRANSLUCENT_DARK,
+- TRANSLUCENT_LIGHT
- }
-
- [DBus (name = "org.pantheon.gala.WingpanelInterface")]
@@ -189,13 +200,3 @@
- }
- }
-}
---- src/wingpanel/src/CMakeLists.txt 2017-10-13 03:28:23.119421691 +0900
-+++ src/wingpanel/src/CMakeLists.txt.new 2017-10-13 03:30:12.838158479 +0900
-@@ -10,7 +10,6 @@
- Services/IndicatorSorter.vala
- Services/PopoverManager.vala
- Services/Settings.vala
-- Services/BackgroundManager.vala
- )
-
- vala_precompile (CLIENT_VALA_C ${CMAKE_PROJECT_NAME}
diff --git a/minus-galaplugin.patch b/minus-galaplugin.patch
index 9e2f9764944..561ec31c8bb 100644
--- a/minus-galaplugin.patch
+++ b/minus-galaplugin.patch
@@ -204,9 +204,9 @@
- return instance;
- }
-}
---- src/wingpanel/wingpanel-interface/BackgroundManager.vala 2017-10-13 03:00:24.840092343 +0900
-+++ /dev/null 2017-10-13 01:49:26.502721048 +0900
-@@ -1,187 +0,0 @@
+--- src/wingpanel/wingpanel-interface/BackgroundManager.vala 2018-03-04 00:34:31.570427741 +0900
++++ /dev/null 2018-03-03 20:05:09.041298375 +0900
+@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
- *
@@ -230,7 +230,8 @@
- LIGHT,
- DARK,
- MAXIMIZED,
-- TRANSLUCENT
+- TRANSLUCENT_DARK,
+- TRANSLUCENT_LIGHT
-}
-
-public class WingpanelInterface.BackgroundManager : Object {
@@ -378,15 +379,27 @@
- if (has_maximized_window) {
- new_state = BackgroundState.MAXIMIZED;
- } else if (bk_color_info == null) {
-- new_state = BackgroundState.TRANSLUCENT;
+- new_state = BackgroundState.TRANSLUCENT_LIGHT;
- } else {
- var luminance_std = Math.sqrt (bk_color_info.luminance_variance);
--
-- new_state = luminance_std > STD_THRESHOLD ||
+-
+- bool bg_is_busy = luminance_std > STD_THRESHOLD ||
- (bk_color_info.mean_luminance < LUMINANCE_THRESHOLD &&
-- bk_color_info.mean_luminance + 1.645 * luminance_std > LUMINANCE_THRESHOLD ) ||
-- bk_color_info.mean_acutance > ACUTANCE_THRESHOLD ? BackgroundState.TRANSLUCENT :
-- bk_color_info.mean_luminance > LUMINANCE_THRESHOLD ? BackgroundState.DARK : BackgroundState.LIGHT;
+- bk_color_info.mean_luminance + 1.645 * luminance_std > LUMINANCE_THRESHOLD ) ||
+- bk_color_info.mean_acutance > ACUTANCE_THRESHOLD;
+-
+- bool bg_is_dark = bk_color_info.mean_luminance > LUMINANCE_THRESHOLD;
+- bool bg_is_busy_dark = bk_color_info.mean_luminance * 1.25 > LUMINANCE_THRESHOLD;
+-
+- if (bg_is_busy && bg_is_busy_dark) {
+- new_state = BackgroundState.TRANSLUCENT_DARK;
+- } else if (bg_is_busy) {
+- new_state = BackgroundState.TRANSLUCENT_LIGHT;
+- } else if (bg_is_dark) {
+- new_state = BackgroundState.DARK;
+- } else {
+- new_state = BackgroundState.LIGHT;
+- }
- }
-
- if (new_state != current_state) {
@@ -639,8 +652,8 @@
- }
-
-}
---- src/wingpanel/wingpanel-interface/CMakeLists.txt 2017-10-13 03:17:01.659234024 +0900
-+++ /dev/null 2017-10-13 01:49:26.502721048 +0900
+--- src/wingpanel/wingpanel-interface/CMakeLists.txt 2018-03-04 00:44:38.725395035 +0900
++++ /dev/null 2018-03-03 20:05:09.041298375 +0900
@@ -1,80 +0,0 @@
-find_package (PkgConfig)
-
@@ -707,7 +720,7 @@
-)
-
-add_library (${WINGPANELINTERFACE} MODULE ${VALA_C})
--target_link_libraries(${WINGPANELINTERFACE} ${PLUGIN_LIBRARIES} ${PLUGIN_MUTTER_LIBRARIES})
+-target_link_libraries(${WINGPANELINTERFACE} ${PLUGIN_LIBRARIES} ${PLUGIN_MUTTER_LIBRARIES} m)
-
-# Add -rpath ldflag if libgala is using mutter >= 3.21 to pick up libmutter-*.so
-if (MUTTER326_FOUND)