compare GdkModifierType



Aloa

I read the state from the device with gdk_device_get_state and safe it at state
And now, I won't compare the state.
I read at the Gdk Reference:
        GDK_Button1_MASK = 1 << 8;
        GDK_Button2_MASK = 1 << 9;
        ...

If I print the state as a int the Button1 is 1040. Why not 8?
If I won't compare it with state == GDK_BUTTON1_MASK  it doesn't work. Why?
 ==== CODE === 
 GdkModifierType        state;
 insigned int           count = 0;
 ...
 gdk_device_get_state(dev, win, NULL, &state);
 if(state == GDK_BUTTON1_MASK) ++count;

 === CODE END ===

 //Robert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]