diff options
author | Elijah Newren <newren@gmail.com> | 2005-10-16 14:45:27 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-10-16 14:45:27 +0000 |
commit | 611371df45718f3bff58cf08423621ae9feaca63 (patch) | |
tree | 1b573203495646fdc3c62743127ebfe1dc033f54 | |
parent | 9b94728b7bd93def8e3725d65e2951c9d2444467 (diff) | |
download | metacity-611371df45718f3bff58cf08423621ae9feaca63.tar.gz |
The various keep-'em-onscreen constraints should only apply to normal
2005-10-16 Elijah Newren <newren@gmail.com>
* src/constraints.c:
(constrain_to_single_xinerama):
(constrain_fully_onscreen):
(constrain_partially_onscreen):
The various keep-'em-onscreen constraints should only apply to
normal windows (otherwise, docks get shoved out of their place by
their own strut)
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/constraints.c | 27 |
2 files changed, 32 insertions, 5 deletions
@@ -1,5 +1,15 @@ 2005-10-16 Elijah Newren <newren@gmail.com> + * src/constraints.c: + (constrain_to_single_xinerama): + (constrain_fully_onscreen): + (constrain_partially_onscreen): + The various keep-'em-onscreen constraints should only apply to + normal windows (otherwise, docks get shoved out of their place by + their own strut) + +2005-10-16 Elijah Newren <newren@gmail.com> + * src/window.c: (meta_window_new_with_attrs): (meta_window_apply_session_info): diff --git a/src/constraints.c b/src/constraints.c index 535da64c..eed8f6cc 100644 --- a/src/constraints.c +++ b/src/constraints.c @@ -1247,8 +1247,14 @@ constrain_to_single_xinerama (MetaWindow *window, if (priority > PRIORITY_ENTIRELY_VISIBLE_ON_SINGLE_XINERAMA) return TRUE; - /* Exit early if we know the constraint won't apply */ - if (!window->require_on_single_xinerama || info->is_user_action) + /* Exit early if we know the constraint won't apply--note that this constraint + * is only meant for normal windows (e.g. we don't want docks to be shoved + * "onscreen" by their own strut). + */ + if (window->type == META_WINDOW_DESKTOP || + window->type == META_WINDOW_DOCK || + !window->require_on_single_xinerama || + info->is_user_action) return TRUE; /* Have a helper function handle the constraint for us */ @@ -1280,8 +1286,13 @@ constrain_fully_onscreen (MetaWindow *window, if (priority > PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA) return TRUE; - /* Exit early if we know the constraint won't apply */ - if (!window->require_fully_onscreen || + /* Exit early if we know the constraint won't apply--note that this constraint + * is only meant for normal windows (e.g. we don't want docks to be shoved + * "onscreen" by their own strut). + */ + if (window->type == META_WINDOW_DESKTOP || + window->type == META_WINDOW_DOCK || + !window->require_fully_onscreen || (info->is_user_action && info->action_type != ACTION_RESIZE)) return TRUE; @@ -1308,7 +1319,13 @@ constrain_partially_onscreen (MetaWindow *window, if (priority > PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA) return TRUE; - /* No special reasons, other than possibly priority, for this not applying */ + /* Exit early if we know the constraint won't apply--note that this constraint + * is only meant for normal windows (e.g. we don't want docks to be shoved + * "onscreen" by their own strut). + */ + if (window->type == META_WINDOW_DESKTOP || + window->type == META_WINDOW_DOCK) + return TRUE; /* Determine how much offscreen things are allowed. We first need to * figure out how much must remain on the screen. For that, we use 25% |