[Xfce4-commits] [xfce/xfwm4] 01/01: Add a zoom_desktop xfconf setting (Bug #11367)
noreply at xfce.org
noreply at xfce.org
Wed Dec 10 16:35:53 CET 2014
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository xfce/xfwm4.
commit fd07ce807ecd6bff0a579f416ea9425878f426cd
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Tue Dec 9 19:25:41 2014 +0300
Add a zoom_desktop xfconf setting (Bug #11367)
This way the user can toggle the zooming feature at will.
By default, zooming is enabled.
Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
---
defaults/defaults | 1 +
src/compositor.c | 8 ++++++++
src/settings.c | 7 +++++++
src/settings.h | 1 +
4 files changed, 17 insertions(+)
diff --git a/defaults/defaults b/defaults/defaults
index 78c15a5..5f05833 100644
--- a/defaults/defaults
+++ b/defaults/defaults
@@ -70,4 +70,5 @@ wrap_layout=true
wrap_resistance=10
wrap_windows=true
wrap_workspaces=false
+zoom_desktop=true
diff --git a/src/compositor.c b/src/compositor.c
index 1bf3322..59d72e9 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3041,6 +3041,10 @@ void
compositorZoomIn (ScreenInfo *screen_info, XButtonEvent *ev)
{
#ifdef HAVE_COMPOSITOR
+ /* don't do anything if the user disabled the zoom feature */
+ if (!screen_info->params->zoom_desktop)
+ return;
+
screen_info->transform.matrix[0][0] -= 4096;
screen_info->transform.matrix[1][1] -= 4096;
@@ -3072,6 +3076,10 @@ void
compositorZoomOut (ScreenInfo *screen_info, XButtonEvent *ev)
{
#ifdef HAVE_COMPOSITOR
+ /* don't do anything if the user disabled the zoom feature */
+ if (!screen_info->params->zoom_desktop)
+ return;
+
if(screen_info->zoomed)
{
screen_info->transform.matrix[0][0] += 4096;
diff --git a/src/settings.c b/src/settings.c
index 1eb98da..37cbcff 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -745,6 +745,7 @@ loadSettings (ScreenInfo *screen_info)
{"wrap_resistance", NULL, G_TYPE_INT, TRUE},
{"wrap_windows", NULL, G_TYPE_BOOLEAN, TRUE},
{"wrap_workspaces", NULL, G_TYPE_BOOLEAN, TRUE},
+ {"zoom_desktop", NULL, G_TYPE_BOOLEAN, TRUE},
{NULL, NULL, G_TYPE_INVALID, FALSE}
};
@@ -843,6 +844,8 @@ loadSettings (ScreenInfo *screen_info)
getBoolValue ("use_compositing", rc);
screen_info->params->wrap_workspaces =
getBoolValue ("wrap_workspaces", rc);
+ screen_info->params->zoom_desktop =
+ getBoolValue ("zoom_desktop", rc);
screen_info->params->wrap_layout =
getBoolValue ("wrap_layout", rc);
@@ -1266,6 +1269,10 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
screen_info->params->wrap_workspaces = g_value_get_boolean (value);
placeSidewalks (screen_info, screen_info->params->wrap_workspaces);
}
+ else if (!strcmp (name, "zoom_desktop"))
+ {
+ screen_info->params->zoom_desktop = g_value_get_boolean (value);
+ }
else if (!strcmp (name, "wrap_windows"))
{
screen_info->params->wrap_windows = g_value_get_boolean (value);
diff --git a/src/settings.h b/src/settings.h
index a5038c8..e480332 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -236,6 +236,7 @@ struct _XfwmParams
gboolean wrap_layout;
gboolean wrap_windows;
gboolean wrap_workspaces;
+ gboolean zoom_desktop;
};
gboolean loadSettings (ScreenInfo *);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list