Re: Problem with key-release-event

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

 



On Wed, 2003-06-04 at 05:16, Peter Krueger wrote:
> Hi!
> I'm using GTK 1.2 on linux and have a litle problem with
> key-release-events. As long as the mouse pointer stays over the widget
> everything works fine. But when I move the mouse away I no longer get
> key-release-events while key-press-events still arrive. This occurs for
> example when I move the mouse over an empty part of my desktop and my
> application still has focus.
> I had a similar problem with mouse button-press/release-events which I
> could solve by using gtk_grab_add(). But this doesn't help for
> key-release-events.
> Can anybody help me with this?

As I recall, GTK+-1.2 didn't select for key release events on
top level windows, so the X server is just sending the release
events if the mouse is over your widget.

So, try:

 gtk_widget_set_events (toplevel_window, GDK_KEY_RELEASE_MASK);

(Like many other things, this has been changed/fixed in more
recent versions of GTK+)

Regards,
                                     Owen




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux