Bug #1483
closedgtk3.22 client - shortcut key for View menu item Show Stack Size doesn't work
0%
Description
Seen in 3_1 and Main branch, gtk4 works OK. The shortcut key is "Ctrl/Meta +".
Discovered while working on #943, where I found that gtk doesn't like the plus (or minus) key by itself for a menu shortcut key. The code from gtk3.22 menu.c -
{ "SHOW_STACK_SIZE", N_("Unit Stack Size"),
GDK_KEY_plus, ACCL_MOD_KEY,
G_CALLBACK(show_stack_size_callback), MGROUP_SAFE },
In the gtk4 menu.c the struct menu_entry_info is different, code looks like this -
{ "SHOW_STACK_SIZE", N_("Unit Stack Size"),
"show_stack_size", ACCL_MOD_KEY"plus", MGROUP_SAFE,
show_stack_size_callback, FALSE },
Files
Updated by Dean Brown 6 months ago
Interesting - not the first time encountering a Mac-only bug. I may not be able to figure it out, should get a lower priority.
Updated by Dean Brown 4 months ago
- File 1483.patch added
Updated by Dean Brown 4 months ago
In #1630, Marko commented about keyboard layouts
(in Finnish keyboard '+' and '-' do not use any modifiers)
This would account for Marko saying he cannot reproduce this one.
Updated by Marko Lindqvist 27 days ago
This patch seems to do multiple things (is not atomic, nor matching the ticket description). As far as I see ACCL_MOD_KEY is just renamed as ACCL_MOD_META with no any functional effect (and is the bulk of the patch, making it hard to see relevant part). Then new ACCL_MOD_KEY is added, but it's completely unused. The "else if" -> "if" change seems like a fix to zoom functionality on U.S. keymap. If I get it right only removal of GDK_KEY_plus and GDK_KEY_minus from the audio volume handling is related to fixing Show Stack Size.
There's also one trailing space added (doesn't 'git diff' highlight them to you?)
Updated by Marko Lindqvist 27 days ago
Oh, and I guess the GDK_CONTROL_MASK -> ACCL_MOD_MASK is there to fix zoom on Mac.
Updated by Marko Lindqvist 27 days ago
- Blocked by Feature #1717: gtk3.22 client: Add menu items to change sound volume added
Updated by Marko Lindqvist 27 days ago
Marked this blocked by #1717 as we shouldn't remove '-' and '+' from controlling audio volume before the new keys for that are in place.
Updated by Dean Brown 27 days ago
- File 1483.patch 1483.patch added
Digging into this I got so confused I decided to start over from scratch.
1. Bug seen in 3_1, 3_2, 3_3 and Main branches.
2. I had originally copied the way gtk4 code handles ACCL_MOD_KEY/ACCL_MOD_MASK but now find that's not needed.
3. New patch is much simpler, still fixes the bug.
4. Should work for all branches.
5. Yes my diff tool does not highlight trailing spaces - this has been a problem before and I will have to watch out for it going forward.
6. In S3_1 there's a gui-gtk-3.0 folder, which should theoretically also get fixed, but the meson_options.txt doesn't support a gtk3 client.
Updated by Marko Lindqvist 24 days ago
- Status changed from New to In Review
- Assignee set to Marko Lindqvist