It's weirder than that.
The "Find City" -dialog has "Aarhus" (first in the list) selected automatically, and it actually tries to center to it. "Centering to Aarhus" -problem can be repeated within the "Find City" dialog by selecting some other city (map centering correctly to that city), and then selecting "Aarhus" again (map centers to the middle of the ocean again)
The problem is not that the client would center to a wrong tile. The issue is more with the drawing code that does not redraw the screen correctly. This seems like two bugs interacting - first one would make it not to redraw many parts of the screen that would need to be redrawn, and the second one seems almost like a workaround to the first - it centers to wrong gui coordinates that it can correctly redraw.
I don't fully understand the first one - or rather, I don't see how the current code is even supposed to get the work done. If I can't figure that out, to then understand how to fix it, need to reimplement it completely.
The second one is much easier, and fix to that could be applied selectively to cases where the fix would not trigger bug 1. I think that's going to be the first step.
Reply To cazfi
The second one is much easier, and fix to that could be applied selectively to cases where the fix would not trigger bug 1. I think that's going to be the first step.
Based on that idea, fix for gtk4-client attached. It's a partial fix for client-common code + makes gtk4-client to always use that working code path.
In my testing branch, gtk4-client now sometimes sometimes goes out-of-sync of which parts of the screen get refreshed. That's almost certainly some kind of regression with current version of this patch.
Trying to reproduce #42288 on main branch gtk4-client, I notice that already when I open "Find City" -dialog to find Stockholm, map centers to the middle of the ocean. Presumably this is behavior of the "Find City" -dialog when there's no city selected yet (it doesn't know where to center, but tries anyway), and a separate bug from the 'c' -key issue of #42288