Comment 4 for bug 575465

Revision history for this message
ekilfoil (ekilfoil) wrote : Re: unable to use mouse buttons to trigger events in mangler

The way Mangler detects mouse button presses is by polling the state of the mouse. With most mouses, polling the master pointer will return the state of the slave device. This problem seems to be limited to Logitech wireless mice.

Basically we're doing this:

    dev = XOpenDevice(GDK_WINDOW_XDISPLAY(rootwin), xdev[ctr].id);
    xds = (XDeviceState *)XQueryDeviceState(GDK_WINDOW_XDISPLAY(rootwin), dev);
    xbs = (XButtonState*) xds->data;
    state = state << bit;
    if ((xbs->buttons[byte] & state) >> bit) { // byte and bit are the mouse button flags
        // button is pressed
    }

I have tried other wireless mouse devices at my disposal and they seem to work fine. It is ONLY the logitech wireless mice (at least... that have been reported)