I have a peculiar problem (aren't they all?). A new program that uses X11 fails to get any ButtonRelease event reported to it after the XNextEvent call. That is, mouse clicks don't work. The program gets others, such as exposure and keyboard events, but not button press or release. Other programs running on the same hardware obviously do get all mouse clicks. Compounding the problem, this failure occurs under Ubuntu and Mint, but all events are reported under Raspbian -- that is, under Raspbian the failure does not occur.
This is the setup instruction:
After issuance i contains 1.
I've read (seemingly relevant parts of) the X11 manual without gaining a clue. I'm hoping that someone else has experienced this problem and found the cause.
Would this question be more appropriate in another group? Which one?
--rLsj
Moderator's Comments:
Please use CODE tags when displaying sample input, sample output, and code segments.
Last edited by Don Cragun; 01-14-2017 at 06:00 PM..
Reason: Add CODE and ICODE tags.
this failure occurs under Ubuntu and Mint, but all events are reported under Raspbian
I am no Ubuntu expert, but i remember darkly about Ubuntu and Mint both not using X11 any more but thing called "Wayland". Might it be that it has to do with this?
Loaded Debian onto my long-suffering, ten-year-old HP Pavilion and, you guessed it, it failed also. That was my last hope. I had to get inventive.
Which I did. And fixed it, although the fix leaves a bad taste. I inserted a call to XGrabButton just before the call to XNextEvent. Now it works, would you believe! Mouse clicks are delivered to the program.
Note that it works under Raspbian without grabbing the button. And absolutely no indication appears in the X11 manual -- or the man pages -- that seems to require it. Other coders might want to take notice.
Might I next find a distro that requires XGrabKey?
Distasteful.
--rLsj
(Note to Moderator: Your "hint" about code tags, "co" over "de", is not informative.)
A little follow-on to my last post for coders who might be interested. The XGrabButton call that solves the problem under Debian fails under Raspbian with the message, "trying to access private resources." As usual I have no idea which resources or why they're private. And the "BADACCESS" code returned is not even mentioned on the XGrabButton man page.
It appears there'll be two versions of the program: one for Raspbian with another for Debian and probably everyone else.
I can log into a unix system with Putty. I've set the "X11 forwarding" checkbox, and I've verified that I can display an X11 window back on my laptop. What I need to be able to do is "su" to another uid after logging in and then run something which display a window back on my laptop, with the... (2 Replies)
Hello All.
Really a newbie to Linux/Unix. Trying to get into Linux. Using XP PE currently. Installed cygwin and trying to intall cygwin-x. Everything else is setup nice but i can't seem to install these two packages (without whom xwin won't start)
1. xorg-x11-f100
2. xorg-x11-fnts
Tried the... (1 Reply)
Hi, I'm using rxvt in Cygwin and I'm wondering how to change my mouse bindings from the middle button for pasting to the right button. The main reason why I want to do this is because my laptop doesn't have a middle mouse button. Thanks for any help! (2 Replies)
Here's a question I have for anyone that might be able to help me:
I can write a html script that will allow the user to return to the previous page using the back button, and I can write a script that will allow the user to return to the previous page using the close button, but...is there a... (1 Reply)