Re: compare GdkModifierType



Robert Schulze wrote:
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?

Learn binary. 1 << 1 = 2.




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