1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
--- gtk+-2.2.2/gtk/gtkwidget.c 2003-06-09 03:54:48.000000000 +0200
+++ gtk+-2.2.1/gtk/gtkwidget.c 2002-12-19 00:45:51.000000000 +0100
@@ -463,7 +463,7 @@
FALSE,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
- PROP_IS_FOCUS,
+ PROP_HAS_FOCUS,
g_param_spec_boolean ("is_focus",
_("Is focus"),
_("Whether the widget is the focus widget within the toplevel"),
@@ -3038,60 +3038,12 @@
return gtk_widget_event_internal (widget, event);
}
-static gboolean
-event_window_is_still_viewable (GdkEvent *event)
-{
- /* Check that we think the event's window is viewable before
- * delivering the event, to prevent suprises. We do this here
- * at the last moment, since the event may have been queued
- * up behind other events, held over a recursive main loop, etc.
- */
- switch (event->type)
- {
- case GDK_EXPOSE:
- case GDK_MOTION_NOTIFY:
- case GDK_BUTTON_PRESS:
- case GDK_2BUTTON_PRESS:
- case GDK_3BUTTON_PRESS:
- case GDK_KEY_PRESS:
- case GDK_ENTER_NOTIFY:
- case GDK_PROXIMITY_IN:
- case GDK_SCROLL:
- return event->any.window && gdk_window_is_viewable (event->any.window);
-
-#if 0
- /* The following events are the second half of paired events;
- * we always deliver them to deal with widgets that clean up
- * on the second half.
- */
- case GDK_BUTTON_RELEASE:
- case GDK_KEY_RELEASE:
- case GDK_LEAVE_NOTIFY:
- case GDK_PROXIMITY_OUT:
-#endif
-
- default:
- /* Remaining events would make sense on an not-viewable window,
- * or don't have an associated window.
- */
- return TRUE;
- }
-}
-
static gint
gtk_widget_event_internal (GtkWidget *widget,
GdkEvent *event)
{
gboolean return_val = FALSE;
- /* We check only once for is-still-visible; if someone
- * hides the window in on of the signals on the widget,
- * they are responsible for returning TRUE to terminate
- * handling.
- */
- if (!event_window_is_still_viewable (event))
- return TRUE;
-
g_object_ref (widget);
g_signal_emit (widget, widget_signals[EVENT], 0, event, &return_val);
|