[Xfce4-commits] [xfce/xfwm4] 01/01: Remove restore-on-move option

noreply at xfce.org noreply at xfce.org
Sat Jan 10 21:45:04 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 d995192eab04f1c16bbeed60d65b7637433ae347
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sat Jan 10 13:11:37 2015 +0100

    Remove restore-on-move option
    
    That's of seldom use and is not compatible with tiling.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 settings-dialogs/tweaks-settings.c         |   17 -----------------
 settings-dialogs/xfwm4-tweaks-dialog.glade |   26 +++++---------------------
 src/moveresize.c                           |   13 +++----------
 src/settings.c                             |    7 -------
 src/settings.h                             |    1 -
 5 files changed, 8 insertions(+), 56 deletions(-)

diff --git a/settings-dialogs/tweaks-settings.c b/settings-dialogs/tweaks-settings.c
index 4e9b4ef..385ebff 100644
--- a/settings-dialogs/tweaks-settings.c
+++ b/settings-dialogs/tweaks-settings.c
@@ -143,12 +143,6 @@ cb_urgent_blink_button_toggled (GtkToggleButton *toggle, GtkWidget *repeat_urgen
 }
 
 static void
-cb_restore_on_move_check_button_toggled (GtkToggleButton *toggle, GtkWidget *button)
-{
-    gtk_widget_set_sensitive (button, gtk_toggle_button_get_active (toggle));
-}
-
-static void
 wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
 {
     GtkWidget *vbox;
@@ -181,7 +175,6 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
     GtkWidget *easy_click_combo_box = GTK_WIDGET (gtk_builder_get_object (builder, "easy_click_combo_box"));
     GtkWidget *raise_with_any_button_check = GTK_WIDGET (gtk_builder_get_object (builder, "raise_with_any_button_check"));
     GtkWidget *borderless_maximize_check = GTK_WIDGET (gtk_builder_get_object (builder, "borderless_maximize_check"));
-    GtkWidget *restore_on_move_check = GTK_WIDGET (gtk_builder_get_object (builder, "restore_on_move_check"));
     GtkWidget *tile_on_move_check = GTK_WIDGET (gtk_builder_get_object (builder, "tile_on_move_check"));
     GtkWidget *snap_resist_check = GTK_WIDGET (gtk_builder_get_object (builder, "snap_resist_check"));
     GtkWidget *urgent_blink = GTK_WIDGET (gtk_builder_get_object (builder, "urgent_blink"));
@@ -295,10 +288,6 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
                       "toggled",
                       G_CALLBACK (cb_urgent_blink_button_toggled),
                       repeat_urgent_blink);
-    g_signal_connect (G_OBJECT (restore_on_move_check),
-                      "toggled",
-                      G_CALLBACK (cb_restore_on_move_check_button_toggled),
-                      tile_on_move_check);
 
     /* Bind easy properties */
     /* Cycling tab */
@@ -343,10 +332,6 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
                             G_TYPE_BOOLEAN,
                             (GObject *)borderless_maximize_check, "active");
     xfconf_g_property_bind (xfwm4_channel,
-                            "/general/restore_on_move",
-                            G_TYPE_BOOLEAN,
-                            (GObject *)restore_on_move_check, "active");
-    xfconf_g_property_bind (xfwm4_channel,
                             "/general/tile_on_move",
                             G_TYPE_BOOLEAN,
                             (GObject *)tile_on_move_check, "active");
@@ -368,8 +353,6 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
                             (GObject *)mousewheel_rollup, "active");
     gtk_widget_set_sensitive (repeat_urgent_blink,
                               gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (urgent_blink)));
