window: Keep track of fullscreen monitors directly

Instead of keeping around array indexes, keep track of them by storing
a pointer instead. This also changes from using an array (imitating the
X11 behaviour) to more explicit storing.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2016-11-29 17:50:17 +08:00
parent 0a4fb008f3
commit ecf796f82b
6 changed files with 93 additions and 93 deletions

View File

@ -221,7 +221,12 @@ struct _MetaWindow
* been overridden (via a client message), the window will cover the union of
* these monitors. If not, this is the single monitor which the window's
* origin is on. */
gint fullscreen_monitors[4];
struct {
MetaLogicalMonitor *top;
MetaLogicalMonitor *bottom;
MetaLogicalMonitor *left;
MetaLogicalMonitor *right;
} fullscreen_monitors;
/* Whether we're trying to constrain the window to be fully onscreen */
guint require_fully_onscreen : 1;
@ -574,11 +579,13 @@ void meta_window_maximize_internal (MetaWindow *window,
MetaRectangle *saved_rect);
void meta_window_make_fullscreen_internal (MetaWindow *window);
void meta_window_update_fullscreen_monitors (MetaWindow *window,
unsigned long top,
unsigned long bottom,
unsigned long left,
unsigned long right);
void meta_window_update_fullscreen_monitors (MetaWindow *window,
MetaLogicalMonitor *top,
MetaLogicalMonitor *bottom,
MetaLogicalMonitor *left,
MetaLogicalMonitor *right);
gboolean meta_window_has_fullscreen_monitors (MetaWindow *window);
void meta_window_resize_frame_with_gravity (MetaWindow *window,
gboolean user_op,