Menu

#638 right mouse button sensitive to modifiers

release
open
nobody
None
5
2008-07-17
2008-07-17
No

The right mouse button is not recognized if numlock or caps-lock are set, nor if ctrl, shift, or alt are present. This was observed on an X11 server on Mandriva 2008.1 using either a static binary or a newly built dynamic binary linked to openmotif 2.3.0. However, the statically linked version that comes with Mandriva, which is linked to lesstif 2.1, is NOT sensitive to the state of the num lock and caps lock.

Discussion

  • Scott Tringali

    Scott Tringali - 2008-07-17
    • milestone: --> release
     
  • Scott Tringali

    Scott Tringali - 2008-07-17

    Logged In: YES
    user_id=11321
    Originator: NO

    This is a pretty good observation. It's is a bug as old as time in the original Motif. We had tried to work around it in the past, but the workaround could cause the X server to hang (a grab without an ungrab) and that was unacceptable. A better workaround would help.

     
  • David Mathog

    David Mathog - 2008-07-17

    Logged In: YES
    user_id=626407
    Originator: YES

    Well, using xev the modifiers are between 1 and 10 hex, but the primary bit patterns for state are 0x (for button down) and 400x (for button release). I don't know where this chunk of code is, but something like this would implement the desired logic:

    if ( event == BUTTON3) {
    if(state & 0x400){ /* button 3 release action */ }
    else { /* button 3 press action */ }
    }

    Of course this assumes that there is a place in the code now where "event" and "state" are available in this form. Perhaps with the callbacks in Motif this is an invalid assumption.

     
  • Scott Tringali

    Scott Tringali - 2008-07-17

    Logged In: YES
    user_id=11321
    Originator: NO

    Oh, we've tried that ages ago. IIRC, the problem is the library code in Motif registers a server-side grab with the wrong modifiers. Since it's server-side, the event never comes in for us to filter it out. If you have patch that works, we'll be all over it!

     

Log in to post a comment.