summarylogtreecommitdiffstats
path: root/minus-backgroundmanager.patch
diff options
context:
space:
mode:
authorQue Quotion2017-10-13 03:50:13 +0900
committerQue Quotion2017-10-13 03:50:13 +0900
commit4e4b2d03ce2bdfa22feac1c89144d7482828e8eb (patch)
tree6441ca0a9f934ea3e41df799dcbd173ef8eba68d /minus-backgroundmanager.patch
parentffae3d86b902ad0652fa180f4ea9d5c62c46a868 (diff)
downloadaur-4e4b2d03ce2bdfa22feac1c89144d7482828e8eb.tar.gz
Updates! More effective patching.
Diffstat (limited to 'minus-backgroundmanager.patch')
-rw-r--r--minus-backgroundmanager.patch162
1 files changed, 145 insertions, 17 deletions
diff --git a/minus-backgroundmanager.patch b/minus-backgroundmanager.patch
index 25a150955e53..1275172ca0c2 100644
--- a/minus-backgroundmanager.patch
+++ b/minus-backgroundmanager.patch
@@ -4,8 +4,8 @@
private void on_realize () {
update_panel_dimensions ();
-- Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
-+ //Services.BackgroundManager.get_default ().initialize (this.monitor_number, panel_height);
+- Services.BackgroundManager.initialize (this.monitor_number, panel_height);
++ //Services.BackgroundManager.initialize (this.monitor_number, panel_height);
Timeout.add (300 / panel_height, animation_step);
}
@@ -54,20 +54,148 @@
- }
+ } */
}
---- src/wingpanel/src/Services/BackgroundManager.vala 2016-10-21 23:51:49.434036000 +0900
-+++ src/wingpanel/src/Services/BackgroundManager.vala.new 2016-10-22 00:05:37.809131283 +0900
-@@ -17,7 +17,7 @@
- * Boston, MA 02111-1307, USA.
- */
-
+--- 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 @@
+-/*
+- * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public
+- * License along with this program; if not, write to the
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- * Boston, MA 02110-1301 USA.
+- */
+-
-namespace Wingpanel.Services {
-+/* namespace Wingpanel.Services {
- public enum BackgroundState {
- LIGHT,
- DARK,
-@@ -114,4 +114,4 @@
- return instance;
- }
- }
+- public enum BackgroundState {
+- LIGHT,
+- DARK,
+- MAXIMIZED,
+- TRANSLUCENT
+- }
+-
+- [DBus (name = "org.pantheon.gala.WingpanelInterface")]
+- public interface InterfaceBus : Object {
+- public signal void state_changed (BackgroundState state, uint animation_duration);
+-
+- public abstract void initialize (int monitor, int panel_height) throws IOError;
+- public abstract void remember_focused_window () throws IOError;
+- public abstract void restore_focused_window () throws IOError;
+- }
+-
+- public class BackgroundManager : Object {
+- private const string DBUS_NAME = "org.pantheon.gala.WingpanelInterface";
+- private const string DBUS_PATH = "/org/pantheon/gala/WingpanelInterface";
+-
+- private static BackgroundManager? instance = null;
+-
+- private InterfaceBus? bus = null;
+-
+- private BackgroundState current_state = BackgroundState.LIGHT;
+- private bool use_transparency = true;
+-
+- private bool bus_available {
+- get {
+- return bus != null;
+- }
+- }
+-
+- private int monitor;
+- private int panel_height;
+-
+- public signal void background_state_changed (BackgroundState state, uint animation_duration);
+-
+- public static void initialize (int monitor, int panel_height) {
+- var manager = BackgroundManager.get_default ();
+- manager.monitor = monitor;
+- manager.panel_height = panel_height;
+- }
+-
+- private BackgroundManager () {
+- PanelSettings.get_default ().notify["use-transparency"].connect (() => {
+- use_transparency = PanelSettings.get_default ().use_transparency;
+- state_updated ();
+- });
+-
+- use_transparency = PanelSettings.get_default ().use_transparency;
+-
+- Bus.watch_name (BusType.SESSION, DBUS_NAME, BusNameWatcherFlags.NONE,
+- () => connect_dbus (),
+- () => bus = null);
+- }
+-
+- public void remember_window () {
+- if (!bus_available) {
+- return;
+- }
+-
+- try {
+- bus.remember_focused_window ();
+- } catch (Error e) {
+- warning ("Remembering focused window failed: %s", e.message);
+- }
+- }
+-
+- public void restore_window () {
+- if (!bus_available) {
+- return;
+- }
+-
+- try {
+- bus.restore_focused_window ();
+- } catch (Error e) {
+- warning ("Restoring last focused window failed: %s", e.message);
+- }
+- }
+-
+- private bool connect_dbus () {
+- try {
+- bus = Bus.get_proxy_sync (BusType.SESSION, DBUS_NAME, DBUS_PATH);
+- bus.initialize (monitor, panel_height);
+- } catch (Error e) {
+- warning ("Connecting to \"%s\" failed: %s", DBUS_NAME, e.message);
+- return false;
+- }
+-
+- bus.state_changed.connect ((state, animation_duration) => {
+- current_state = state;
+- state_updated (animation_duration);
+- });
+-
+- state_updated ();
+- return true;
+- }
+-
+- private void state_updated (uint animation_duration = 0) {
+- background_state_changed (use_transparency ? current_state : BackgroundState.MAXIMIZED, animation_duration);
+- }
+-
+- public static BackgroundManager get_default () {
+- if (instance == null) {
+- instance = new BackgroundManager ();
+- }
+-
+- return instance;
+- }
+- }
-}
-+} */
+--- 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}