[mutter] Restore the original tile state when a drag is cancelled
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Restore the original tile state when a drag is cancelled
- Date: Thu, 20 Jan 2011 17:50:37 +0000 (UTC)
commit 2eb8b09b1aed71a1dd003ea04ecbe22fd242e283
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jan 19 17:00:46 2011 +0100
Restore the original tile state when a drag is cancelled
If a drag operation is cancelled, the dragged window should be
restored to its previous state/position. Implement this for tiled
states.
https://bugzilla.gnome.org/show_bug.cgi?id=639988
src/core/keybindings.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index e3ea1e8..303bec8 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1555,15 +1555,20 @@ process_mouse_move_resize_grab (MetaDisplay *display,
if (window->tile_mode != META_TILE_NONE)
meta_screen_tile_preview_hide (screen);
+ /* Restore the original tile mode */
+ window->tile_mode = display->grab_tile_mode;
+
/* End move or resize and restore to original state. If the
* window was a maximized window that had been "shaken loose" we
* need to remaximize it. In normal cases, we need to do a
* moveresize now to get the position back to the original.
*/
- if (window->shaken_loose)
+ if (window->shaken_loose || window->tile_mode == META_TILE_MAXIMIZED)
meta_window_maximize (window,
META_MAXIMIZE_HORIZONTAL |
META_MAXIMIZE_VERTICAL);
+ else if (window->tile_mode != META_TILE_NONE)
+ meta_window_tile (window);
else
meta_window_move_resize (display->grab_window,
TRUE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]