4
4
* Copyright (C) 2001 Havoc Pennington
5
5
* Copyright (C) 2002 Red Hat, Inc.
6
6
* Copyright (C) 2003, 2004 Rob Adams
7
* Copyright (C) 2004, 2005 Elijah Newren
8
9
* This program is free software; you can redistribute it and/or
9
10
* modify it under the terms of the GNU General Public License as
107
114
Time initial_timestamp;
109
116
/* Whether we're maximized */
111
guint maximize_after_placement : 1;
117
guint maximized_horizontally : 1;
118
guint maximized_vertically : 1;
119
guint maximize_horizontally_after_placement : 1;
120
guint maximize_vertically_after_placement : 1;
113
122
/* Whether we're shaded */
114
123
guint shaded : 1;
116
125
/* Whether we're fullscreen */
117
126
guint fullscreen : 1;
128
/* Whether we're trying to constrain the window to be fully onscreen */
129
guint require_fully_onscreen : 1;
131
/* Whether we're trying to constrain the window to be on a single xinerama */
132
guint require_on_single_xinerama : 1;
119
134
/* Whether we're sticky in the multi-workspace sense
120
135
* (vs. the not-scroll-with-viewport sense, we don't
121
136
* have no stupid viewports)
285
301
/* The size we set the window to last (i.e. what we believe
286
302
* to be its actual size on the server). The x, y are
287
303
* the actual server-side x,y so are relative to the frame
288
* or the root window as appropriate.
304
* (meaning that they just hold the frame width and height)
305
* or the root window (meaning they specify the location
306
* of the top left of the inner window) as appropriate.
290
308
MetaRectangle rect;
292
/* The geometry to restore when we unmaximize.
293
* The position is in root window coords, even if
294
* there's a frame, which contrasts with window->rect
310
/* The geometry to restore when we unmaximize. The position is in
311
* root window coords, even if there's a frame, which contrasts with
312
* window->rect above. Note that this gives the position and size
313
* of the client window (i.e. ignoring the frame).
297
315
MetaRectangle saved_rect;
299
317
/* This is the geometry the window had after the last user-initiated
300
318
* move/resize operations. We use this whenever we are moving the
301
* implicitly (for example, if we move to avoid a panel, we
302
* can snap back to this position if the panel moves again)
319
* implicitly (for example, if we move to avoid a panel, we can snap
320
* back to this position if the panel moves again). Note that this
321
* gives the position and size of the client window (i.e. ignoring
304
324
* Position valid if user_has_moved, size valid if user_has_resized
306
* Position always in root coords, unlike window->rect
326
* Position always in root coords, unlike window->rect.
308
328
MetaRectangle user_rect;
328
348
* the dynamic window state such as "maximized", not just the
351
#define META_WINDOW_MAXIMIZED(w) ((w)->maximized_horizontally && \
352
(w)->maximized_vertically)
331
353
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
332
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !(w)->maximized && !(w)->fullscreen && !(w)->shaded)
354
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
333
355
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
334
356
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
335
357
((w)->size_hints.min_height < (w)->size_hints.max_height)))
348
370
void meta_window_queue_calc_showing (MetaWindow *window);
349
371
void meta_window_minimize (MetaWindow *window);
350
372
void meta_window_unminimize (MetaWindow *window);
351
void meta_window_maximize (MetaWindow *window);
352
void meta_window_maximize_internal (MetaWindow *window,
353
MetaRectangle *saved_rect);
354
void meta_window_unmaximize (MetaWindow *window);
373
void meta_window_maximize (MetaWindow *window,
374
MetaMaximizeFlags directions);
375
void meta_window_maximize_internal (MetaWindow *window,
376
MetaMaximizeFlags directions,
377
MetaRectangle *saved_rect);
378
void meta_window_unmaximize (MetaWindow *window,
379
MetaMaximizeFlags directions);
355
380
void meta_window_make_above (MetaWindow *window);
356
381
void meta_window_unmake_above (MetaWindow *window);
357
382
void meta_window_shade (MetaWindow *window);
391
void meta_window_fill_horizontal (MetaWindow *window);
392
void meta_window_fill_vertical (MetaWindow *window);
394
416
/* Return whether the window would be showing if we were on its workspace */
395
417
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);