UI issues hampering porting efforts take 2
cto at xten.com
Sun Nov 2 18:06:59 CST 2003
Hello All Again,
We have found a work around for all our existing issues porting X-Lite so
long as Jerry Jenkins's unincorporated WINE patch listed below is applied to
Wine. I don't know why it's not incorporated yet, but without it our
application has horrible issues (as do similar styled applications). We have
spent time creating another test application with source to demonstrate UI
issues that fail under Wine with unusual shaped windows, so you all can have
a test application to work against to fix these issues at your leisure. We
have worked around all of these issues in our application (with the
unincorporated JJ patch) by using alternative APIs or use the APIs in a
What are the chance's JJ's patch can be put into the main Wine CVS tree?
Does anyone know what issues it breaks? All I can see is improvement (even
though it's not a complete solution yet to all issues), hence my curiosity.
This application demonstrates the issues we are having which will allow
X-Lite to run under WINE.
Find the demo application at:
Some of the bugs are fixed by this *unincorporated* WINE patch by
(hereafter called "the unincorporated JJ patch")
- B1. Critical, but fixed by the unincorporated JJ patch.
Focus does not appear to be on the application at startup. We do not
receive keyboard messages, though we do receive many other messages,
such as as mouse-clicks. Clicking on the square labelled "focus:"
fixes the problem, by bringing up a message box -- when the message
box is dismissed, the application has focus. This appears to be the
same problem as that discussed here:
- B2. Critical, but fixed by the unincorporated JJ patch.
No task bar item.
- B3. Critical, but fixed by the unincorporated JJ patch.
"System" commands do not appear to be working. Examples:
- we do not receive WM_CLOSE when the user presses Alt+F4
- Alt+Space does not bring up the System menu
- B4. Critical, but fixed by the unincorporated JJ patch.
We are always on top, until a screen-saver kicks in. (Also can be
fixed by simply removing WS_POPUP.) This appears to be the same
problem as that discussed here:
- B5. Not critical, as we have a work-around.
The application window is supposed to have a non-rectangular shape.
The shape is made by setting a "region" from a mask bitmap, and
calling SetWindowRgn. The problem under Wine happens when converting
the 2-bit color mask to a 24-bit color mask. The black 2-bit pixels
are properly converted to black 24-bit pixels, but the white 2-bit
pixels are converted to a near-black, rather than white. The sample
app demonstrates 2 ways of working around the problem:
method 1: fixes the problem by using a 16-color (4 bit per color)
instead of a 2-color mask. This gets around the bug in a
method 2: fixes the problem by using near-black (instead of white)
the "transparent" color. This exploits the bug and causes
a bad (but correct) appearance on Windows.
- B6. Fixed by latest CVS WINE release.
Copy to the clipboard doesn't work (though pasting from the clipboard
- B7. Not critical, as we have a work-around.
Attempting to bring up the right-click context menu causes the app to
- B8. Not critical, as we have a work-around.
Unwanted caption. If an application without a caption shows itself,
and *then* gives itself a funky shape by calling SetWindowRgn, the
application will have a caption. If, however, the application calls
setWindowRgn *before* showing itself, it will correctly not have a
caption. The sample app demonstrates this, as well as demonstrating
a fix for the problem.
min. fix view: clicking on this square hides the window and then
shows it again, which gets rid of the caption
max. fix view: clicking on this square also fixes B5 (using method 1)
and then hides and shows the window
- B9. Not critical, as we have a work-around.
Handling WM_NCHITTEST to move an app without a caption. Another
example of such an app was the clock that shipped with older versions
of Windows. (You've got to first turn off the caption and menu by
pressing Esc, or with Settings->NoTitle in the menu.) There's a copy
This app shows another Wine bug -- turning off the caption bar and
menu ony half works -- the caption bar remains. Another example of
an application which turns off the caption bar and menu (and which
only half works under Wine):
- B10. Not critical, as we have a work-around.
Apart from the WM_NCHITTEST method (see B9), the sample app
demonstrates 2 algorithms for moving a window. I'll call the
algorithms the 'mouse move argument' algorithm and the 'cursor pos'
algorithm. Either algorithm works fine under Windows, and either
algorithm works fine under Wine *if* the window has a caption bar.
but if the window does not have a caption bar, the mouse move
argument algorithm produces some very undesirable results -- if you
move the mouse fast, WM_MOUSEMOVE appears to send some very confused
LPARMS, and the window gets moved to unpredictable positions.
Clicking on the "toggle bug B10" toggles between the 2 algorithms.
(Remember to turn off the caption bar first -- see B8).
- B11. Not critical, as we have a work around.
RTF control. This one is not actually demonstraded by the sample
app. The problem can commonly be seen when running installer
progams -- the EULA is often displayed in a rich edit control, and
is unreadable under wine. An example of such an installer: **
More information about the wine-devel