diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/place.c | 21 | ||||
-rw-r--r-- | src/window.c | 8 |
3 files changed, 39 insertions, 3 deletions
@@ -1,5 +1,18 @@ 2002-06-08 Havoc Pennington <hp@pobox.com> + Yeah I know maximization is broken, I'm too tired to fix it. + Probably because of the change to update_struts() that was + supposed to fix the 100% CPU bug. + + * src/place.c (meta_window_place): don't run docks and things + through the placement algorithm. Thought it might fix + metacity-window-demo but it didn't. + + * src/window.c (constrain_size): only get work area when needed + (meta_window_new): init the do_not_cover field + +2002-06-08 Havoc Pennington <hp@pobox.com> + * src/screen.c (meta_screen_get_xinerama_for_window): short-circuit the "only one xinerama" case, and use outer rect of window instead of window->rect, so we get root window coords. diff --git a/src/place.c b/src/place.c index f8ea82b4..b3aaac6b 100644 --- a/src/place.c +++ b/src/place.c @@ -308,6 +308,27 @@ meta_window_place (MetaWindow *window, goto done; } } + + switch (window->type) + { + /* Run placement algorithm on these. */ + case META_WINDOW_NORMAL: + case META_WINDOW_DIALOG: + case META_WINDOW_MODAL_DIALOG: + case META_WINDOW_SPLASHSCREEN: + break; + + /* Assume the app knows best how to place these, no placement + * algorithm ever (other than "leave them as-is") + */ + case META_WINDOW_DESKTOP: + case META_WINDOW_DOCK: + case META_WINDOW_TOOLBAR: + case META_WINDOW_MENU: + case META_WINDOW_UTILITY: + goto done; + break; + } if ((window->type == META_WINDOW_DIALOG || window->type == META_WINDOW_MODAL_DIALOG) && diff --git a/src/window.c b/src/window.c index d9a238a7..1a737357 100644 --- a/src/window.c +++ b/src/window.c @@ -400,6 +400,7 @@ meta_window_new (MetaDisplay *display, Window xwindow, window->type_atom = None; window->has_struts = FALSE; + window->do_not_cover = FALSE; window->left_strut = 0; window->right_strut = 0; window->top_strut = 0; @@ -4977,13 +4978,10 @@ constrain_size (MetaWindow *window, int delta; double min_aspect, max_aspect; int minw, minh, maxw, maxh, fullw, fullh; - MetaRectangle work_area; /* frame member variables should NEVER be used in here */ #define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) ) - - meta_window_get_work_area (window, TRUE, &work_area); /* Get the allowed size ranges, considering maximized, etc. */ if (window->fullscreen) @@ -5006,6 +5004,10 @@ constrain_size (MetaWindow *window, } else { + MetaRectangle work_area; + + meta_window_get_work_area (window, TRUE, &work_area); + fullw = work_area.width; fullh = work_area.height; } |