Changeset 176 for trunk/src/plugins


Ignore:
Timestamp:
Aug 3, 2009, 3:40:07 AM (16 years ago)
Author:
lpino
Message:
  • Fix context menu
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Control.java

    r173 r176  
    31023102      * have been destroyed but not removed from the control.
    31033103      */
    3104     //@@TODO(lpino) First check if this validation applies to OS/2 implementation and then validate using the coordinates of the mouse
     3104    //@@TODO(lpino) Validate using the coordinates of the mouse
    31053105//      if (mp2 != handle) return null;
    3106       short flOptions = OS.PU_HCONSTRAIN | OS.PU_VCONSTRAIN | OS.PU_KEYBOARD | OS.PU_MOUSEBUTTON1;
    3107       boolean rc = OS.WinPopupMenu(handle, handle, menu.handle, OS.SHORT1FROMMP(mp1), OS.SHORT2FROMMP(mp1), 0, flOptions);
    3108       return MRESULT.TRUE;
     3106      if(menu == null) return MRESULT.FALSE;
     3107      else{
     3108          short flOptions = OS.PU_HCONSTRAIN | OS.PU_VCONSTRAIN | OS.PU_KEYBOARD | OS.PU_MOUSEBUTTON1;
     3109          boolean rc = OS.WinPopupMenu(handle, handle, menu.handle, OS.SHORT1FROMMP(mp1), OS.SHORT2FROMMP(mp1), 0, flOptions);
     3110          return MRESULT.TRUE;
     3111      }
    31093112}
    31103113
Note: See TracChangeset for help on using the changeset viewer.