diff --git a/ChangeLog b/ChangeLog index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6133caa2b6..b9e7fd9e1a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2002-05-07 Matthias Clasen + + Fix for #79248: + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): + (gdk_window_set_events): Always select for property notify for + maintaining window state. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate + property notifys if they were selected by gdk_window_set_events. + Mon May 6 23:48:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index fbb016fe73..181b9fea1d 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -509,7 +509,7 @@ gdk_event_translate (GdkDisplay *display, window = NULL; window_private = NULL; event->any.window = NULL; - + if (_gdk_default_filters) { /* Apply global filters */ @@ -651,7 +651,7 @@ gdk_event_translate (GdkDisplay *display, xoffset = 0; yoffset = 0; } - + switch (xevent->type) { case KeyPress: @@ -1453,23 +1453,28 @@ gdk_event_translate (GdkDisplay *display, if (window_private == NULL) { - return_val = FALSE; + return_val = FALSE; break; } - event->property.type = GDK_PROPERTY_NOTIFY; - event->property.window = window; - event->property.atom = gdk_x11_xatom_to_atom_for_display (display, xevent->xproperty.atom); - event->property.time = xevent->xproperty.time; - event->property.state = xevent->xproperty.state; - if (xevent->xproperty.atom == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE") || xevent->xproperty.atom == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP")) { /* If window state changed, then synthesize those events. */ - gdk_check_wm_state_changed (event->property.window); + gdk_check_wm_state_changed (window); } + if (window_private->event_mask & GDK_PROPERTY_CHANGE_MASK) + { + event->property.type = GDK_PROPERTY_NOTIFY; + event->property.window = window; + event->property.atom = gdk_x11_xatom_to_atom_for_display (display, xevent->xproperty.atom); + event->property.time = xevent->xproperty.time; + event->property.state = xevent->xproperty.state; + } + else + return_val = FALSE; + break; case SelectionClear: diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index c3cbbe47db..903afe68ab 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -445,7 +445,7 @@ gdk_window_new (GdkWindow *parent, visual = gdk_screen_get_system_visual (screen); xvisual = ((GdkVisualPrivate*) visual)->xvisual; - xattributes.event_mask = StructureNotifyMask; + xattributes.event_mask = StructureNotifyMask | PropertyChangeMask; for (i = 0; i < _gdk_nenvent_masks; i++) { if (attributes->event_mask & (1 << (i + 1))) @@ -2595,7 +2595,7 @@ gdk_window_set_events (GdkWindow *window, if (!GDK_WINDOW_DESTROYED (window)) { GDK_WINDOW_OBJECT (window)->event_mask = event_mask; - xevent_mask = StructureNotifyMask; + xevent_mask = StructureNotifyMask | PropertyChangeMask; for (i = 0; i < _gdk_nenvent_masks; i++) { if (event_mask & (1 << (i + 1)))