[mutter] tiling: use META_WINDOW_TILED_SIDE_BY_SIDE in state check



commit 5f4ee1b6e726660915d886c22a8c692dafd15c59
Author: Ray Strode <rstrode redhat com>
Date:   Fri Sep 24 15:40:36 2010 -0400

    tiling: use META_WINDOW_TILED_SIDE_BY_SIDE in state check
    
    The meta_window_handle_mouse_grab_op_event function ensures
    the tile_mode variable is in a consistent state after a drag
    op is finished.
    
    The way this is current done is:
    
    if (!window->maximized_vertically &&
        window->tile_mode != META_TILE_NONE)
      window->tile_mode = META_TILE_NONE;
    
    While valid, it doesn't "read" as well as using the
    META_WINDOW_TILED_SIDE_BY_SIDE macro, since the macro is specifically
    about side-by-side tiling.
    
    This commit just changes things to use the macro and to not bother
    checking the tile mode (since if we just reset it anyway, then it doesn't
    matter if the value is right or wrong to begin with).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630548

 src/core/window.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index d98fb44..ec3dadd 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8464,8 +8464,7 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
                * would break the ability to snap back to the tiled
                * state, so we wait until mouse release.
                */
-              if (!window->maximized_vertically &&
-                  window->tile_mode != META_TILE_NONE)
+              if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
                 window->tile_mode = META_TILE_NONE;
             }
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]