diff options
author | infirit <[email protected]> | 2014-10-24 21:59:58 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-27 12:29:24 +0100 |
commit | bec068ef5ddc73f23ffd6298122bf818fd4d2084 (patch) | |
tree | d7db4682b85c601d069de72cf76dda77b8a5e8dc /src/core/display.c | |
parent | f814451acc48aec6d2fa1c217468f74e57a84340 (diff) | |
download | marco-bec068ef5ddc73f23ffd6298122bf818fd4d2084.tar.bz2 marco-bec068ef5ddc73f23ffd6298122bf818fd4d2084.tar.xz |
Rework tiling code based off Consortium
Taken from
https://github.com/SolusOS-discontinued/consortium/commit/b463e03f5bdeab307ceee6b969c681f29537c76d
Diffstat (limited to 'src/core/display.c')
-rw-r--r-- | src/core/display.c | 23 |
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) |