[Xfce4-commits] [xfce/xfwm4] 01/01: Horizontal scrolling/window opacity optional
noreply at xfce.org
noreply at xfce.org
Sat Mar 14 22:39:44 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit bdf28aa377893d8be42a495361f533b373ebaca9
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Mar 14 22:34:22 2015 +0100
Horizontal scrolling/window opacity optional
Bug: 10372
With compositor enabled, horizontal scrolling via the mousewheel or
touchpad would adjust the window opacity.
Apparently, this is confusing so make it optional and disabled by
default.
If you fancy this feature, you can re-enable it by setting
"horiz_scroll_opacity" to true in xfconf.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
defaults/defaults | 12 ++++++------
src/events.c | 21 +++++++++++++--------
src/settings.c | 19 +++++++++++++------
src/settings.h | 1 +
4 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/defaults/defaults b/defaults/defaults
index 537c35a..2b1ba5b 100644
--- a/defaults/defaults
+++ b/defaults/defaults
@@ -6,29 +6,30 @@ button_layout=O|SHMC
button_offset=0
button_spacing=0
click_to_focus=true
-cycle_draw_frame=true
cycle_apps_only=false
+cycle_draw_frame=true
cycle_hidden=true
cycle_minimum=true
cycle_preview=true
cycle_tabwin_mode=0
cycle_workspaces=false
-double_click_time=250
-double_click_distance=5
double_click_action=maximize
+double_click_distance=5
+double_click_time=250
easy_click=Alt
focus_delay=250
focus_hint=true
focus_new=true
frame_opacity=100
full_width_title=true
+horiz_scroll_opacity=false
inactive_opacity=100
maximized_offset=0
+mousewheel_rollup=true
move_opacity=100
placement_mode=center
placement_ratio=20
popup_opacity=100
-mousewheel_rollup=true
prevent_focus_stealing=false
raise_delay=250
raise_on_click=true
@@ -57,11 +58,11 @@ tile_on_move=true
title_alignment=center
title_font=Sans Bold 9
title_horizontal_offset=0
+titleless_maximize=false
title_shadow_active=false
title_shadow_inactive=false
title_vertical_offset_active=0
title_vertical_offset_inactive=0
-titleless_maximize=false
toggle_workspaces=false
unredirect_overlays=true
urgent_blink=false
@@ -73,4 +74,3 @@ wrap_resistance=10
wrap_windows=true
wrap_workspaces=false
zoom_desktop=true
-
diff --git a/src/events.c b/src/events.c
index 2613196..50303b0 100644
--- a/src/events.c
+++ b/src/events.c
@@ -852,16 +852,21 @@ titleButton (Client * c, guint state, XButtonEvent * ev)
}
}
}
- else if (ev->button == Button6)
- {
- /* Mouse wheel scroll left, or left side button */
- clientDecOpacity(c);
- }
- else if (ev->button == Button7)
+#ifdef HAVE_COMPOSITOR
+ else if (screen_info->params->horiz_scroll_opacity)
{
- /* Mouse wheel scroll right, or right side button */
- clientIncOpacity(c);
+ if (ev->button == Button6)
+ {
+ /* Mouse wheel scroll left, or left side button */
+ clientDecOpacity(c);
+ }
+ else if (ev->button == Button7)
+ {
+ /* Mouse wheel scroll right, or right side button */
+ clientIncOpacity(c);
+ }
}
+#endif /* HAVE_COMPOSITOR */
}
static void
diff --git a/src/settings.c b/src/settings.c
index 502e51b..3dac5ae 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -707,14 +707,12 @@ loadSettings (ScreenInfo *screen_info)
/* You can change the order of the following parameters */
{"activate_action", NULL, G_TYPE_STRING, TRUE},
{"borderless_maximize", NULL, G_TYPE_BOOLEAN, TRUE},
- {"titleless_maximize", NULL, G_TYPE_BOOLEAN, TRUE},
{"box_move", NULL, G_TYPE_BOOLEAN, TRUE},
{"box_resize", NULL, G_TYPE_BOOLEAN, TRUE},
{"button_layout", NULL, G_TYPE_STRING, TRUE},
{"button_offset", NULL, G_TYPE_INT, TRUE},
{"button_spacing", NULL, G_TYPE_INT, TRUE},
{"click_to_focus", NULL, G_TYPE_BOOLEAN, TRUE},
- {"focus_delay", NULL, G_TYPE_INT, TRUE},
{"cycle_apps_only", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_draw_frame", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_hidden", NULL, G_TYPE_BOOLEAN, TRUE},
@@ -722,25 +720,27 @@ loadSettings (ScreenInfo *screen_info)
{"cycle_preview", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_tabwin_mode", NULL, G_TYPE_INT, FALSE},
{"cycle_workspaces", NULL, G_TYPE_BOOLEAN, TRUE},
- {"double_click_time", NULL, G_TYPE_INT, TRUE},
- {"double_click_distance", NULL, G_TYPE_INT, TRUE},
{"double_click_action", NULL, G_TYPE_STRING, TRUE},
+ {"double_click_distance", NULL, G_TYPE_INT, TRUE},
+ {"double_click_time", NULL, G_TYPE_INT, TRUE},
{"easy_click", NULL, G_TYPE_STRING, TRUE},
+ {"focus_delay", NULL, G_TYPE_INT, TRUE},
{"focus_hint", NULL, G_TYPE_BOOLEAN, TRUE},
{"focus_new", NULL, G_TYPE_BOOLEAN,TRUE},
{"frame_opacity", NULL, G_TYPE_INT, TRUE},
{"full_width_title", NULL, G_TYPE_BOOLEAN, TRUE},
+ {"horiz_scroll_opacity", NULL, G_TYPE_BOOLEAN, FALSE},
{"inactive_opacity", NULL, G_TYPE_INT, TRUE},
{"margin_bottom", NULL, G_TYPE_INT, FALSE},
{"margin_left", NULL, G_TYPE_INT, FALSE},
{"margin_right", NULL, G_TYPE_INT, FALSE},
{"margin_top", NULL, G_TYPE_INT, FALSE},
{"maximized_offset", NULL, G_TYPE_INT, TRUE},
+ {"mousewheel_rollup", NULL, G_TYPE_BOOLEAN, FALSE},
{"move_opacity", NULL, G_TYPE_INT, TRUE},
- {"placement_ratio", NULL, G_TYPE_INT, TRUE},
{"placement_mode", NULL, G_TYPE_STRING, TRUE},
+ {"placement_ratio", NULL, G_TYPE_INT, TRUE},
{"popup_opacity", NULL, G_TYPE_INT, TRUE},
- {"mousewheel_rollup", NULL, G_TYPE_BOOLEAN, FALSE},
{"prevent_focus_stealing", NULL, G_TYPE_BOOLEAN, TRUE},
{"raise_delay", NULL, G_TYPE_INT, TRUE},
{"raise_on_click", NULL, G_TYPE_BOOLEAN, TRUE},
@@ -768,6 +768,7 @@ loadSettings (ScreenInfo *screen_info)
{"title_alignment", NULL, G_TYPE_STRING, TRUE},
{"title_font", NULL, G_TYPE_STRING, FALSE},
{"title_horizontal_offset", NULL, G_TYPE_INT, TRUE},
+ {"titleless_maximize", NULL, G_TYPE_BOOLEAN, TRUE},
{"title_shadow_active", NULL, G_TYPE_STRING, TRUE},
{"title_shadow_inactive", NULL, G_TYPE_STRING, TRUE},
{"title_vertical_offset_active", NULL, G_TYPE_INT, TRUE},
@@ -823,6 +824,8 @@ loadSettings (ScreenInfo *screen_info)
getBoolValue ("focus_hint", rc);
screen_info->params->focus_new =
getBoolValue ("focus_new", rc);
+ screen_info->params->horiz_scroll_opacity =
+ getBoolValue ("horiz_scroll_opacity", rc);
screen_info->params->mousewheel_rollup =
getBoolValue ("mousewheel_rollup", rc);
screen_info->params->prevent_focus_stealing =
@@ -1354,6 +1357,10 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
{
screen_info->params->focus_hint = g_value_get_boolean (value);
}
+ else if (!strcmp (name, "horiz_scroll_opacity"))
+ {
+ screen_info->params->horiz_scroll_opacity = g_value_get_boolean (value);
+ }
else if (!strcmp (name, "mousewheel_rollup"))
{
screen_info->params->mousewheel_rollup = g_value_get_boolean (value);
diff --git a/src/settings.h b/src/settings.h
index 89e1eea..b1467b9 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -215,6 +215,7 @@ struct _XfwmParams
gboolean focus_hint;
gboolean focus_new;
gboolean full_width_title;
+ gboolean horiz_scroll_opacity;
gboolean mousewheel_rollup;
gboolean prevent_focus_stealing;
gboolean raise_on_click;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list