mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
if we maximize after placement, and the window is too big to fix in the
2004-01-12 Rob Adams <readams@readams.net> * src/constraints.c (meta_window_constrain): if we maximize after placement, and the window is too big to fix in the work area, define a sane saved_rect approximately with dimensions three-quarters approximately three quarters the size of the work area. This avoids the problem where large windows would unmaximize and actually get bigger. See #93590.
This commit is contained in:
parent
a605da04c1
commit
1b7a651a33
@ -1,3 +1,12 @@
|
|||||||
|
2004-01-12 Rob Adams <readams@readams.net>
|
||||||
|
|
||||||
|
* src/constraints.c (meta_window_constrain): if we maximize after
|
||||||
|
placement, and the window is too big to fix in the work area,
|
||||||
|
define a sane saved_rect approximately with dimensions
|
||||||
|
three-quarters approximately three quarters the size of the work
|
||||||
|
area. This avoids the problem where large windows would
|
||||||
|
unmaximize and actually get bigger. See #93590.
|
||||||
|
|
||||||
2004-01-09 Thomas Fitzsimmons <fitzsim@redhat.com>
|
2004-01-09 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
|
Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
|
||||||
|
@ -1319,6 +1319,19 @@ meta_window_constrain (MetaWindow *window,
|
|||||||
(window->placed || did_placement))
|
(window->placed || did_placement))
|
||||||
{
|
{
|
||||||
window->maximize_after_placement = FALSE;
|
window->maximize_after_placement = FALSE;
|
||||||
|
|
||||||
|
if (OUTER_WIDTH (*new) >= info.work_area_xinerama.width &&
|
||||||
|
OUTER_HEIGHT (*new) >= info.work_area_xinerama.height)
|
||||||
|
{
|
||||||
|
/* define a sane saved_rect so that the user can unmaximize
|
||||||
|
* to something reasonable.
|
||||||
|
*/
|
||||||
|
new->width = .75 * info.work_area_xinerama.width;
|
||||||
|
new->height = .75 * info.work_area_xinerama.height;
|
||||||
|
new->x = info.work_area_xinerama.x + .125 * info.work_area_xinerama.width;
|
||||||
|
new->y = info.work_area_xinerama.y + .083 * info.work_area_xinerama.height;
|
||||||
|
}
|
||||||
|
|
||||||
meta_window_maximize_internal (window, new);
|
meta_window_maximize_internal (window, new);
|
||||||
|
|
||||||
/* maximization may have changed frame geometry */
|
/* maximization may have changed frame geometry */
|
||||||
|
Loading…
Reference in New Issue
Block a user