-    gtk_widget_set_sensitive (tile_on_move_check,
-                              gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (restore_on_move_check)));
 
     /* Workspaces tab */
     xfconf_g_property_bind (xfwm4_channel,
diff --git a/settings-dialogs/xfwm4-tweaks-dialog.glade b/settings-dialogs/xfwm4-tweaks-dialog.glade
index 66a95ee..b693142 100644
--- a/settings-dialogs/xfwm4-tweaks-dialog.glade
+++ b/settings-dialogs/xfwm4-tweaks-dialog.glade
@@ -431,22 +431,6 @@ or "skip taskbar" properties set</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="restore_on_move_check">
-                    <property name="label" translatable="yes">Restore original size of maximi_zed windows when moving</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">3</property>
-                  </packing>
-                </child>
-                <child>
                   <object class="GtkCheckButton" id="tile_on_move_check">
                     <property name="label" translatable="yes">Automatically _tile windows when moving toward the screen edge</property>
                     <property name="use_action_appearance">False</property>
@@ -459,7 +443,7 @@ or "skip taskbar" properties set</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">4</property>
+                    <property name="position">3</property>
                   </packing>
                 </child>
                 <child>
@@ -475,7 +459,7 @@ or "skip taskbar" properties set</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">5</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
                 <child>
@@ -491,7 +475,7 @@ or "skip taskbar" properties set</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">6</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
                 <child>
@@ -507,7 +491,7 @@ or "skip taskbar" properties set</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">7</property>
+                    <property name="position">6</property>
                   </packing>
                 </child>
                 <child>
@@ -523,7 +507,7 @@ or "skip taskbar" properties set</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">8</property>
+                    <property name="position">7</property>
                   </packing>
                 </child>
               </object>
diff --git a/src/moveresize.c b/src/moveresize.c
index bd8cae6..ddf8d6c 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -762,14 +762,7 @@ clientMoveTile (Client *c, XMotionEvent *xevent)
 
     screen_info = c->screen_info;
 
-    /*
-     * Tiling when moving really relies on restore_on_move to work
-     * reliably so just don't do anything if any of the above requirement
-     * is not met (restore_on_move being disabled is from another time,
-     * we should really not have such an option, I must have been weaked
-     * in the past...)
-     */
-    if (!(screen_info->params->tile_on_move && screen_info->params->restore_on_move))
+    if (!screen_info->params->tile_on_move)
     {
         return FALSE;
     }
@@ -949,7 +942,7 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
             clientMoveWarp (c, (XMotionEvent *) xevent);
         }
 
-        if ((screen_info->params->restore_on_move) && FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
+        if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
         {
 
             if ((ABS (xevent->xmotion.x_root - passdata->mx) > 15) ||
@@ -998,7 +991,7 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
 
         clientSnapPosition (c, prev_x, prev_y);
         /* This allows for moving fullscreen windows between monitors */
-        if (screen_info->params->restore_on_move && toggled_maximize)
+        if (toggled_maximize)
         {
             if ((clientConstrainPos (c, FALSE) & CLIENT_CONSTRAINED_TOP) &&
                  clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, FALSE))
diff --git a/src/settings.c b/src/settings.c
index 286b19d..fc08648 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -739,7 +739,6 @@ loadSettings (ScreenInfo *screen_info)
         {"raise_with_any_button", NULL, G_TYPE_BOOLEAN, TRUE},
         {"repeat_urgent_blink", NULL, G_TYPE_BOOLEAN, TRUE},
         {"resize_opacity", NULL, G_TYPE_INT, TRUE},
-        {"restore_on_move", NULL, G_TYPE_BOOLEAN, TRUE},
         {"scroll_workspaces", NULL, G_TYPE_BOOLEAN, TRUE},
         {"shadow_delta_height", NULL, G_TYPE_INT, TRUE},
         {"shadow_delta_width", NULL, G_TYPE_INT, TRUE},
@@ -829,8 +828,6 @@ loadSettings (ScreenInfo *screen_info)
         getBoolValue ("repeat_urgent_blink", rc);
     screen_info->params->urgent_blink =
         getBoolValue ("urgent_blink", rc);
-    screen_info->params->restore_on_move =
-        getBoolValue ("restore_on_move", rc);
     screen_info->params->frame_opacity =
         CLAMP (getIntValue ("frame_opacity", rc), 0, 100);
     screen_info->params->inactive_opacity =
@@ -1348,10 +1345,6 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
                     screen_info->params->raise_with_any_button = g_value_get_boolean (value);
                     update_grabs (screen_info);
                 }
-                else if (!strcmp (name, "restore_on_move"))
-                {
-                    screen_info->params->restore_on_move = g_value_get_boolean (value);
-                }
                 else if (!strcmp (name, "scroll_workspaces"))
                 {
                     screen_info->params->scroll_workspaces = g_value_get_boolean (value);
diff --git a/src/settings.h b/src/settings.h
index e480332..dc8edfa 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -215,7 +215,6 @@ struct _XfwmParams
     gboolean raise_on_focus;
     gboolean raise_with_any_button;
     gboolean repeat_urgent_blink;
-    gboolean restore_on_move;
     gboolean scroll_workspaces;
     gboolean show_app_icon;
     gboolean show_dock_shadow;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list