summaryrefslogtreecommitdiff
path: root/src/stack.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-05-29 03:11:24 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-05-29 03:11:24 +0000
commit0498d55314582293a72c7edf8b33b8f362340456 (patch)
tree83a78d7d4864e21f17a83b4d8cbb7f92a7837a87 /src/stack.c
parent4b5eda0b0a6735190de70626d078adf696dae46b (diff)
downloadmetacity-0498d55314582293a72c7edf8b33b8f362340456.tar.gz
metacity-0498d55314582293a72c7edf8b33b8f362340456.tar.bz2
Patch from Erwann Chenede for raise_or_lower keybinding
2002-05-28 Havoc Pennington <hp@pobox.com> Patch from Erwann Chenede for raise_or_lower keybinding * src/display.c, src/common.h: POINT_IN_RECT moved to a common location, removed from here (meta_rectangle_intersect): move here and make it public * src/prefs.c: add raise_or_lower keybinding * src/stack.c (meta_stack_get_below, meta_stack_get_above): add an arg to only get windows within the same layer * src/keybindings.c (handle_raise_or_lower): add handling for a "raise window if obscured, else lower" keybinding
Diffstat (limited to 'src/stack.c')
-rw-r--r--src/stack.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/stack.c b/src/stack.c
index 6222bdd..b0926e4 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -938,7 +938,8 @@ meta_stack_get_bottom (MetaStack *stack)
MetaWindow*
meta_stack_get_above (MetaStack *stack,
- MetaWindow *window)
+ MetaWindow *window,
+ gboolean only_within_layer)
{
GList *link;
@@ -951,13 +952,16 @@ meta_stack_get_above (MetaStack *stack,
if (link->prev)
return link->prev->data;
+ else if (only_within_layer)
+ return NULL;
else
return find_next_above_layer (stack, window->layer);
}
MetaWindow*
meta_stack_get_below (MetaStack *stack,
- MetaWindow *window)
+ MetaWindow *window,
+ gboolean only_within_layer)
{
GList *link;
@@ -970,6 +974,8 @@ meta_stack_get_below (MetaStack *stack,
if (link->next)
return link->next->data;
+ else if (only_within_layer)
+ return NULL;
else
return find_prev_below_layer (stack, window->layer);
}