Avoid triggering an X error when the client->manager_window is
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com> * gdk/x11/xsettings-client.c (read_settings): Avoid triggering an X error when the client->manager_window is None...makes logs look cleaner. * gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle GDK_NONE to mean AnyPropertyType as documented. (Reported by Yu Shao) * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window, gdk_x11_screen_get_window_manager_name): Fix error trap we've been leaking since 2002... (#129538)
This commit is contained in:
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.c (read_settings): Avoid
|
||||||
|
triggering an X error when the client->manager_window
|
||||||
|
is None...makes logs look cleaner.
|
||||||
|
|
||||||
|
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
|
||||||
|
GDK_NONE to mean AnyPropertyType as documented. (Reported
|
||||||
|
by Yu Shao)
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
|
||||||
|
gdk_x11_screen_get_window_manager_name): Fix error trap
|
||||||
|
we've been leaking since 2002... (#129538)
|
||||||
|
|
||||||
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Fixes the entry-related part of #133852.
|
Fixes the entry-related part of #133852.
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.c (read_settings): Avoid
|
||||||
|
triggering an X error when the client->manager_window
|
||||||
|
is None...makes logs look cleaner.
|
||||||
|
|
||||||
|
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
|
||||||
|
GDK_NONE to mean AnyPropertyType as documented. (Reported
|
||||||
|
by Yu Shao)
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
|
||||||
|
gdk_x11_screen_get_window_manager_name): Fix error trap
|
||||||
|
we've been leaking since 2002... (#129538)
|
||||||
|
|
||||||
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Fixes the entry-related part of #133852.
|
Fixes the entry-related part of #133852.
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.c (read_settings): Avoid
|
||||||
|
triggering an X error when the client->manager_window
|
||||||
|
is None...makes logs look cleaner.
|
||||||
|
|
||||||
|
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
|
||||||
|
GDK_NONE to mean AnyPropertyType as documented. (Reported
|
||||||
|
by Yu Shao)
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
|
||||||
|
gdk_x11_screen_get_window_manager_name): Fix error trap
|
||||||
|
we've been leaking since 2002... (#129538)
|
||||||
|
|
||||||
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Fixes the entry-related part of #133852.
|
Fixes the entry-related part of #133852.
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.c (read_settings): Avoid
|
||||||
|
triggering an X error when the client->manager_window
|
||||||
|
is None...makes logs look cleaner.
|
||||||
|
|
||||||
|
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
|
||||||
|
GDK_NONE to mean AnyPropertyType as documented. (Reported
|
||||||
|
by Yu Shao)
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
|
||||||
|
gdk_x11_screen_get_window_manager_name): Fix error trap
|
||||||
|
we've been leaking since 2002... (#129538)
|
||||||
|
|
||||||
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Fixes the entry-related part of #133852.
|
Fixes the entry-related part of #133852.
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
Tue Feb 10 12:02:14 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.c (read_settings): Avoid
|
||||||
|
triggering an X error when the client->manager_window
|
||||||
|
is None...makes logs look cleaner.
|
||||||
|
|
||||||
|
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
|
||||||
|
GDK_NONE to mean AnyPropertyType as documented. (Reported
|
||||||
|
by Yu Shao)
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
|
||||||
|
gdk_x11_screen_get_window_manager_name): Fix error trap
|
||||||
|
we've been leaking since 2002... (#129538)
|
||||||
|
|
||||||
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
2004-02-10 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Fixes the entry-related part of #133852.
|
Fixes the entry-related part of #133852.
|
||||||
|
@ -2406,15 +2406,19 @@ fetch_net_wm_check_window (GdkScreen *screen)
|
|||||||
|
|
||||||
/* Find out if this WM goes away, so we can reset everything. */
|
/* Find out if this WM goes away, so we can reset everything. */
|
||||||
XSelectInput (screen_x11->xdisplay, *xwindow, StructureNotifyMask);
|
XSelectInput (screen_x11->xdisplay, *xwindow, StructureNotifyMask);
|
||||||
|
gdk_display_sync (display);
|
||||||
|
|
||||||
screen_x11->wmspec_check_window = *xwindow;
|
if (gdk_error_trap_pop () == Success)
|
||||||
XFree (xwindow);
|
{
|
||||||
|
screen_x11->wmspec_check_window = *xwindow;
|
||||||
|
XFree (xwindow);
|
||||||
|
|
||||||
screen_x11->need_refetch_net_supported = TRUE;
|
screen_x11->need_refetch_net_supported = TRUE;
|
||||||
screen_x11->need_refetch_wm_name = TRUE;
|
screen_x11->need_refetch_wm_name = TRUE;
|
||||||
|
|
||||||
/* Careful, reentrancy */
|
/* Careful, reentrancy */
|
||||||
_gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
|
_gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2456,6 +2460,8 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
|
|||||||
|
|
||||||
name = NULL;
|
name = NULL;
|
||||||
|
|
||||||
|
gdk_error_trap_push ();
|
||||||
|
|
||||||
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (screen_x11->display),
|
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (screen_x11->display),
|
||||||
screen_x11->wmspec_check_window,
|
screen_x11->wmspec_check_window,
|
||||||
gdk_x11_get_xatom_by_name_for_display (screen_x11->display,
|
gdk_x11_get_xatom_by_name_for_display (screen_x11->display,
|
||||||
|
@ -505,7 +505,10 @@ gdk_property_get (GdkWindow *window,
|
|||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_drawable_get_display (window);
|
||||||
xproperty = gdk_x11_atom_to_xatom_for_display (display, property);
|
xproperty = gdk_x11_atom_to_xatom_for_display (display, property);
|
||||||
xtype = gdk_x11_atom_to_xatom_for_display (display, type);
|
if (type == GDK_NONE)
|
||||||
|
xtype = AnyPropertyType;
|
||||||
|
else
|
||||||
|
xtype = GDK_NONE;
|
||||||
|
|
||||||
ret_data = NULL;
|
ret_data = NULL;
|
||||||
|
|
||||||
|
@ -374,23 +374,26 @@ read_settings (XSettingsClient *client)
|
|||||||
|
|
||||||
client->settings = NULL;
|
client->settings = NULL;
|
||||||
|
|
||||||
old_handler = XSetErrorHandler (ignore_errors);
|
if (client->manager_window)
|
||||||
result = XGetWindowProperty (client->display, client->manager_window,
|
|
||||||
client->xsettings_atom, 0, LONG_MAX,
|
|
||||||
False, client->xsettings_atom,
|
|
||||||
&type, &format, &n_items, &bytes_after, &data);
|
|
||||||
XSetErrorHandler (old_handler);
|
|
||||||
|
|
||||||
if (result == Success && type == client->xsettings_atom)
|
|
||||||
{
|
{
|
||||||
if (format != 8)
|
old_handler = XSetErrorHandler (ignore_errors);
|
||||||
{
|
result = XGetWindowProperty (client->display, client->manager_window,
|
||||||
fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
|
client->xsettings_atom, 0, LONG_MAX,
|
||||||
}
|
False, client->xsettings_atom,
|
||||||
else
|
&type, &format, &n_items, &bytes_after, &data);
|
||||||
client->settings = parse_settings (data, n_items);
|
XSetErrorHandler (old_handler);
|
||||||
|
|
||||||
XFree (data);
|
if (result == Success && type == client->xsettings_atom)
|
||||||
|
{
|
||||||
|
if (format != 8)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
client->settings = parse_settings (data, n_items);
|
||||||
|
|
||||||
|
XFree (data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_changes (client, old_list);
|
notify_changes (client, old_list);
|
||||||
|
Reference in New Issue
Block a user