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
This commit is contained in:
Ray Strode 2010-09-24 15:40:36 -04:00
parent aa3a4a48e4
commit 5f4ee1b6e7

View File

@ -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;
}
}