Re: Mouse release information

New Message Reply Date view Thread view Subject view Author view

Alex Heidet (alex++at++prosolvia.se)
Fri, 8 Nov 1996 09:55:00 +0100


    case ButtonPress:
        {
            XButtonEvent *button_event = (XButtonEvent *) event;
            x = button_event->x;
            y = Shared->winSizeY - button_event->y;
            Shared->inWindow = 1;
            switch (button_event->button)
            {
                case Button1:
                    Shared->mouseButtons |= Button1Mask;
                    break;
                case Button2:
                    Shared->mouseButtons |= Button2Mask;
                    break;
                case Button3:
                    Shared->mouseButtons |= Button3Mask;
                    break;
            }
            break;
        }
Hi!

If you can use a little motif, this could help
(in
Performer/src/pguide/libpf/C++/motif.C)

//********************************
    case ButtonRelease:
        {
            XButtonEvent *button_event = (XButtonEvent *) event;
            switch (button_event->button)
            {
                case Button1:
                    Shared->mouseButtons &= ~Button1Mask;
                    break;
                case Button2:
                    Shared->mouseButtons &= ~Button2Mask;
                    break;
                case Button3:
                    Shared->mouseButtons &= ~Button3Mask;
                    break;
            }
            break;
        }
//*********************

I tried it and it works,

Hope this helps,

Alex.

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alexandre HEIDET			tel	+46 31-703 51 33
chez PROSOLVIA CLARUS AB		fax	+46 31-703 51 20
     GardaVagen 1,			E-mail	alex++at++clarus.se
     S-412 50 Goteborg
     SUEDE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:54 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.