News:

SimuTranslator
Make Simutrans speak your language.

Mysterious mouse offset bug

Started by Ters, January 05, 2014, 11:20:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ters

I just experienced an odd bug where the mouse clicks didn't happen where there were supposed to. When I clicked the maximize button, the click was registered on the fast forward button, which was below. When I tried to close the window, it triggered help. The really odd thing is that the maximize and close buttons are part of the non-client area, so mouse events there should be reported to the game in a completely different manner than inside the client area where the game (toolbars, maps and everything Simutrans) is.

I have only observed the bug once, after I had just been doing some stepping in the debugger. I have not been able to reproduce it when running the game normally, so it's possible that the debugging messed things up. The bug might be in SDL or Windows. I see no point in investigating this bug further, unless it reoccurs under more normal circumstances. This is just an information of possible wrong behaviour, in case someone else runs into it.

whoami

I often have the problem that mouse clicks (e.g. with the query tool) have no effect (which may be due to application to the wrong tile) when I have zoomed out by a few steps. This is with ST rev. ~7000 Win-SDL and Pak128.Britain.

Ters

At the time, I had unintentionally zoomed in a bit, but was unable to zoom back out. (The window was too small to show the zoom buttons, I didn't have a mouse with scroll wheel attached to my laptop, so I had troubles both zooming back to normal and quitting the application the normal way.) Couldn't reproduce it when I tried zooming in later on, but it might still be a factor.