mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
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:
parent
87c45c73b1
commit
351ebd8bd2
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>
|
||||
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
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. */
|
||||
XSelectInput (screen_x11->xdisplay, *xwindow, StructureNotifyMask);
|
||||
gdk_display_sync (display);
|
||||
|
||||
screen_x11->wmspec_check_window = *xwindow;
|
||||
XFree (xwindow);
|
||||
|
||||
screen_x11->need_refetch_net_supported = TRUE;
|
||||
screen_x11->need_refetch_wm_name = TRUE;
|
||||
|
||||
/* Careful, reentrancy */
|
||||
_gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
|
||||
if (gdk_error_trap_pop () == Success)
|
||||
{
|
||||
screen_x11->wmspec_check_window = *xwindow;
|
||||
XFree (xwindow);
|
||||
|
||||
screen_x11->need_refetch_net_supported = TRUE;
|
||||
screen_x11->need_refetch_wm_name = TRUE;
|
||||
|
||||
/* Careful, reentrancy */
|
||||
_gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2455,6 +2459,8 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
|
||||
guchar *name;
|
||||
|
||||
name = NULL;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
|
||||
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (screen_x11->display),
|
||||
screen_x11->wmspec_check_window,
|
||||
|
@ -505,7 +505,10 @@ gdk_property_get (GdkWindow *window,
|
||||
|
||||
display = gdk_drawable_get_display (window);
|
||||
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;
|
||||
|
||||
|
@ -373,24 +373,27 @@ read_settings (XSettingsClient *client)
|
||||
XSettingsList *old_list = client->settings;
|
||||
|
||||
client->settings = NULL;
|
||||
|
||||
old_handler = XSetErrorHandler (ignore_errors);
|
||||
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 (client->manager_window)
|
||||
{
|
||||
if (format != 8)
|
||||
old_handler = XSetErrorHandler (ignore_errors);
|
||||
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)
|
||||
{
|
||||
fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
|
||||
if (format != 8)
|
||||
{
|
||||
fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
|
||||
}
|
||||
else
|
||||
client->settings = parse_settings (data, n_items);
|
||||
|
||||
XFree (data);
|
||||
}
|
||||
else
|
||||
client->settings = parse_settings (data, n_items);
|
||||
|
||||
XFree (data);
|
||||
}
|
||||
|
||||
notify_changes (client, old_list);
|
||||
|
Loading…
Reference in New Issue
Block a user