windows 7 64 bit
trunk
wx304
TDM-GCC 5.1
steps to reproduce:
1) Open codeblocks
2) File->Open with hex editor
3) Open file A
4) File->Open wiht hex editor
5) Open file B
6) Activate Tab of file B
7) Move mouse from the tabs to the editor up and down. This will focus the tab of file A. No clicking, just moving the mouse from the editor window to the tab window. I am not quite sure what movements are needed to trigger this.
This only happens with the hex editor tabs, not with normal tabs
It will always focus the first hex editor tab
This happens to me for a couple of years now, but also with normal editor tabs: Hovering over the tabs causes a tab to be selected.
I can't reproduce reliably, and lately it seems to be gone. Maybe the change to wxWidgets 3.1.1 has cured it.
I think this is by design...
I hope not, because it is unusable with this bug. Every time you klick on one file tab, move the mouse to the editor it opens the first tab. You can basically not select the wanted tab. I don't know where to start the search.. i will try wx31 and see if it is fixed...
Let me know if you find something.
There is code specifically to do focus follow mouse on windows in the cbAuiNotebook if I remember correctly.
I tried now with wx310 and the bug is still present...
this is a backtrace of the manifestation of this bug:
no codeblocks function involved... Does someone know how i get the source of send events?
The fired event is a WM_SETFOCUS event...
Last edit: bluehazzard 2018-09-19
Inspect the source of our direved auibook class and disable anything related to focusing to see if this goes away.
Ok, if i deactivate this events wxEVT_ENTER_WINDOW, and wxEVT_LEAVE_WINDOW of cbAuiBook the bug does not happen. But it also deactivates the scrolling of the tabs with the mousewheel.
The error is in
void cbAuiNotebook::StoreFocus()and the usedwxWindow::FindFocus()function, what returns a wrong window. As far as i can tell for HexEditor tabs, it always returns the first availible HexEditor tab. I have no idea why... I will try to compare cbEditor and HexEditor classes and look if they do something different...