mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Fix some broken indentation and simplify nested if()s
http://bugzilla.gnome.org/show_bug.cgi?id=580917
This commit is contained in:
parent
7e369d63b3
commit
f55509aadd
@ -3020,8 +3020,9 @@ do_choose_window (MetaDisplay *display,
|
||||
"Initially selecting window %s\n",
|
||||
initial_selection ? initial_selection->desc : "(none)");
|
||||
|
||||
if (initial_selection != NULL)
|
||||
{
|
||||
if (initial_selection == NULL)
|
||||
return;
|
||||
|
||||
if (binding->mask == 0)
|
||||
{
|
||||
/* If no modifiers, we can't do the "hold down modifier to keep
|
||||
@ -3033,10 +3034,16 @@ do_choose_window (MetaDisplay *display,
|
||||
initial_selection->desc);
|
||||
display->mouse_mode = FALSE;
|
||||
meta_window_activate (initial_selection, event->xkey.time);
|
||||
return;
|
||||
}
|
||||
else if (!meta_prefs_get_no_tab_popup ())
|
||||
|
||||
if (meta_prefs_get_no_tab_popup ())
|
||||
{
|
||||
if (meta_display_begin_grab_op (display,
|
||||
/* FIXME? Shouldn't this be merged with the previous case? */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!meta_display_begin_grab_op (display,
|
||||
screen,
|
||||
NULL,
|
||||
show_popup ?
|
||||
@ -3048,13 +3055,13 @@ do_choose_window (MetaDisplay *display,
|
||||
binding->mask,
|
||||
event->xkey.time,
|
||||
0, 0))
|
||||
return;
|
||||
|
||||
if (!primary_modifier_still_pressed (display, binding->mask))
|
||||
{
|
||||
if (!primary_modifier_still_pressed (display,
|
||||
binding->mask))
|
||||
{
|
||||
/* This handles a race where modifier might be released
|
||||
* before we establish the grab. must end grab
|
||||
* prior to trying to focus a window.
|
||||
/* This handles a race where modifier might be released before
|
||||
* we establish the grab. must end grab prior to trying to focus
|
||||
* a window.
|
||||
*/
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Ending grab, activating %s, and turning off "
|
||||
@ -3064,9 +3071,9 @@ do_choose_window (MetaDisplay *display,
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
display->mouse_mode = FALSE;
|
||||
meta_window_activate (initial_selection, event->xkey.time);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
meta_ui_tab_popup_select (screen->tab_popup,
|
||||
(MetaTabEntryKey) initial_selection->xwindow);
|
||||
|
||||
@ -3080,10 +3087,6 @@ do_choose_window (MetaDisplay *display,
|
||||
meta_window_unminimize (initial_selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_switch (MetaDisplay *display,
|
||||
@ -3408,6 +3411,8 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
{
|
||||
gint motion = binding->handler->data;
|
||||
unsigned int grab_mask;
|
||||
MetaWorkspace *next;
|
||||
gboolean grabbed_before_release;
|
||||
|
||||
g_assert (motion < 0);
|
||||
|
||||
@ -3417,7 +3422,7 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
/* FIXME should we use binding->mask ? */
|
||||
grab_mask = event->xkey.state & ~(display->ignored_modifier_mask);
|
||||
|
||||
if (meta_display_begin_grab_op (display,
|
||||
if (!meta_display_begin_grab_op (display,
|
||||
screen,
|
||||
NULL,
|
||||
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
||||
@ -3427,17 +3432,14 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
grab_mask,
|
||||
event->xkey.time,
|
||||
0, 0))
|
||||
{
|
||||
MetaWorkspace *next;
|
||||
gboolean grabbed_before_release;
|
||||
return;
|
||||
|
||||
next = meta_workspace_get_neighbor (screen->active_workspace, motion);
|
||||
g_assert (next);
|
||||
|
||||
grabbed_before_release = primary_modifier_still_pressed (display, grab_mask);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Activating target workspace\n");
|
||||
meta_topic (META_DEBUG_KEYBINDINGS, "Activating target workspace\n");
|
||||
|
||||
if (!grabbed_before_release)
|
||||
{
|
||||
@ -3459,7 +3461,6 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_set_spew_mark (MetaDisplay *display,
|
||||
|
Loading…
Reference in New Issue
Block a user