diff --git a/ChangeLog b/ChangeLog index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 05e7b6a695..0e39bff3a5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Wed Feb 10 10:43:50 1999 Owen Taylor + + * gdk/gdkwindow.c (gdk_window_set_icon, gdk_window_set_group): + Supplement the existing WMNormalHints, don't + overwrite them. + Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index e941db46f4..076d763789 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -2008,7 +2008,7 @@ gdk_window_set_icon (GdkWindow *window, GdkPixmap *pixmap, GdkBitmap *mask) { - XWMHints wm_hints; + XWMHints *wm_hints; GdkWindowPrivate *window_private; GdkWindowPrivate *private; @@ -2016,31 +2016,34 @@ gdk_window_set_icon (GdkWindow *window, window_private = (GdkWindowPrivate*) window; if (window_private->destroyed) return; - - wm_hints.flags = 0; - + + wm_hints = XGetWMHints (window_private->xdisplay, window_private->xwindow); + if (!wm_hints) + wm_hints = XAllocWMHints (); + if (icon_window != NULL) { private = (GdkWindowPrivate *)icon_window; - wm_hints.flags |= IconWindowHint; - wm_hints.icon_window = private->xwindow; + wm_hints->flags |= IconWindowHint; + wm_hints->icon_window = private->xwindow; } if (pixmap != NULL) { private = (GdkWindowPrivate *)pixmap; - wm_hints.flags |= IconPixmapHint; - wm_hints.icon_pixmap = private->xwindow; + wm_hints->flags |= IconPixmapHint; + wm_hints->icon_pixmap = private->xwindow; } if (mask != NULL) { private = (GdkWindowPrivate *)mask; - wm_hints.flags |= IconMaskHint; - wm_hints.icon_mask = private->xwindow; + wm_hints->flags |= IconMaskHint; + wm_hints->icon_mask = private->xwindow; } - - XSetWMHints (window_private->xdisplay, window_private->xwindow, &wm_hints); + + XSetWMHints (window_private->xdisplay, window_private->xwindow, wm_hints); + XFree (wm_hints); } void @@ -2075,7 +2078,7 @@ void gdk_window_set_group (GdkWindow *window, GdkWindow *leader) { - XWMHints wm_hints; + XWMHints *wm_hints; GdkWindowPrivate *window_private; GdkWindowPrivate *private; @@ -2086,10 +2089,16 @@ gdk_window_set_group (GdkWindow *window, return; private = (GdkWindowPrivate *)leader; - wm_hints.flags = WindowGroupHint; - wm_hints.window_group = private->xwindow; - - XSetWMHints (window_private->xdisplay, window_private->xwindow, &wm_hints); + + wm_hints = XGetWMHints (window_private->xdisplay, window_private->xwindow); + if (!wm_hints) + wm_hints = XAllocWMHints (); + + wm_hints->flags |= WindowGroupHint; + wm_hints->window_group = private->xwindow; + + XSetWMHints (window_private->xdisplay, window_private->xwindow, wm_hints); + XFree (wm_hints); } static void diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index e941db46f4..076d763789 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -2008,7 +2008,7 @@ gdk_window_set_icon (GdkWindow *window, GdkPixmap *pixmap, GdkBitmap *mask) { - XWMHints wm_hints; + XWMHints *wm_hints; GdkWindowPrivate *window_private; GdkWindowPrivate *private; @@ -2016,31 +2016,34 @@ gdk_window_set_icon (GdkWindow *window, window_private = (GdkWindowPrivate*) window; if (window_private->destroyed) return; - - wm_hints.flags = 0; - + + wm_hints = XGetWMHints (window_private->xdisplay, window_private->xwindow); + if (!wm_hints) + wm_hints = XAllocWMHints (); + if (icon_window != NULL) { private = (GdkWindowPrivate *)icon_window; - wm_hints.flags |= IconWindowHint; - wm_hints.icon_window = private->xwindow; + wm_hints->flags |= IconWindowHint; + wm_hints->icon_window = private->xwindow; } if (pixmap != NULL) { private = (GdkWindowPrivate *)pixmap; - wm_hints.flags |= IconPixmapHint; - wm_hints.icon_pixmap = private->xwindow; + wm_hints->flags |= IconPixmapHint; + wm_hints->icon_pixmap = private->xwindow; } if (mask != NULL) { private = (GdkWindowPrivate *)mask; - wm_hints.flags |= IconMaskHint; - wm_hints.icon_mask = private->xwindow; + wm_hints->flags |= IconMaskHint; + wm_hints->icon_mask = private->xwindow; } - - XSetWMHints (window_private->xdisplay, window_private->xwindow, &wm_hints); + + XSetWMHints (window_private->xdisplay, window_private->xwindow, wm_hints); + XFree (wm_hints); } void @@ -2075,7 +2078,7 @@ void gdk_window_set_group (GdkWindow *window, GdkWindow *leader) { - XWMHints wm_hints; + XWMHints *wm_hints; GdkWindowPrivate *window_private; GdkWindowPrivate *private; @@ -2086,10 +2089,16 @@ gdk_window_set_group (GdkWindow *window, return; private = (GdkWindowPrivate *)leader; - wm_hints.flags = WindowGroupHint; - wm_hints.window_group = private->xwindow; - - XSetWMHints (window_private->xdisplay, window_private->xwindow, &wm_hints); + + wm_hints = XGetWMHints (window_private->xdisplay, window_private->xwindow); + if (!wm_hints) + wm_hints = XAllocWMHints (); + + wm_hints->flags |= WindowGroupHint; + wm_hints->window_group = private->xwindow; + + XSetWMHints (window_private->xdisplay, window_private->xwindow, wm_hints); + XFree (wm_hints); } static void