Project

General

Profile

Actions

Bug #1483

closed

gtk3.22 client - shortcut key for View menu item Show Stack Size doesn't work

Added by Dean Brown 6 months ago. Updated 4 days ago.

Status:
Closed
Priority:
Normal
Category:
gtk3.22-client
Target version:
Start date:
06/04/2025
Due date:
% Done:

0%

Estimated time:

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

1483.patch (1.46 KB) 1483.patch Dean Brown, 11/10/2025 06:36 AM

Related issues 1 (0 open1 closed)

Blocked by Feature #1717: gtk3.22 client: Add menu items to change sound volumeClosedMarko Lindqvist10/27/2025

Actions
Actions #1

Updated by Marko Lindqvist 6 months ago

Cannot reproduce - works here.

Actions #2

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.

Actions #3

Updated by Dean Brown 4 months ago

  • File 1483.patch added

OK, figured it out. Patch OK for all branches, and does not conflict with #943, although they both deal with the GDK_KEY_plus key.

I did find another different but unrelated problem with the GDK_KEY_plus key affecting sound volume. Opened #1630.

Actions #4

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.

Actions #5

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?)

Actions #6

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.

Actions #7

Updated by Marko Lindqvist 27 days ago

  • Blocked by Feature #1717: gtk3.22 client: Add menu items to change sound volume added
Actions #8

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.

Actions #9

Updated by Dean Brown 27 days ago

  • File deleted (1483.patch)
Actions #10

Updated by Dean Brown 27 days ago

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.

Actions #11

Updated by Marko Lindqvist 27 days ago

  • Target version set to 3.2.2

As the dependency #1717 is not going to S3_1, neither can this. (I don't want to even start thinking consequences of porting also #1717 - S3_1 is just weeks away from EOL anyway)

Actions #12

Updated by Marko Lindqvist 24 days ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
Actions #13

Updated by Marko Lindqvist 4 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF