Re: Not getting button press events when running remotely
- From: Damon Chaplin <damon ximian com>
- To: Pascal Haakmat <a haakmat chello nl>
- Cc: gtk-list gnome org
- Subject: Re: Not getting button press events when running remotely
- Date: Sun, 25 Mar 2001 23:31:39 +0100
Pascal Haakmat wrote:
>
> Pascal Haakmat wrote:
>
> [snip problem description]
>
> > Since I'm pretty much a newbie to X and GTK, I am kind of lost at this
> > point and would appreciate some help. Thanks in advance ...
>
> Well, I solved my own problem.
>
> It turns out that on RedHat 7.0 (gtk 1.2.8, glade 0.5.9), I can get away
> with the following procedure:
>
> 1. Create a GtkScrolledWindow.
> 2. Add a GtkLayout to the GtkScrolledWindow.
> 3. Set the proper event mask on the GtkLayout.
> 4. Connect a handler to the button-press signal on the GtkLayout.
>
> ... to get button press events on the GtkLayout widget (I use Glade to
> perform steps 1 to 3).
>
> On RedHat 6.2 however (gtk 1.2.8, glade 0.5.5), I need to:
>
> 1. Create a GtkScrolledWindow.
> 2. Add a GtkEventBox to the GtkScrolledWindow.
> 3. Add a GtkLayout to the GtkScrolledWindow.
> 4. Set the proper event mask on the GtkEventBox.
> 5. Connect a handler to the button-press signal on the GtkEventBox.
> 6. If I want motion-notify events, I also need to add:
> gtk_widget_add_events(eventbox, GDK_POINTER_MOTION_MASK);
> because setting the event mask in Glade only yields motion-notify
> events when I press a mouse button.
>
> (again, steps 1 to 4 are performed using Glade).
>
> Can this difference be explained by the different versions of Glade on both
> machines?
I'm not sure. You could try the first approach on both machines and compare
the generated code to see what has changed (I assume you are generating C code).
Or upgrade Glade on your RedHat 6.2 box and see if that fixes it.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]