mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
don't run constrain_placement on windows we allow to go anywhere (docks,
2002-06-09 Havoc Pennington <hp@pobox.com> * 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.
This commit is contained in:
parent
9bad861649
commit
8057a2f68a
@ -1,3 +1,9 @@
|
||||
2002-06-09 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* 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 <hp@pobox.com>
|
||||
|
||||
* src/frames.c (meta_frames_button_press_event): don't raise/focus
|
||||
|
47
src/place.c
47
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,31 +326,10 @@ 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) &&
|
||||
window->xtransient_for != None)
|
||||
@ -441,6 +441,7 @@ meta_window_place (MetaWindow *window,
|
||||
done:
|
||||
constrain_placement (window, fgeom, x, y, &x, &y);
|
||||
|
||||
done_no_constraints:
|
||||
*new_x = x;
|
||||
*new_y = y;
|
||||
}
|
||||
|
10
src/window.c
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user