Sponsored Content
Top Forums Programming X11 Button Event not Reported Post 302989564 by rlsj on Saturday 14th of January 2017 09:32:06 PM
Old 01-14-2017
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.)
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script for using the Back button and the Close button

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)
Discussion started by: mdgibson
1 Replies

2. UNIX for Dummies Questions & Answers

Changing middle mouse button for pasting to right mouse button in cygwin rxvt

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)
Discussion started by: sayeo
2 Replies

3. Windows & DOS: Issues & Discussions

cygwin-x/can't install xorg-x11-f100 & xorg-x11-fnts

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)
Discussion started by: binodbdrchand
1 Replies

4. UNIX for Advanced & Expert Users

[Solved] putty+x11:How do I pass X11 display rights to "su"?

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)
Discussion started by: dkarr
2 Replies

5. Post Here to Contact Site Administrators and Moderators

New Thread Button

Where do I find the New Thread Button so I can post a message to get some help in an issue I am having ? (2 Replies)
Discussion started by: kstalder
2 Replies
XtGrabKey(3)							   XT FUNCTIONS 						      XtGrabKey(3)

NAME
XtGrabKey, XtUngrabKey, XtGrabKeyboard, XtUngrabKeyboard, XtGrabButton, XtUngrabButton, XtGrabPointer, XtUngrabPointer - manage grabs SYNTAX
void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode); void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers); int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time); void XtUngrabKeyboard(Widget widget, Time time); void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int key- board_mode, Window confine_to, Cursor cursor); void XtUngrabButton(Widget widget, KeyCode button, Modifiers modifiers); int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time); void XtUngrabPointer(Widget widget, Time time); ARGUMENTS
widget Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof. keycode modifiers owner_events pointer_mode keyboard_mode time button confine_to cursor Specifies arguments to the associated Xlib function call. DESCRIPTION
XtGrabKey calls XGrabKey specifying the widget's window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget's window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true: o There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or o XFilterEvent returns True. XtUngrabKey calls XUngrabKey specifying the widget's window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified wid- get, keycode, and modifiers. If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget's window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns Grab- NotViewable. No future ungrab is implied by XtGrabKeyboard. XtUngrabKeyboard calls XUngrabKeyboard with the specified time. XtGrabButton calls XGrabButton specifying the widget's window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget's window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true: o There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or o XFilterEvent returns True. XtUngrabButton calls XUngrabButton specifying the widget's window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers. XtGrabPointer calls XGrabPointer specifying the widget's window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer. XtUngrabPointer calls XUngrabPointer with the specified time. SEE ALSO
X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.3 XtGrabKey(3)
All times are GMT -4. The time now is 02:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy