X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a6d0ae558ac9a0ebd3e084c883efdadcc00289a0..cb515a21c74f594bba6c8b917d271b1eeeacdf36:/src/xterm.c diff --git a/src/xterm.c b/src/xterm.c index ab299d1fa3..84b1dae351 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1,6 +1,6 @@ /* X Communication module for terminals which understand the X protocol. Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -16,8 +16,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ /* New display code by Gerd Moellmann . */ /* Xt features made by Fred Pierresteguy. */ @@ -9250,7 +9250,19 @@ x_wm_set_icon_pixmap (f, pixmap_id) #endif } -#ifdef USE_X_TOOLKIT /* same as in x_wm_set_window_state. */ + +#ifdef USE_GTK + { + GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); + GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); + GdkPixmap *gmask = gdk_pixmap_foreign_new_for_display (gdpy, icon_mask); + GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, NULL); + + gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp); + return; + } + +#elif defined (USE_X_TOOLKIT) /* same as in x_wm_set_window_state. */ { Arg al[1]; @@ -9260,12 +9272,12 @@ x_wm_set_icon_pixmap (f, pixmap_id) XtSetValues (f->output_data.x->widget, al, 1); } -#else /* not USE_X_TOOLKIT */ +#else /* not USE_X_TOOLKIT && not USE_GTK */ f->output_data.x->wm_hints.flags |= (IconPixmapHint | IconMaskHint); XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints); -#endif /* not USE_X_TOOLKIT */ +#endif /* not USE_X_TOOLKIT && not USE_GTK */ } void