emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/gtkutil.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/gtkutil.c
Date: Tue, 16 Aug 2005 15:33:40 -0400

Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.68 emacs/src/gtkutil.c:1.69
*** emacs/src/gtkutil.c:1.68    Sat Aug 13 09:48:17 2005
--- emacs/src/gtkutil.c Tue Aug 16 19:33:40 2005
***************
*** 241,247 ****
  
  /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel.  */
  
! GdkPixbuf *
  xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap)
       GdkPixmap *gpix;
       GdkPixmap *gmask;
--- 241,247 ----
  
  /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel.  */
  
! static GdkPixbuf *
  xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap)
       GdkPixmap *gpix;
       GdkPixmap *gmask;
***************
*** 949,954 ****
--- 949,972 ----
        gtk_widget_modify_bg (FRAME_GTK_WIDGET (f), GTK_STATE_NORMAL, &gdk_bg);
        UNBLOCK_INPUT;
      }
+ }
+ 
+ 
+ /* Set the frame icon to ICON_PIXMAP/MASK.  This must be done with GTK
+    functions so GTK does not overwrite the icon.  */
+ 
+ void
+ xg_set_frame_icon (f, icon_pixmap, icon_mask)
+      FRAME_PTR f;
+      Pixmap icon_pixmap;
+      Pixmap icon_mask;
+ {
+     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);
  }
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]