diff --git a/ChangeLog b/ChangeLog index 3f75d32b2..3a6f09353 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-09 Havoc Pennington + + * src/place.c (meta_window_place): don't run constrain_placement + on windows we allow to go anywhere (docks, etc.). Fixes + positioning of panel windows in certain cases. + 2002-06-09 Havoc Pennington * src/frames.c (meta_frames_button_press_event): don't raise/focus diff --git a/src/place.c b/src/place.c index b3aaac6bc..1a261c109 100644 --- a/src/place.c +++ b/src/place.c @@ -257,6 +257,27 @@ meta_window_place (MetaWindow *window, meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc); + 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_no_constraints; + break; + } + if (meta_prefs_get_disable_workarounds ()) { switch (window->type) @@ -291,7 +312,7 @@ meta_window_place (MetaWindow *window, { meta_topic (META_DEBUG_PLACEMENT, "Not placing non-normal non-dialog window with PPosition set\n"); - goto done; + goto done_no_constraints; } break; } @@ -305,30 +326,9 @@ meta_window_place (MetaWindow *window, { meta_topic (META_DEBUG_PLACEMENT, "Not placing window with PPosition or USPosition set\n"); - goto done; + goto done_no_constraints; } } - - 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) && @@ -440,7 +440,8 @@ meta_window_place (MetaWindow *window, done: constrain_placement (window, fgeom, x, y, &x, &y); - + + done_no_constraints: *new_x = x; *new_y = y; } diff --git a/src/window.c b/src/window.c index 1a7373571..299e97dd1 100644 --- a/src/window.c +++ b/src/window.c @@ -5108,12 +5108,12 @@ constrain_size (MetaWindow *window, } static void -constrain_position (MetaWindow *window, +constrain_position (MetaWindow *window, MetaFrameGeometry *fgeom, - int x, - int y, - int *new_x, - int *new_y) + int x, + int y, + int *new_x, + int *new_y) { /* frame member variables should NEVER be used in here, only * MetaFrameGeometry