summaryrefslogtreecommitdiff
path: root/settings-dialogs
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2021-01-23 20:25:16 +0100
committerOlivier Fourdan <fourdan@xfce.org>2021-01-23 20:25:16 +0100
commit1ab8a3b281b7cad5ab826cca4f09cdb1ea561468 (patch)
treedc611995264eacf815b5b0615f574b6fa0bc3cc3 /settings-dialogs
parent80498847159a538ea9c17cff37b59b3bf4f74361 (diff)
downloadxfwm4-1ab8a3b281b7cad5ab826cca4f09cdb1ea561468.tar.gz
settings: Enable either windows wrap or tiling
Both options are incompatible, make sure to allow either one or the other, but not both. Signed-off-by: Olivier Fourdan <fourdan@xfce.org> Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/504
Diffstat (limited to 'settings-dialogs')
-rw-r--r--settings-dialogs/tweaks-settings.c13
-rw-r--r--settings-dialogs/xfwm4-settings.c12
2 files changed, 24 insertions, 1 deletions
diff --git a/settings-dialogs/tweaks-settings.c b/settings-dialogs/tweaks-settings.c
index 3291201d8..898c65a5f 100644
--- a/settings-dialogs/tweaks-settings.c
+++ b/settings-dialogs/tweaks-settings.c
@@ -148,6 +148,15 @@ cb_urgent_blink_button_toggled (GtkToggleButton *toggle, GtkWidget *repeat_urgen
}
static void
+cb_tile_on_move_check_toggled (GtkToggleButton *toggle, XfconfChannel *channel)
+{
+ if (gtk_toggle_button_get_active (toggle))
+ {
+ xfconf_channel_set_bool (channel, "/general/wrap_windows", FALSE);
+ }
+}
+
+static void
cb_borderless_maximize_button_toggled (GtkToggleButton *toggle, GtkWidget *titleless_maximize_check)
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (titleless_maximize_check), FALSE);
@@ -302,6 +311,10 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
"toggled",
G_CALLBACK (cb_urgent_blink_button_toggled),
repeat_urgent_blink);
+ g_signal_connect (G_OBJECT (tile_on_move_check),
+ "toggled",
+ G_CALLBACK (cb_tile_on_move_check_toggled),
+ xfwm4_channel);
/* Bind easy properties */
/* Cycling tab */
diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index 34f9d82b2..b43757c74 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -164,6 +164,8 @@ static void xfwm_settings_click_to_focus_property_changed (XfconfChan
const gchar *property,
const GValue *value,
XfwmSettings *settings);
+static void cb_wrap_windows_toggled (GtkToggleButton *toggle,
+ XfconfChannel *channel);
static void xfwm_settings_initialize_shortcuts (XfwmSettings *settings);
static void xfwm_settings_reload_shortcuts (XfwmSettings *settings);
static void xfwm_settings_shortcut_added (XfceShortcutsProvider *provider,
@@ -617,6 +619,9 @@ xfwm_settings_constructed (GObject *object)
snap_to_border_check, "active");
xfconf_g_property_bind (settings->priv->wm_channel, "/general/snap_to_windows", G_TYPE_BOOLEAN,
snap_to_window_check, "active");
+ g_signal_connect (G_OBJECT (wrap_windows_check), "toggled",
+ G_CALLBACK (cb_wrap_windows_toggled),
+ settings->priv->wm_channel);
/* Load shortcuts */
xfwm_settings_initialize_shortcuts (settings);
@@ -1575,7 +1580,6 @@ xfwm_settings_double_click_action_property_changed (XfconfChannel *channel,
}
-
static void
xfwm_settings_click_to_focus_property_changed (XfconfChannel *channel,
const gchar *property,
@@ -1611,6 +1615,12 @@ xfwm_settings_click_to_focus_property_changed (XfconfChannel *channel,
}
+static void
+cb_wrap_windows_toggled (GtkToggleButton *toggle, XfconfChannel *channel)
+{
+ if (gtk_toggle_button_get_active (toggle))
+ xfconf_channel_set_bool (channel, "/general/tile_on_move", FALSE);
+}
static void