summaryrefslogtreecommitdiff
path: root/src/core/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/display.c')
-rw-r--r--src/core/display.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/display.c b/src/core/display.c
index e12dd60a..76408930 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -465,6 +465,8 @@ meta_display_open (void)
the_display->grab_window = NULL;
the_display->grab_screen = NULL;
the_display->grab_resize_popup = NULL;
+ the_display->grab_tile_mode = META_TILE_NONE;
+ the_display->grab_tile_monitor_number = -1;
the_display->grab_edge_resistance_data = NULL;
@@ -3527,6 +3529,16 @@ meta_display_begin_grab_op (MetaDisplay *display,
display->grab_xwindow = grab_xwindow;
display->grab_button = button;
display->grab_mask = modmask;
+ if (window)
+ {
+ display->grab_tile_mode = window->tile_mode;
+ display->grab_tile_monitor_number = window->tile_monitor_number;
+ }
+ else
+ {
+ display->grab_tile_mode = META_TILE_NONE;
+ display->grab_tile_monitor_number = -1;
+ }
display->grab_anchor_root_x = root_x;
display->grab_anchor_root_y = root_y;
display->grab_latest_motion_x = root_x;
@@ -3724,6 +3736,11 @@ meta_display_end_grab_op (MetaDisplay *display,
if (display->grab_window != NULL)
display->grab_window->shaken_loose = FALSE;
+ /*if(display->grab_window != NULL && display->grab_window->tile_mode == META_TILE_MAXIMIZED)
+ {
+ display->grab_window->tile_mode = META_TILE_NONE;
+ }*/
+
if (display->grab_window != NULL &&
!meta_prefs_get_raise_on_click () &&
(meta_grab_op_is_moving (display->grab_op) ||
@@ -3826,9 +3843,15 @@ meta_display_end_grab_op (MetaDisplay *display,
}
#endif /* HAVE_XSYNC */
+ /* Hide the tile preview if it exists */
+ if (display->grab_screen->tile_preview)
+ meta_tile_preview_hide (display->grab_screen->tile_preview);
+
display->grab_window = NULL;
display->grab_screen = NULL;
display->grab_xwindow = None;
+ display->grab_tile_mode = META_TILE_NONE;
+ display->grab_tile_monitor_number = -1;
display->grab_op = META_GRAB_OP_NONE;
if (display->grab_resize_popup)