After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683963 - Doesn't quit with Ctrl+Q
Doesn't quit with Ctrl+Q
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.5.x (unsupported)
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-13 15:20 UTC by Cosimo Cecchi
Modified: 2016-03-31 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't pass Ctrl/Alt keys to search entry (1.34 KB, patch)
2012-09-28 09:03 UTC, Alexander Larsson
committed Details | Review
Add Ctrl-Q keyboard shortcut (1022 bytes, patch)
2012-09-28 09:03 UTC, Alexander Larsson
committed Details | Review

Description Cosimo Cecchi 2012-09-13 15:20:14 UTC
Boxes doesn't seem to quit on Ctrl+Q. I think it should, for consistency with other GNOME applications.
Comment 1 Alexander Larsson 2012-09-28 09:03:49 UTC
Created attachment 225323 [details] [review]
Don't pass Ctrl/Alt keys to search entry

These mean nothing to the entry in general, but do override
any possibility of handling such events as keyboard accelerators
up the widget hierarchy.
Comment 2 Alexander Larsson 2012-09-28 09:03:52 UTC
Created attachment 225324 [details] [review]
Add Ctrl-Q keyboard shortcut

We can't use accelerators for this as they would override the
VM keyboard input, so we handle this in the GtkWindow key-pressed
handler.
Comment 3 Christophe Fergeau 2012-09-28 09:54:36 UTC
Review of attachment 225323 [details] [review]:

At first I was a bit worried about ctrl+a/ctrl+c/ctrl+v not working in the entry, but this filtering is only done on the unfocused search entry, once it is focused it gets all the filtered keys as usual.
Comment 4 Christophe Fergeau 2012-09-28 11:44:54 UTC
Review of attachment 225324 [details] [review]:

::: src/app.vala
@@ +673,3 @@
                selection_mode = false;
+        } else if (event.keyval == Gdk.Key.q &&
+                   (event.state & Gdk.ModifierType.CONTROL_MASK) != 0) {

This will also match ctrl+alt+q or any such combination. GNOME Documents also exits in these situations, but gedit does not. I'd go with ((event.state & Gdk.ModifierType.MODIFIER_MASK) == Gdk.ModifierType.CONTROL_MASK) instead
Comment 5 Alexander Larsson 2012-09-28 11:59:52 UTC
pushed with fix for comment #4.
Comment 6 Alexander Larsson 2012-10-01 08:12:44 UTC
Attachment 225323 [details] pushed as 62747ca - Don't pass Ctrl/Alt keys to search entry
Attachment 225324 [details] pushed as 4c51d6e - Add Ctrl-Q keyboard shortcut