[mutter/gnome-3-34] window: Reset tile monitor number when untiling



commit 3df4348f236f6bd8e2f37e633885dfde841fc988
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Nov 1 13:40:04 2019 +0100

    window: Reset tile monitor number when untiling
    
    Otherwise we'll end up trying to access the out of date state later.
    
    Fixes the following test failure backtrace:
    
        #0  _g_log_abort ()
        #1  g_logv ()
        #2  g_log ()
        #3  meta_monitor_manager_get_logical_monitor_from_number ()
        #4  meta_window_get_work_area_for_monitor ()
        #5  meta_window_get_tile_area ()
        #6  constrain_maximization ()
        #7  do_all_constraints ()
        #8  meta_window_constrain ()
        #9  meta_window_move_resize_internal ()
        #10 meta_window_tile ()
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/912

 src/core/window.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index f72260f5d..d93e723a5 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3192,7 +3192,10 @@ meta_window_tile (MetaWindow   *window,
 
   /* Don't do anything if no tiling is requested */
   if (window->tile_mode == META_TILE_NONE)
-    return;
+    {
+      window->tile_monitor_number = -1;
+      return;
+    }
 
   if (window->tile_mode == META_TILE_MAXIMIZED)
     directions = META_MAXIMIZE_BOTH;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]