summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorRob Adams <robadams@ucla.edu>2003-06-09 23:49:02 +0000
committerRob Adams <readams@src.gnome.org>2003-06-09 23:49:02 +0000
commit010e620a344dd690df94f53bf212667b3547dc2b (patch)
treeae332da5a8f155fb5cd173a8fb73d6477c8df25d /src/window.h
parent3f6bad087d6f4aba9af9a982f54a540461071b47 (diff)
downloadmetacity-010e620a344dd690df94f53bf212667b3547dc2b.tar.gz
Revamp placement policy for windows that are maximized when they are
2003-06-09 Rob Adams <robadams@ucla.edu> Revamp placement policy for windows that are maximized when they are mapped, including windows that set a hint to be maximized or windows that are auto-maximized using our heuristic. See #111902. * src/window.h: add new flag maximize_after_placement and new function meta_window_maximize_internal. * src/window.c (meta_window_new): initialize maximize_after_placement to FALSE and remove the automaximize heuristic. (meta_window_maximize_internal): new function accepts a saved_rect argument to be used as the new saved_rect for the window, and does not queue a move_resize. (meta_window_maximize): re-implement using meta_window_maximize_internal. (update_net_wm_state): If a window has a maximize hint set on startup set maximize_after_placement to TRUE * src/constraints.c (meta_window_constrain): Update the xinerama information in the ConstraintInfo after placing the window, and maximize the window after placement if window->maximize_after_placement * src/place.c (find_first_fit): take a natural xinerama list as an argument instead of generating it here (constrain_placement): remove function, since it is no longer needed (meta_window_place): generate the natural xinerama list here and pass it into find_first_fit. If find_first_fit fails, use the list to find empty xineramas where we can place windows that may be maximized later. This makes maximized windows follow the correct placement policy. Move the automaximize heuristic here.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h
index 2b6a8fa0..f9353d1e 100644
--- a/src/window.h
+++ b/src/window.h
@@ -94,6 +94,7 @@ struct _MetaWindow
/* Whether we're maximized */
guint maximized : 1;
+ guint maximize_after_placement : 1;
/* Whether we're shaded */
guint shaded : 1;
@@ -304,6 +305,8 @@ void meta_window_queue_calc_showing (MetaWindow *window);
void meta_window_minimize (MetaWindow *window);
void meta_window_unminimize (MetaWindow *window);
void meta_window_maximize (MetaWindow *window);
+void meta_window_maximize_internal (MetaWindow *window,
+ MetaRectangle *saved_rect);
void meta_window_unmaximize (MetaWindow *window);
void meta_window_shade (MetaWindow *window);
void meta_window_unshade (MetaWindow *window);