Merge lp:~wingpanel-devs/gala/gala-fix-keybinding into lp:gala

Proposed by Marcus Wichelmann
Status: Rejected
Rejected by: Zisu Andrei
Proposed branch: lp:~wingpanel-devs/gala/gala-fix-keybinding
Merge into: lp:gala
Diff against target: 20 lines (+9/-1)
1 file modified
src/WindowManager.vala (+9/-1)
To merge this branch: bzr merge lp:~wingpanel-devs/gala/gala-fix-keybinding
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Disapprove
Review via email: mp+282853@code.launchpad.net

Description of the change

Fixes slingshot reopening very fast when holding super+space pressed too long.

This branch checks the time difference since the last KEY_PRESS event. If somebody has an idea how to solve this cleaner I would be happy to update this branch.

To post a comment you must log in.
Revision history for this message
Zisu Andrei (matzipan) wrote :

A better approach would've been to use a key-press (key-down) event for debouncing. Not sure Mutter allows that.

Revision history for this message
Zisu Andrei (matzipan) wrote :

I don't particularly like this since it's hardcoded. Maybe we can find a better way which listens to slingshot being launched.

review: Disapprove

Unmerged revisions

503. By Marcus Wichelmann

Check timeout before reexecuting the main-menu keybinding

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/WindowManager.vala'
2--- src/WindowManager.vala 2015-12-05 21:41:25 +0000
3+++ src/WindowManager.vala 2016-01-16 18:36:40 +0000
4@@ -166,7 +166,15 @@
5 } catch (Error e) { warning (e.message); }
6 });
7
8- KeyBinding.set_custom_handler ("panel-main-menu", () => {
9+ uint last_main_menu_event_time = 0;
10+
11+ KeyBinding.set_custom_handler ("panel-main-menu", (display, screen, window, event, binding) => {
12+ if (event.time - last_main_menu_event_time < 500) {
13+ return;
14+ }
15+
16+ last_main_menu_event_time = event.time;
17+
18 try {
19 Process.spawn_command_line_async (
20 BehaviorSettings.get_default ().panel_main_menu_action);

Subscribers

People subscribed via source and target branches