Question - event propogation in non-TOPLEVEL windows
- From: Simon Gornall <simon unique-id com>
- To: GTK mailing list <gtk-list redhat com>
- Subject: Question - event propogation in non-TOPLEVEL windows
- Date: Wed, 02 Feb 2000 23:49:13 +0000
I have an application that looks much prettier (:-) without
window borders etc. The problem is that in the following code...
//================================================================
// Create the window to draw in
//================================================================
_window = gtk_widget_new (gtk_window_get_type(),
"GtkObject::user_data", NULL,
"GtkWindow::type", UID_WIN_TYPE,
"GtkWindow::title", "Unique ID Video Stream",
"GtkWindow::allow_shrink",
FALSE, NULL);
... simply changing the definition of UID_WIN_TYPE from the usual
GTK_WINDOW_TOPLEVEL to GTK_WINDOW_POPUP causes my key events to not
be called - they're not even being sent to the application, I can
see the keypresses appearing in the parent xterm :-(
I'm setting all the obvious things I can think of...
//================================================================
// Set up events etc. for the main window
//================================================================
GTK_WIDGET_SET_FLAGS(_window, GTK_CAN_FOCUS);
gtk_signal_connect( GTK_OBJECT(_window), "key_press_event",
GTK_SIGNAL_FUNC(keyDown), this );
gtk_widget_set_events(_window, gtk_widget_get_events(_window ) |
GDK_BUTTON_PRESS_MASK |
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_KEY_PRESS_MASK
);
gtk_widget_show (_window);
gtk_window_activate_focus((GtkWindow*)_window);
Anyone have any ideas what else I have to do ?
Cheers,
Simon.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]