mirror of
https://github.com/elementary/gala.git
synced 2024-11-26 23:05:09 +03:00
Ignore autorepeat for some keybindings (#1583)
Co-authored-by: Danielle Foré <danielle@elementary.io>
This commit is contained in:
parent
9bffcdc179
commit
aebe2d5139
@ -20,6 +20,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</description>
|
</description>
|
||||||
<issues>
|
<issues>
|
||||||
|
<issue url="https://github.com/elementary/gala/issues/913">Holding on keyboard shortcut to activate the action only once</issue>
|
||||||
<issue url="https://github.com/elementary/gala/issues/1229">Notification bubble appears in wrong corner on one workspace</issue>
|
<issue url="https://github.com/elementary/gala/issues/1229">Notification bubble appears in wrong corner on one workspace</issue>
|
||||||
<issue url="https://github.com/elementary/gala/issues/1578">Closing a window in multitasking view closes multitasking view</issue>
|
<issue url="https://github.com/elementary/gala/issues/1578">Closing a window in multitasking view closes multitasking view</issue>
|
||||||
</issues>
|
</issues>
|
||||||
|
@ -36,7 +36,7 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
|
|||||||
var display = wm.get_display ();
|
var display = wm.get_display ();
|
||||||
var settings = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
var settings = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
||||||
|
|
||||||
display.add_keybinding ("pip", settings, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) on_initiate);
|
display.add_keybinding ("pip", settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) on_initiate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void destroy () {
|
public override void destroy () {
|
||||||
|
@ -243,20 +243,20 @@ namespace Gala {
|
|||||||
/*keybindings*/
|
/*keybindings*/
|
||||||
var keybinding_settings = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
var keybinding_settings = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
||||||
|
|
||||||
display.add_keybinding ("switch-to-workspace-first", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_switch_to_workspace_end);
|
display.add_keybinding ("switch-to-workspace-first", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_switch_to_workspace_end);
|
||||||
display.add_keybinding ("switch-to-workspace-last", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_switch_to_workspace_end);
|
display.add_keybinding ("switch-to-workspace-last", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_switch_to_workspace_end);
|
||||||
display.add_keybinding ("move-to-workspace-first", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_move_to_workspace_end);
|
display.add_keybinding ("move-to-workspace-first", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_move_to_workspace_end);
|
||||||
display.add_keybinding ("move-to-workspace-last", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_move_to_workspace_end);
|
display.add_keybinding ("move-to-workspace-last", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_move_to_workspace_end);
|
||||||
display.add_keybinding ("cycle-workspaces-next", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_cycle_workspaces);
|
display.add_keybinding ("cycle-workspaces-next", keybinding_settings, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) handle_cycle_workspaces);
|
||||||
display.add_keybinding ("cycle-workspaces-previous", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_cycle_workspaces);
|
display.add_keybinding ("cycle-workspaces-previous", keybinding_settings, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) handle_cycle_workspaces);
|
||||||
display.add_keybinding ("panel-main-menu", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_applications_menu);
|
display.add_keybinding ("panel-main-menu", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_applications_menu);
|
||||||
|
|
||||||
display.add_keybinding ("screenshot", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
display.add_keybinding ("window-screenshot", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("window-screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
display.add_keybinding ("area-screenshot", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("area-screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
display.add_keybinding ("screenshot-clip", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("screenshot-clip", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
display.add_keybinding ("window-screenshot-clip", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("window-screenshot-clip", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
display.add_keybinding ("area-screenshot-clip", keybinding_settings, 0, (Meta.KeyHandlerFunc) handle_screenshot);
|
display.add_keybinding ("area-screenshot-clip", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot);
|
||||||
|
|
||||||
display.overlay_key.connect (() => {
|
display.overlay_key.connect (() => {
|
||||||
launch_action ("overlay-action");
|
launch_action ("overlay-action");
|
||||||
@ -328,16 +328,17 @@ namespace Gala {
|
|||||||
ui_group.add_child ((Clutter.Actor) window_overview);
|
ui_group.add_child ((Clutter.Actor) window_overview);
|
||||||
}
|
}
|
||||||
|
|
||||||
display.add_keybinding ("expose-windows", keybinding_settings, 0, () => {
|
display.add_keybinding ("expose-windows", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, () => {
|
||||||
if (window_overview.is_opened ())
|
if (window_overview.is_opened ()) {
|
||||||
window_overview.close ();
|
window_overview.close ();
|
||||||
else
|
} else {
|
||||||
window_overview.open ();
|
window_overview.open ();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
display.add_keybinding ("expose-all-windows", keybinding_settings, 0, () => {
|
display.add_keybinding ("expose-all-windows", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, () => {
|
||||||
if (window_overview.is_opened ())
|
if (window_overview.is_opened ()) {
|
||||||
window_overview.close ();
|
window_overview.close ();
|
||||||
else {
|
} else {
|
||||||
var hints = new HashTable<string,Variant> (str_hash, str_equal);
|
var hints = new HashTable<string,Variant> (str_hash, str_equal);
|
||||||
hints.@set ("all-windows", true);
|
hints.@set ("all-windows", true);
|
||||||
window_overview.open (hints);
|
window_overview.open (hints);
|
||||||
|
@ -26,8 +26,8 @@ public class Gala.Zoom : Object {
|
|||||||
var display = wm.get_display ();
|
var display = wm.get_display ();
|
||||||
var schema = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
var schema = new GLib.Settings (Config.SCHEMA + ".keybindings");
|
||||||
|
|
||||||
display.add_keybinding ("zoom-in", schema, 0, (Meta.KeyHandlerFunc) zoom_in);
|
display.add_keybinding ("zoom-in", schema, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) zoom_in);
|
||||||
display.add_keybinding ("zoom-out", schema, 0, (Meta.KeyHandlerFunc) zoom_out);
|
display.add_keybinding ("zoom-out", schema, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) zoom_out);
|
||||||
|
|
||||||
gesture_tracker = new GestureTracker (ANIMATION_DURATION, ANIMATION_DURATION);
|
gesture_tracker = new GestureTracker (ANIMATION_DURATION, ANIMATION_DURATION);
|
||||||
gesture_tracker.enable_touchpad ();
|
gesture_tracker.enable_touchpad ();
|
||||||
|
Loading…
Reference in New Issue
Block a user