Changeset 196:1e7701c27c03

Show
Ignore:
Timestamp:
04/07/08 07:08:57 (5 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix initialization of key modifiers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/DWT.d

    r192 r196  
    17671767     * @since 2.1 
    17681768     */ 
    1769     public static const int MODIFIER_MASK
     1769    public static const int MODIFIER_MASK = ALT | SHIFT | CTRL | COMMAND
    17701770 
    17711771    /** 
     
    18171817     * @since 2.1 
    18181818     */ 
    1819     public static const int BUTTON_MASK
     1819    public static const int BUTTON_MASK = BUTTON1 | BUTTON2 | BUTTON3 | BUTTON4 | BUTTON5
    18201820 
    18211821    /** 
     
    18271827     * @since 2.1 
    18281828     */ 
    1829     public static const int MOD1
     1829    public static const int MOD1 = CONTROL
    18301830 
    18311831    /** 
     
    18371837     * @since 2.1 
    18381838     */ 
    1839     public static const int MOD2
     1839    public static const int MOD2 = SHIFT
    18401840 
    18411841    /** 
     
    18451845     * @since 2.1 
    18461846     */ 
    1847     public static const int MOD3
     1847    public static const int MOD3 = ALT
    18481848 
    18491849    /** 
     
    18531853     * @since 2.1 
    18541854     */ 
    1855     public static const int MOD4
     1855    public static const int MOD4 = 0
    18561856 
    18571857    /** 
     
    36333633} 
    36343634 
    3635 /+ 
    3636 static { 
    3637     /* 
    3638     * These values represent bit masks that may need to 
    3639     * expand in the future.  Therefore they are not initialized 
    3640     * in the declaration to stop the compiler from inlining. 
    3641     */ 
    3642     BUTTON_MASK = BUTTON1 | BUTTON2 | BUTTON3 | BUTTON4 | BUTTON5; 
    3643     MODIFIER_MASK = ALT | SHIFT | CTRL | COMMAND; 
    3644  
    3645     /* 
    3646     * These values can be different on different platforms. 
    3647     * Therefore they are not initialized in the declaration 
    3648     * to stop the compiler from inlining. 
    3649     */ 
    3650     char[] platform = getPlatform (); 
    3651     if ("carbon".equals (platform)) { //$NON-NLS-1$ 
    3652         MOD1 = COMMAND; 
    3653         MOD2 = SHIFT; 
    3654         MOD3 = ALT; 
    3655         MOD4 = CONTROL; 
    3656     } else { 
    3657         MOD1 = CONTROL; 
    3658         MOD2 = SHIFT; 
    3659         MOD3 = ALT; 
    3660         MOD4 = 0; 
    3661     } 
    36623635} 
    3663 +/ 
    3664  
    3665 }