G'day all, I have been battling with this for a while and would appreciate the guidance of someone who knows the x11 driver better..
At http://www.wasp.net.au/~brad/test3.tgz there is a simple program that will demonstrate the error on wine with managed set to N in the config file. File is compiled with Borland Delphi 4 and includes full source for the paranoid/interested.
The problem seems to be the same as most dialog box problems I encounter in managed or unmanaged mode.
The program opens a small form, then after 1 second it opens a second form in modal format. The second form is focused above the first form as it should be. After another second the second form closes and the first form is again focused correctly. A third form opens and is given focus, but the first form remains the top form where the third form should be on top.
In normal applications, particularly full screen ones, this means the dialog box that gets opened and focused is underneath the main window and can't be accessed. If I'm in unmanaged mode, usually I have to kill wine from a console to get control back.
I have looked at a +x11drv,+timer,+message trace and found that when the third form opens, it focuses correctly however something causes the original form to then stack on top of the third form.
If I only use two forms, and open/close the second one twice this does not occur. It only seems to happen when at least three diffenent windows are present.
A good example. You go to quit a program and it pops up a dialog asking you if you want to save your work. When you click yes, the question dialog closes and a save file selector opens. The save file selector is focused but stacked underneath the main window and you can't get to it. In managed mode I can get to it by windowshading the main window, but in unmanaged mode I'm stuck.
I have been poking around in dlls/x11drv/winpos.c but I'm having a bit of trouble following things. Unfortunately C is not my native language and so it's taking me a while to get a grasp.
Thanks for any pointers..