I am looking for help concerning CLX and event handling. I am trying to
write a program which will generate X-style pop-up menus in CLX. The problem
I am encountering is in being able to drag through the menu with the button
pressed. The menu I have defined consists of a background window with
a subwindow defined for each item in the menu. I am using the :enter-notify
and :leave-notify events to keep track of which item the mouse is currently
pointing at. The selection of an item takes place on a :button-release
event. This scheme works fine until I press a button and hold it down, at
which point no events are reported to any window except the one I was in when
I pressed the button down. I'd like to be able to keep track of the :enter-notify and :leave-notify events regardless of whether of not the button is pressed.
If there's anyone who knows how to do this or anyone with some suggestions
about how I might go about mimicking the X menus in some other way, I'd
appreciate any help you could give me!!
BTW: Yes, I do REALLY want to do this in CLX and not in CLIO or CLUE or CLIM..
Thanks in advance,
Nicholas Bennett
········@setosa.uwaterloo.ca
In article <··········@watdragon.uwaterloo.ca> ········@setosa.uwaterloo.ca (Nicholas Bennett) writes:
> I am looking for help concerning CLX and event handling. I am trying to
>write a program which will generate X-style pop-up menus in CLX. The problem
>I am encountering is in being able to drag through the menu with the button
>pressed. The menu I have defined consists of a background window with
>a subwindow defined for each item in the menu. I am using the :enter-notify
>and :leave-notify events to keep track of which item the mouse is currently
>pointing at. The selection of an item takes place on a :button-release
>event. This scheme works fine until I press a button and hold it down, at
>which point no events are reported to any window except the one I was in when
>I pressed the button down. I'd like to be able to keep track of the :enter-notify and :leave-notify events regardless of whether of not the button is pressed.
>
> If there's anyone who knows how to do this or anyone with some suggestions
>about how I might go about mimicking the X menus in some other way, I'd
>appreciate any help you could give me!!
>
>BTW: Yes, I do REALLY want to do this in CLX and not in CLIO or CLUE or CLIM..
>
> Thanks in advance,
>
>Nicholas Bennett
>········@setosa.uwaterloo.ca
>
hi:
i do this very thing in doing drag/drop. you need to call
xlib:ungrab-pointer when processing the button press event. now you will
get all the other events like enter/notify. when you get the button release
event it will be in the window that the release occurred.
·······@pacbell.com