mirror of
https://github.com/brl/mutter.git
synced 2025-07-29 13:08:02 +00:00
window: Pass mode as parameter to tile() operation
Now that the preview tile mode has been split from the window's tile_mode property, it is much more natural to pass the requested tile_mode to the tile() function instead of setting it externally and calling the function to apply the state.
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
8f2c86d79e
commit
c7fa57cd28
@@ -2969,11 +2969,14 @@ meta_window_requested_dont_bypass_compositor (MetaWindow *window)
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_tile (MetaWindow *window)
|
||||
meta_window_tile (MetaWindow *window,
|
||||
MetaTileMode tile_mode)
|
||||
{
|
||||
MetaMaximizeFlags directions;
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
window->tile_mode = tile_mode;
|
||||
|
||||
/* Don't do anything if no tiling is requested */
|
||||
if (window->tile_mode == META_TILE_NONE)
|
||||
return;
|
||||
@@ -6123,9 +6126,8 @@ end_grab_op (MetaWindow *window,
|
||||
{
|
||||
if (meta_grab_op_is_moving (window->display->grab_op))
|
||||
{
|
||||
window->tile_mode = window->screen->preview_tile_mode;
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
meta_window_tile (window);
|
||||
if (window->screen->preview_tile_mode != META_TILE_NONE)
|
||||
meta_window_tile (window, window->screen->preview_tile_mode);
|
||||
else
|
||||
update_move (window,
|
||||
modifiers & CLUTTER_SHIFT_MASK,
|
||||
|
Reference in New Issue
Block a user