OS/2 port of Eclipse is based on the code of Windows port because of similarity of their APIs. But of course, they are not identical, so there is a number of differences in the behavior of OS/2 and Windows implementations that is not covered by the Eclipse/SWT public API (which is completely identical) and can lead to various side effects. These differences are mentioned here.
| # | Windows | OS/2 | Remarks | 
|---|---|---|---|
| 001 | In Windows, if a top level (frame) window is created with the CW_USEDEFAULTconstant as its size and position, it
        doesn't receive theWM_SIZEmessage until it is shown for
        the first time or explicitly resized/moved, whileGetWindowRect()(i.e.Shell.getBounds())
        already reports these default size and position, but not zeros. This
        has one side effect: theShellwidget receivesSWT.Resize/Moveevents not right after creation but only
        after the firstopen(),setVisible()orsetBounds()call. In turn, this allows to implicitly do
        theShelllayout upon the firstopen()without an explicit call tolayout()since the layout is
        done automatically duringWM_SIZEmessage handling. | Although we can acquire nearly the same behavior in OS/2 by
        specifying the FS_SHELLPOSITIONflag during the frame
        creation, the actual size/position of the window remains zero until it
        is shown for the first time. This leads, for example, to the
        impossibility to center theShellwidget before a call to
        itsopen()method, which (as we think) breaks the SWT
        API. So, we set the defaultShellsize/position (as told
        us by the system throughWinQueryTaskSizePos()call)
        explicitly after widget creation and useFS_SHELLPOSITIONonly to distinguish that the widget is being shown for the first time
        and we need to do the "implicit" layout to emulate Windows behavior.
        This has the side effect such as theShellwidget
        receivesSWT.Resize/Moveevents right after its creation,
        not after the first open as in Windows. We don't see any reason to
        emulate this thing too because it is logically more correct and either
        behavior is not explicitly specified by the SWT API. | |
| 002 | GC.drawRoundRectangle()andGC.fillRoundRectangle()for some reason (a bug?) draw
        rectangles 1 pixel narrower both in horizontal and vertical than their
        nonrounded versions with the same width and height
        arguments.Also rectangles with the negative width or height are drawn not with the same width and height as when these arguments are positive. | Rounded and nonrounded rectangles are drawn with the same width
        and height provided they are passed the same width and height
        arguments. Rectangles of negative width/height are drawn with the same size as with positive ones. | See also here. | 
| 003 - eliminated | GC.drawFocus()draws the focus rectangle following
        the rules offillRectangle()-- width and height arguments
        specify rectangle's width and height but not the position of right and
        bottom borders as indrawRectangle(), although the
        javadoc says that the latter is used to draw the focus on platforms
        that do not support such a notion (so we get different width and
        height on that platforms) | GC.drawFocus()follows the same rules asdrawRectangle(). | |
| 004 | Iconify / deiconify... different order of appearance of these events... | ||
| 005 | When drawing on a palette-based image using GCitsgetForeground()andgetBackground()methods
        do not always return actual RGB color values from the image's palette
        that are used to assign colors to new pixels drawn byGCmethods. Instead, they return exactly the same RGB values as they were
        passed before tosetForeground()/setBackground()methods.
        The difference between these values takes place when an RGB value for
        a color specified in theset...method is absent in the
        image's palette -- in this case Windows automatically selects the
        closest match (which can differ seriously) as the color, but the RGB
        value stored in theGCinternal data (the device context
        data) is the original one (not matched) and it will be used to return
        a color when theget...method is called. | Under OS/2 also the closest match is selected from the image's
        palette and used for drawing pixels when drawing on a palette-based
        image. But the color returned by GC.getForeground()andgetBackground()methods always contains the actual
        (matched) RGB value used for drawing. | Example. Suppose that we have an image that doesn't have a pure
        red (255, 0, 0) in its palette. We create a red Coloron
        a direct-colorDisplay, aGCon this image,
        then callGC.setForeground (red_color)andGC.drawOval(). The circle is drawn not in red but in the
        color closest to red in the image's palette, as expected. In Windows,
        a subsequent call toGC.getForeground()will always
        return a color with the (255,0,0) RGB value while in OS/2 the RGB
        value will be the closest match chosen from the image's palette and
        used for drawing. See also theSWT006_01testcase. | 
| 006 | Image.setBackground()doesn't work for direct color
        images. | Image.setBackground()changes the transparent pixel
        on direct color images as well as on palette-based. | |
| 007 | When the system is in 256-color mode, we can still get the image data in its original color depth and palette after the image has been loaded/created. This is true for direct color images also (this probably false for icons only, where we get data converted to 8-bit, regardless of the original). | When the system is in 256-color mode, all bitmaps are converted
        and internally stored in 8-bit depth using the current palette,
        regardless of their original depth and/or palette. This means it's
        impossible to get back the same image data from the system as we
        provided creating the bitmap (for example, when calling Image.getImageData()) -- we always get data in the
        converted form. | This is the unchangeable behavior of OS/2 (we don't know any acceptable solution for this). Taking into account that the usage of 256-color mode is rare in our days we decided to leave things as they are for the present. | 
| 008 | Potential problem with icons... (OS/2 supports only 32/16 px and 40/20 px icons...) | ||
| 009 | When the window is not visible setting its maximized state to true
        will not actually resize the window to the maximum size (because
        windows cannot be maximized when invisible). This leads to the number
        of hidden problems such as the Shell's children having
        zero size after adding them to a newly createdShell,
        setting its layout and maximizing it but before calling theShell.open()method. | When the window is not visible setting its maximized state to true will resize it as if it would be visible. This does not lead to any problems except that we have to keep in mint the compatibility with SWT for other platforms. | |
| 010 | When the SWT.RADIObutton is selected and all other
        radio buttons in the group are automatically deselected, these
        deselected buttons receive theSWT.Selectionevent
        before the selected button. | Deselected radio buttons receive the SWT.Selectionevent after the selected one receives it. | This seems not to essential. | 
[Haven't been started yet -- SWT part must be finished first]