Help: Apps. not responding to XSendEvent()

Help: Apps. not responding to XSendEvent()

Post by ndin.. » Tue, 01 Aug 2000 04:00:00



Hi:

I developed a little application that grabs the keyboard and sends
keystroke events to using XSendEvent() to the window with the pointer.
Here are some of my observations:

1. if I set event.xany.window = RootWindow(display, screen_num), then
it works under KDE but no GNOME apps. work.

2. if I don't set anything, then GNOME applications work but not KDE
apps.

3. In either case, no standard Xt applications work. i.e. xterm,
Netscape, etc.

Is there someone out there who can shed some light on this behavior.

Thanks.

Dinesh

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Help: Apps. not responding to XSendEvent()

Post by Kevin Holbroo » Thu, 03 Aug 2000 04:00:00



> I developed a little application that grabs the keyboard and sends
> keystroke events to using XSendEvent() to the window with the pointer.
> Here are some of my observations:

> 1. if I set event.xany.window = RootWindow(display, screen_num), then
> it works under KDE but no GNOME apps. work.

> 2. if I don't set anything, then GNOME applications work but not KDE
> apps.

> 3. In either case, no standard Xt applications work. i.e. xterm,
> Netscape, etc.

Try using the constant "PointerWindow" instead of specifying the window
directly.
This lets the server decide which window gets the event based on what window has
the pointer focus.

You really don't want to be sending keystrokes to the "root" window do you?
The window portion of the event structyure if for specifying which window
"receives" the event.

For any app to get keystrokes the event has to go to a window in the app's
window hierarchy which has selected to recieve that type of event.

Hope this helps...

--
Kevin Holbrook
Developer
Metrowerks, a Motorola Company

 
 
 

1. Help: KDE apps. not responding to XSendEvent

Hi:

I wrote a little application (in Xlib) that Grabs the keyboard and
sends selective events using XSendEvent to the application that
contains the keyboard. I am able to successfully send the key strokes
to GNOME apps. (under KDE) but not KDE apps like Kedit, etc.

Has anyone noticed any such behavior? Are there any special precautions
I need to take when sending events to KDE apps?

Thanks.

_Dinesh

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Deleting lilo boot. How?

3. Internet apps won't respond - can anyone help??

4. yggra... (however you spell it): installing emacs w/out xprogs

5. XSendEvent() Not working!! Hints on how to debug?!

6. vsFTPd - Problem setting root folder for all users

7. Odd Modem Problem (Modem not responding) (Not a WinModem!)

8. How do you install NetBSD on a MacPPC?

9. HELP: debugger: Editor not responding

10. Help!!! PnP Modem not responding

11. Help: New system will not respond to network

12. Help. Data pins in parallel port not responding

13. Help ^ Hda: hard disk not responding