Commit 2115c1e6 authored by Andre Miranda's avatar Andre Miranda
Browse files

settings: Add option to disable lowering windows on middle click

This has no effect on CSD windows.

Closes #280

Signed-off-by: Andre Miranda's avatarAndre Miranda <andreldm@xfce.org>
parent 7e8d60bb
Pipeline #7200 passed with stages
in 2 minutes and 52 seconds
......@@ -27,6 +27,7 @@ frame_opacity=100
full_width_title=true
horiz_scroll_opacity=false
inactive_opacity=100
lower_on_middleclick=true
maximized_offset=0
mousewheel_rollup=true
move_opacity=100
......
......@@ -204,6 +204,7 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
GtkWidget *urgent_blink = GTK_WIDGET (gtk_builder_get_object (builder, "urgent_blink"));
GtkWidget *repeat_urgent_blink = GTK_WIDGET (gtk_builder_get_object (builder, "repeat_urgent_blink"));
GtkWidget *mousewheel_rollup = GTK_WIDGET (gtk_builder_get_object (builder, "mousewheel_rollup"));
GtkWidget *lower_on_middleclick = GTK_WIDGET (gtk_builder_get_object (builder, "lower_on_middleclick"));
/* Workspaces tab */
GtkWidget *scroll_workspaces_check = GTK_WIDGET (gtk_builder_get_object (builder, "scroll_workspaces_check"));
......@@ -390,6 +391,10 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
"/general/mousewheel_rollup",
G_TYPE_BOOLEAN,
(GObject *)mousewheel_rollup, "active");
xfconf_g_property_bind (xfwm4_channel,
"/general/lower_on_middleclick",
G_TYPE_BOOLEAN,
(GObject *)lower_on_middleclick, "active");
gtk_widget_set_sensitive (repeat_urgent_blink,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (urgent_blink)));
gtk_widget_set_sensitive (titleless_maximize_check,
......
......@@ -576,6 +576,22 @@ or "skip taskbar" properties set</property>
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="lower_on_middleclick">
<property name="label" translatable="yes">Use mouse middleclick to lower the window</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">9</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
......
......@@ -772,7 +772,10 @@ titleButton (Client *c, guint state, XfwmEventButton *event)
}
else if (event->button == Button2)
{
clientLower (c, None);
if (screen_info->params->lower_on_middleclick)
{
clientLower (c, None);
}
}
else if (event->button == Button3)
{
......
......@@ -693,6 +693,7 @@ loadSettings (ScreenInfo *screen_info)
{"full_width_title", NULL, G_TYPE_BOOLEAN, TRUE},
{"horiz_scroll_opacity", NULL, G_TYPE_BOOLEAN, FALSE},
{"inactive_opacity", NULL, G_TYPE_INT, TRUE},
{"lower_on_middleclick", NULL, G_TYPE_BOOLEAN, TRUE},
{"margin_bottom", NULL, G_TYPE_INT, FALSE},
{"margin_left", NULL, G_TYPE_INT, FALSE},
{"margin_right", NULL, G_TYPE_INT, FALSE},
......@@ -793,6 +794,8 @@ loadSettings (ScreenInfo *screen_info)
getBoolValue ("focus_new", rc);
screen_info->params->horiz_scroll_opacity =
getBoolValue ("horiz_scroll_opacity", rc);
screen_info->params->lower_on_middleclick =
getBoolValue ("lower_on_middleclick", rc);
screen_info->params->mousewheel_rollup =
getBoolValue ("mousewheel_rollup", rc);
screen_info->params->prevent_focus_stealing =
......@@ -1368,6 +1371,10 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
{
screen_info->params->horiz_scroll_opacity = g_value_get_boolean (value);
}
else if (!strcmp (name, "lower_on_middleclick"))
{
screen_info->params->lower_on_middleclick = g_value_get_boolean (value);
}
else if (!strcmp (name, "mousewheel_rollup"))
{
screen_info->params->mousewheel_rollup = g_value_get_boolean (value);
......
......@@ -221,6 +221,7 @@ struct _XfwmParams
gboolean focus_new;
gboolean full_width_title;
gboolean horiz_scroll_opacity;
gboolean lower_on_middleclick;
gboolean mousewheel_rollup;
gboolean prevent_focus_stealing;
gboolean raise_on_click;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment