Re: testinput - how to get events when coreptr not in window
- From: James Henstridge <james daa com au>
- To: Philip Brown <phil bolthole com>
- Cc: gtk-devel-list gnome org
- Subject: Re: testinput - how to get events when coreptr not in window
- Date: Sun, 16 Jun 2002 13:29:01 +0800
First of all, this is a list for development _of_ gtk+, rather than
_with_ gtk+. Maybe your question would have been more appropriate on
gtk-list or gtk-app-devel-list.
Philip Brown wrote:
Hello,
I'd like to adjust gtk/testinput, so that it will receive and respond to
XINPUT events, while the core pointer is outside the main drawing area.
[Setting mode='Screen' is not adquate. I wish to have mode='Window' work]
I've experiented with some direct X11(non-gtk) XINPUT programs, and in
principle, it works fine, as long as XSelectExtensionEvent() is called with
the root window as the target.
However.... there does not seem to be a way to DO that, with gtk currently.
(gtk1.2.10)
gtk_widget_set_extension_events()
only takes GtkWidget type as an argument. I dont know of a gtkwidget
wrapper around the root window.
So far, I have tried,
- gtk_widget_set_extension_events(GDK_ROOT_PARENT(), ...)
- gtk_widget_set_extension_events(gdk_root_parent, ...)
- gtkrootwin=gdk_window_foreign_new(GDK_ROOT_WINDOW ());
gtk_widget_set_extension_events(gtkrootwin,...)
but none of these seem to work out. Even the last one gives an error,
Gtk-CRITICAL **: file gtkwidget.c: line 3906
(gtk_widget_set_extension_events): assertion `GTK_IS_WIDGET (widget)'
failed.
Could someone give me a pointer as to how I should proceed, please?
I'm new to gtk programming, so please excuse me if I've missed the "obvious"
gtk solution.
gtk_widget_set_extension_events() works with GtkWidgets (which are
equivalent to Xt widgets rather than xlib Window objects). You might
want to try gdk_input_set_extension_events(), which works with a
GdkWindow (such as the root parent).
James.
--
Email: james daa com au | Linux.conf.au 2003 Call for Papers out
WWW: http://www.daa.com.au/~james/ | http://conf.linux.org.au/cfp.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]