stack-tracker: Fix coding style of meta_stack_op_apply()

Change tabs to spaces, clean up variable declarations.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1300
This commit is contained in:
Jonas Ådahl 2020-06-09 19:07:47 +02:00 committed by Georges Basile Stavracas Neto
parent 268336c21a
commit 74c0d9140c

View File

@ -372,11 +372,13 @@ meta_stack_op_apply (MetaStackTracker *tracker,
{ {
case STACK_OP_ADD: case STACK_OP_ADD:
{ {
int old_pos;
if (META_STACK_ID_IS_X11 (op->add.window) && if (META_STACK_ID_IS_X11 (op->add.window) &&
(apply_flags & NO_RESTACK_X_WINDOWS) != 0) (apply_flags & NO_RESTACK_X_WINDOWS) != 0)
return FALSE; return FALSE;
int old_pos = find_window (stack, op->add.window); old_pos = find_window (stack, op->add.window);
if (old_pos >= 0) if (old_pos >= 0)
{ {
g_warning ("STACK_OP_ADD: window %s already in stack", g_warning ("STACK_OP_ADD: window %s already in stack",
@ -389,11 +391,13 @@ meta_stack_op_apply (MetaStackTracker *tracker,
} }
case STACK_OP_REMOVE: case STACK_OP_REMOVE:
{ {
int old_pos;
if (META_STACK_ID_IS_X11 (op->remove.window) && if (META_STACK_ID_IS_X11 (op->remove.window) &&
(apply_flags & NO_RESTACK_X_WINDOWS) != 0) (apply_flags & NO_RESTACK_X_WINDOWS) != 0)
return FALSE; return FALSE;
int old_pos = find_window (stack, op->remove.window); old_pos = find_window (stack, op->remove.window);
if (old_pos < 0) if (old_pos < 0)
{ {
g_warning ("STACK_OP_REMOVE: window %s not in stack", g_warning ("STACK_OP_REMOVE: window %s not in stack",
@ -406,8 +410,10 @@ meta_stack_op_apply (MetaStackTracker *tracker,
} }
case STACK_OP_RAISE_ABOVE: case STACK_OP_RAISE_ABOVE:
{ {
int old_pos = find_window (stack, op->raise_above.window); int old_pos;
int above_pos; int above_pos;
old_pos = find_window (stack, op->raise_above.window);
if (old_pos < 0) if (old_pos < 0)
{ {
g_warning ("STACK_OP_RAISE_ABOVE: window %s not in stack", g_warning ("STACK_OP_RAISE_ABOVE: window %s not in stack",
@ -435,8 +441,10 @@ meta_stack_op_apply (MetaStackTracker *tracker,
} }
case STACK_OP_LOWER_BELOW: case STACK_OP_LOWER_BELOW:
{ {
int old_pos = find_window (stack, op->lower_below.window); int old_pos;
int above_pos; int above_pos;
old_pos = find_window (stack, op->raise_above.window);
if (old_pos < 0) if (old_pos < 0)
{ {
g_warning ("STACK_OP_LOWER_BELOW: window %s not in stack", g_warning ("STACK_OP_LOWER_BELOW: window %s not in stack",
@ -446,7 +454,9 @@ meta_stack_op_apply (MetaStackTracker *tracker,
if (op->lower_below.sibling) if (op->lower_below.sibling)
{ {
int below_pos = find_window (stack, op->lower_below.sibling); int below_pos;
below_pos = find_window (stack, op->lower_below.sibling);
if (below_pos < 0) if (below_pos < 0)
{ {
g_warning ("STACK_OP_LOWER_BELOW: sibling window %s not in stack", g_warning ("STACK_OP_LOWER_BELOW: sibling window %s not in stack",