mirror of
https://github.com/elementary/gala.git
synced 2024-11-24 04:21:04 +03:00
Fix some issues and codestyle
This commit is contained in:
parent
d62757998e
commit
8540d25388
@ -207,8 +207,7 @@ namespace Gala
|
||||
bool keybinding_filter (KeyBinding binding)
|
||||
{
|
||||
var name = binding.get_name ();
|
||||
return name != "expose-windows"
|
||||
&& name != "expose-all-windows";
|
||||
return (name != "expose-windows" && name != "expose-all-windows");
|
||||
}
|
||||
|
||||
void restack_windows (Screen screen)
|
||||
|
@ -451,7 +451,7 @@ namespace Gala
|
||||
modal_stack.offer_head (proxy);
|
||||
|
||||
// modal already active
|
||||
if (modal_stack.size > 2)
|
||||
if (modal_stack.size >= 2)
|
||||
return proxy;
|
||||
|
||||
var screen = get_screen ();
|
||||
@ -479,7 +479,7 @@ namespace Gala
|
||||
return;
|
||||
}
|
||||
|
||||
if (modal_stack.size > 0)
|
||||
if (is_modal ())
|
||||
return;
|
||||
|
||||
update_input_area ();
|
||||
@ -495,7 +495,7 @@ namespace Gala
|
||||
*/
|
||||
public bool is_modal ()
|
||||
{
|
||||
return modal_stack.size > 0;
|
||||
return (modal_stack.size > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -503,7 +503,7 @@ namespace Gala
|
||||
*/
|
||||
public bool modal_proxy_valid (ModalProxy proxy)
|
||||
{
|
||||
return proxy in modal_stack;
|
||||
return (proxy in modal_stack);
|
||||
}
|
||||
|
||||
public void get_current_cursor_position (out int x, out int y)
|
||||
@ -1238,11 +1238,14 @@ namespace Gala
|
||||
|
||||
public override bool keybinding_filter (Meta.KeyBinding binding)
|
||||
{
|
||||
if (!is_modal ())
|
||||
return false;
|
||||
|
||||
var modal_proxy = modal_stack.peek_head ();
|
||||
|
||||
return is_modal ()
|
||||
return (modal_proxy != null
|
||||
&& modal_proxy.keybinding_filter != null
|
||||
&& modal_proxy.keybinding_filter (binding);
|
||||
&& modal_proxy.keybinding_filter (binding));
|
||||
}
|
||||
|
||||
#if HAS_MUTTER310
|
||||
|
Loading…
Reference in New Issue
Block a user