Re: A question about "event" signal of GtkTextTag


"Dongho Shin" <electman acadcorp com> writes:

> I connected "event" signal to GtkTextTag widget and examined the results, which were
> somewhat odd for me.
> The 'GDK_MOTION_NOTIFY' type event handler was called back only after
> 'GDK_BUTTON_PRESS' or 'GDK_BUTTON_RELEASE' type event handler was.
> That is, to catch a 'GDK_MOTION_NOTIFY' type event, I should press button on the tag first.

unless I'm wrong the GtkTextView widget sets this event_mask:

 (GDK_EXPOSURE_MASK            |
  GDK_SCROLL_MASK              |
  GDK_KEY_PRESS_MASK           |

so it should be delivering motion events even if the mouse button is not
pressed. Are you sure that your window is focused at all before you press
a button in it? You might be tricking yourself with a click-to-focus WM

> How can I change my code to get the 'GDK_MOTION_NOTIFY' event every time it happens
> on GtkTextTag widgets? Is it possible?

did you try the following yet:

  gtk_widget_add_events (GTK_WIDGET (text_view), GDK_POINTER_MOTION_MASK);

Salut, Sven

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