As long I wrote down so much bugs I should also begin to fix them. I will collect some more before I make a release.
The first one:
– sometimes a dialog window freezes complete AROS, when closed via OK button -> workaround: use X of window to close
is a very hard one… there are some problems come together, first a little bit about the problem:
I have very much windows (because every button, memo, edit usw. all are windows) so I decided to have one Global message port where all my messages arrive together. The messages have a IDCMPWindow field where I can read which Window recieved the message. Now when someone press the button to close the window it can be that there are some more messages for this Window. So the Window is destroyed but some more messages for them appear. Solution sounds rather simple but was not because of structure of fpgui: When I destroy a window, then I check if there are some more messages for this window and remove them.
– displacements of menus and comboboxes
party solved, so at least the mouse position is right when selecting entries… but its still a little bit too high.. and for comboboxes its too low
– wrong key binding
magorium from Aros-Exec forum reminded me that AROS send press and release message… But my implementation does not… I got one message only. I noticed that the message is not sent if IDCMP_VANILLAKEY is set… which is practical becasue you get directly the pressed char… IDCMP_RAWKEY gives only the keycode. But there is a very nice function in kemap.library to map the keycode to the char: MapRawkey. So I wrote a unit for keymap.library. The result is that I now have the exact key down and key up messages as I need them. I noticed that some crashes disappear (in UIDesigner when delete an item).
– change of focus with Tab does not change focus
This was rather easy to solve, I just looked into Windows implementation. So before send the key message to the item get the focussed item with FindKeyboardFocus.
– Missing concept of modal windows
Modal windows work now, its already well prepared in the fpgui interface, there is a field TopModalForm where one can get if a modal window is open at the moment. So I also implemented a function that the modal window is (re-)activated if an other window is clicked.
– Mouse over, MouseEnter MouseLeave still no way to implement
not really a implementation for it but I have an idea just as reminder want write down here. There is a function WhichLayer in layers.library seems exactly what I need.
all together should be something like this:
Layer := WhichLayer(@(Screen^.LayerInfo), Screen^.MouseX, Screen^.MouseY);
if Assigned(Layer) then
Result := Layer^.Window;
With this should be possible, just need to write the layers unit and check how this leave and enter messages work.