if ((type_return == XA_ATOM) && (format_return == 32) &&
(data) && (nitems_return == 1))
{
- Atom atom = (Atom) *data;
+ Atom atom = *(Atom*)data;
if (atom == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_WINDOW_TYPE_DIALOG"))
type = GDK_WINDOW_TYPE_HINT_DIALOG;
g_return_if_fail (GDK_IS_WINDOW (window));
+ /* initialize to zero to avoid writing uninitialized data to socket */
+ memset(&hints, 0, sizeof(hints));
hints.flags = MWM_HINTS_DECORATIONS;
hints.decorations = decorations;
* @window: a toplevel #GdkWindow
* @functions: bitmask of operations to allow on @window
*
- * This function isn't really good for much. It sets the traditional
- * Motif window manager hint for which operations the window manager
- * should allow on a toplevel window. However, few window managers do
+ * Sets hints about the window management functions to make available
+ * via buttons on the window frame.
+ *
+ * On the X backend, this function sets the traditional Motif window
+ * manager hint for this purpose. However, few window managers do
* anything reliable or interesting with this hint. Many ignore it
* entirely.
*
g_return_if_fail (GDK_IS_WINDOW (window));
+ /* initialize to zero to avoid writing uninitialized data to socket */
+ memset(&hints, 0, sizeof(hints));
hints.flags = MWM_HINTS_FUNCTIONS;
hints.functions = functions;