forked from AuroraMiddleware/gtk
Free data returned from XGetWindowProperty.
2005-08-19 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display) (xdnd_read_actions, get_client_window_at_coords_recurse): Free data returned from XGetWindowProperty. * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window) Free data returned from XGetWindowProperty. (313867, Kjartan Maraas) * gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free children in all cases. (#313862, Kjartan Maraas)
This commit is contained in:
parent
ba8fd4b9e2
commit
859126d546
@ -1,5 +1,13 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display)
|
||||
(xdnd_read_actions, get_client_window_at_coords_recurse):
|
||||
Free data returned from XGetWindowProperty.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window)
|
||||
Free data returned from XGetWindowProperty. (313867, Kjartan
|
||||
Maraas)
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
|
||||
children in all cases. (#313862, Kjartan Maraas)
|
||||
|
||||
|
@ -1,5 +1,13 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display)
|
||||
(xdnd_read_actions, get_client_window_at_coords_recurse):
|
||||
Free data returned from XGetWindowProperty.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window)
|
||||
Free data returned from XGetWindowProperty. (313867, Kjartan
|
||||
Maraas)
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
|
||||
children in all cases. (#313862, Kjartan Maraas)
|
||||
|
||||
|
@ -1,5 +1,13 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display)
|
||||
(xdnd_read_actions, get_client_window_at_coords_recurse):
|
||||
Free data returned from XGetWindowProperty.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window)
|
||||
Free data returned from XGetWindowProperty. (313867, Kjartan
|
||||
Maraas)
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
|
||||
children in all cases. (#313862, Kjartan Maraas)
|
||||
|
||||
|
@ -2485,6 +2485,7 @@ xdnd_read_actions (GdkDragContext *context)
|
||||
|
||||
gdk_error_trap_push ();
|
||||
|
||||
data = NULL;
|
||||
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
|
||||
GDK_DRAWABLE_XID (context->source_window),
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "XdndActionList"),
|
||||
@ -2520,8 +2521,10 @@ xdnd_read_actions (GdkDragContext *context)
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
XFree(atoms);
|
||||
}
|
||||
|
||||
if (data)
|
||||
XFree (data);
|
||||
|
||||
gdk_error_trap_pop ();
|
||||
}
|
||||
@ -2739,6 +2742,10 @@ xdnd_enter_filter (GdkXEvent *xev,
|
||||
if (gdk_error_trap_pop () || (format != 32) || (type != XA_ATOM))
|
||||
{
|
||||
g_object_unref (new_context);
|
||||
|
||||
if (data)
|
||||
XFree (data);
|
||||
|
||||
return GDK_FILTER_REMOVE;
|
||||
}
|
||||
|
||||
@ -3086,7 +3093,10 @@ _gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
||||
0, 0, False, AnyPropertyType,
|
||||
&type, &format, &nitems, &data) &&
|
||||
type != None)
|
||||
rootwin = TRUE;
|
||||
{
|
||||
XFree (data);
|
||||
rootwin = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2555,13 +2555,18 @@ fetch_net_wm_check_window (GdkScreen *screen)
|
||||
if (screen_x11->wmspec_check_window != None)
|
||||
return; /* already have it */
|
||||
|
||||
data = NULL;
|
||||
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), screen_x11->xroot_window,
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
|
||||
0, G_MAXLONG, False, XA_WINDOW, &type, &format,
|
||||
&n_items, &bytes_after, &data);
|
||||
|
||||
if (type != XA_WINDOW)
|
||||
return;
|
||||
{
|
||||
if (data)
|
||||
XFree (data);
|
||||
return;
|
||||
}
|
||||
|
||||
xwindow = (Window *)data;
|
||||
|
||||
@ -2574,14 +2579,14 @@ fetch_net_wm_check_window (GdkScreen *screen)
|
||||
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));
|
||||
}
|
||||
|
||||
XFree (xwindow);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user