window: Introduce meta_window_get_tile_match()

Returns the matching tiled window. This is the topmost tiled window in a
complementary tile mode that is:

 - on the same monitor;
 - on the same workspace;
 - spanning the remaining monitor width;
 - there is no 3rd window stacked between both tiled windows that's
   partially visible in the common edge.

https://bugzilla.gnome.org/show_bug.cgi?id=643075
This commit is contained in:
Rui Matos
2012-02-24 17:08:55 +01:00
parent 13bc8f7a76
commit 2926323a9a
5 changed files with 139 additions and 0 deletions

View File

@@ -410,6 +410,9 @@ struct _MetaWindow
/* Focused window that is (directly or indirectly) attached to this one */
MetaWindow *attached_focus_window;
/* The currently complementary tiled window, if any */
MetaWindow *tile_match;
};
struct _MetaWindowClass
@@ -663,4 +666,6 @@ void meta_window_propagate_focus_appearance (MetaWindow *window,
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
void meta_window_compute_tile_match (MetaWindow *window);
#endif