diff options
Diffstat (limited to 'xfce-extra/xfce4-power-manager')
3 files changed, 138 insertions, 1 deletions
diff --git a/xfce-extra/xfce4-power-manager/ChangeLog b/xfce-extra/xfce4-power-manager/ChangeLog index f0a7176f5c27..64b8f8b09ef8 100644 --- a/xfce-extra/xfce4-power-manager/ChangeLog +++ b/xfce-extra/xfce4-power-manager/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for xfce-extra/xfce4-power-manager # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-power-manager/ChangeLog,v 1.74 2014/05/27 11:34:17 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-power-manager/ChangeLog,v 1.75 2014/06/02 16:28:26 ssuominen Exp $ + +*xfce4-power-manager-1.3.0 (02 Jun 2014) + + 02 Jun 2014; Samuli Suominen <ssuominen@gentoo.org> + +files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch, + +xfce4-power-manager-1.3.0.ebuild: + Version bump with a post-release patch for brightness level restore after + sleep. 27 May 2014; Samuli Suominen <ssuominen@gentoo.org> -xfce4-power-manager-1.2.0_p20140511.ebuild: diff --git a/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch b/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch new file mode 100644 index 000000000000..7687ae4eb3c9 --- /dev/null +++ b/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch @@ -0,0 +1,70 @@ +http://bugzilla.xfce.org/show_bug.cgi?id=10535 + +From 4c14d83794b94ac18519806314464599d5e905f6 Mon Sep 17 00:00:00 2001 +From: Eric Koegel <eric.koegel@gmail.com> +Date: Sat, 31 May 2014 20:09:56 +0300 +Subject: Restore screen power after sleep + +With this patch xfpm will cache the brightness level before going +to sleep and set it back to that level after resuming from sleep. + +diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c +index e18c617..e49338e 100644 +--- a/common/xfpm-brightness.c ++++ b/common/xfpm-brightness.c +@@ -382,7 +382,7 @@ xfpm_brightness_helper_get_level (XfpmBrightness *brg, gint32 *level) + } + + static gboolean +-xfpm_brightness_helper_set_level (XfpmBrightness *brg, gint level) ++xfpm_brightness_helper_set_level (XfpmBrightness *brg, gint32 level) + { + gboolean ret; + GError *error = NULL; +diff --git a/src/xfpm-power.c b/src/xfpm-power.c +index 9d98fab..b42210b 100644 +--- a/src/xfpm-power.c ++++ b/src/xfpm-power.c +@@ -60,6 +60,7 @@ + #include "egg-idletime.h" + #include "xfpm-systemd.h" + #include "xfpm-suspend.h" ++#include "xfpm-brightness.h" + + + static void xfpm_power_finalize (GObject *object); +@@ -312,6 +313,8 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) + #ifdef WITH_NETWORK_MANAGER + gboolean network_manager_sleep; + #endif ++ XfpmBrightness *brightness; ++ gint32 brightness_level; + + if ( power->priv->inhibited && force == FALSE) + { +@@ -344,6 +347,10 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) + #endif + + g_signal_emit (G_OBJECT (power), signals [SLEEPING], 0); ++ /* Get the current brightness level so we can use it after we suspend */ ++ brightness = xfpm_brightness_new(); ++ xfpm_brightness_setup (brightness); ++ xfpm_brightness_get_level (brightness, &brightness_level); + + #ifdef WITH_NETWORK_MANAGER + g_object_get (G_OBJECT (power->priv->conf), +@@ -429,6 +436,11 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) + } + + g_signal_emit (G_OBJECT (power), signals [WAKING_UP], 0); ++ /* Check/update any changes while we slept */ ++ xfpm_power_get_properties (power); ++ /* Restore the brightness level from before we suspended */ ++ xfpm_brightness_set_level (brightness, brightness_level); ++ + #ifdef WITH_NETWORK_MANAGER + if ( network_manager_sleep ) + { +-- +cgit v0.10.1 + diff --git a/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.3.0.ebuild b/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.3.0.ebuild new file mode 100644 index 000000000000..d15434927a44 --- /dev/null +++ b/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.3.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.3.0.ebuild,v 1.1 2014/06/02 16:28:26 ssuominen Exp $ + +EAPI=5 +inherit flag-o-matic linux-info xfconf + +DESCRIPTION="Power manager for the Xfce desktop environment" +HOMEPAGE="http://goodies.xfce.org/projects/applications/xfce4-power-manager" +SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="debug kernel_linux networkmanager policykit +udisks systemd +xfce_plugins_brightness" + +COMMON_DEPEND=">=dev-libs/dbus-glib-0.100.2 + >=dev-libs/glib-2.30 + >=sys-apps/dbus-1.6.18 + || ( >=sys-power/upower-0.9.23 sys-power/upower-pm-utils ) + >=x11-libs/gtk+-2.24:2 + >=x11-libs/libnotify-0.7 + x11-libs/libX11 + >=x11-libs/libXrandr-1.2 + x11-libs/libXext + >=xfce-base/xfconf-4.10 + >=xfce-base/libxfce4ui-4.10 + >=xfce-base/libxfce4util-4.10 + policykit? ( >=sys-auth/polkit-0.112 ) + xfce_plugins_brightness? ( >=xfce-base/xfce4-panel-4.10 )" +# USE="systemd" is for ensuring hibernate/suspend works by enforcing correct runtime -only dependencies +RDEPEND="${COMMON_DEPEND} + networkmanager? ( net-misc/networkmanager ) + udisks? ( sys-fs/udisks:0 ) + !systemd? ( || ( sys-power/pm-utils sys-power/upower-pm-utils ) )" +DEPEND="${COMMON_DEPEND} + dev-util/intltool + sys-devel/gettext + virtual/pkgconfig + x11-proto/xproto" + +pkg_setup() { + PATCHES=( "${FILESDIR}"/${P}-restore_brightness_level_after_sleep.patch ) + + if use kernel_linux; then + CONFIG_CHECK="~TIMER_STATS" + linux-info_pkg_setup + fi + + XFCONF=( + $(use_enable policykit polkit) + --enable-dpms + $(use_enable networkmanager network-manager) + $(use_enable xfce_plugins_brightness panel-plugins) + $(xfconf_use_debug) + ) + + DOCS=( AUTHORS NEWS README TODO ) +} |