Re: [gtkmm] Handle X (root window) events in gtkmm?



Toralf Lund wrote:

Toralf Lund wrote:

Is there a simple way to catch low-level X events in a gtk-- (1.2) application? I'm primarily interested in events on the root window; I'm not sure if that complicates matters.

I have actually tried to solve the problem by calling XSelectInput(), at startup, then polling events via the idle signal. This nearly works:

  1. It may easily lead to unnecessary load on the system.
  2. It looks like some of the events are lost.


I found out how to do it. The simple answer to my question is: You handle this by calling gdk_window_add_filter() or Gdk_Window::add_filter(). Se also my thread with subject "Handle X (root window) events in gtkmm".

Actually, that's the subject of this thread. What I meant was "Getting notfified when window opens on display?"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]