summaryrefslogtreecommitdiff
path: root/src/core/constraints.c
diff options
context:
space:
mode:
authorPeter Bloomfield <PeterBloomfield@BellSouth.net>2010-01-20 10:59:07 -0500
committerThomas Thurman <tthurman@gnome.org>2010-01-20 10:59:07 -0500
commit4943d79d6844af3f7fc0a15ceadb69d95c4c5c61 (patch)
treedd0ce228d396340fe726e493d83b5dd5856398a1 /src/core/constraints.c
parent767cb27f78b0cb6958a83255c6c3bc01dc951445 (diff)
downloadmetacity-4943d79d6844af3f7fc0a15ceadb69d95c4c5c61.tar.gz
prevent window self-maximisation
Diffstat (limited to 'src/core/constraints.c')
-rw-r--r--src/core/constraints.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c
index a060d20d..5606b76b 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -528,10 +528,11 @@ place_window_if_needed(MetaWindow *window,
if (window->placed || did_placement)
{
if (window->maximize_horizontally_after_placement ||
- window->maximize_vertically_after_placement)
+ window->maximize_vertically_after_placement ||
+ window->fullscreen_after_placement)
{
- /* define a sane saved_rect so that the user can unmaximize to
- * something reasonable.
+ /* define a sane saved_rect so that the user can unmaximize or
+ * make unfullscreen to something reasonable.
*/
if (info->current.width >= info->work_area_xinerama.width)
{
@@ -558,6 +559,13 @@ place_window_if_needed(MetaWindow *window,
if (window->frame && !window->fullscreen)
meta_frame_calc_geometry (window->frame, info->fgeom);
+ if (window->fullscreen_after_placement)
+ {
+ window->saved_rect = info->current;
+ window->fullscreen = TRUE;
+ window->fullscreen_after_placement = FALSE;
+ }
+
window->maximize_horizontally_after_placement = FALSE;
window->maximize_vertically_after_placement = FALSE;
}