diff options
| author | Jan Djärv | 2005-08-13 09:48:36 +0000 |
|---|---|---|
| committer | Jan Djärv | 2005-08-13 09:48:36 +0000 |
| commit | cb515a21c74f594bba6c8b917d271b1eeeacdf36 (patch) | |
| tree | 0bc22746109ecfaee7efd5e8687da45ac56dab16 /src | |
| parent | 5695f1b4ba430c364635cad172f5746a98c7426d (diff) | |
| download | emacs-cb515a21c74f594bba6c8b917d271b1eeeacdf36.tar.gz emacs-cb515a21c74f594bba6c8b917d271b1eeeacdf36.zip | |
* xterm.c (x_wm_set_icon_pixmap): Call xg_get_pixbuf_from_pix_and_mask
to get an GTK icon and set it with GTK functions to avoid having GTK
override an icon set with just X functions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index 35c12938fc0..84b1dae3515 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9250,7 +9250,19 @@ x_wm_set_icon_pixmap (f, pixmap_id) | |||
| 9250 | #endif | 9250 | #endif |
| 9251 | } | 9251 | } |
| 9252 | 9252 | ||
| 9253 | #ifdef USE_X_TOOLKIT /* same as in x_wm_set_window_state. */ | 9253 | |
| 9254 | #ifdef USE_GTK | ||
| 9255 | { | ||
| 9256 | GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); | ||
| 9257 | GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); | ||
| 9258 | GdkPixmap *gmask = gdk_pixmap_foreign_new_for_display (gdpy, icon_mask); | ||
| 9259 | GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, NULL); | ||
| 9260 | |||
| 9261 | gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp); | ||
| 9262 | return; | ||
| 9263 | } | ||
| 9264 | |||
| 9265 | #elif defined (USE_X_TOOLKIT) /* same as in x_wm_set_window_state. */ | ||
| 9254 | 9266 | ||
| 9255 | { | 9267 | { |
| 9256 | Arg al[1]; | 9268 | Arg al[1]; |
| @@ -9260,12 +9272,12 @@ x_wm_set_icon_pixmap (f, pixmap_id) | |||
| 9260 | XtSetValues (f->output_data.x->widget, al, 1); | 9272 | XtSetValues (f->output_data.x->widget, al, 1); |
| 9261 | } | 9273 | } |
| 9262 | 9274 | ||
| 9263 | #else /* not USE_X_TOOLKIT */ | 9275 | #else /* not USE_X_TOOLKIT && not USE_GTK */ |
| 9264 | 9276 | ||
| 9265 | f->output_data.x->wm_hints.flags |= (IconPixmapHint | IconMaskHint); | 9277 | f->output_data.x->wm_hints.flags |= (IconPixmapHint | IconMaskHint); |
| 9266 | XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints); | 9278 | XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints); |
| 9267 | 9279 | ||
| 9268 | #endif /* not USE_X_TOOLKIT */ | 9280 | #endif /* not USE_X_TOOLKIT && not USE_GTK */ |
| 9269 | } | 9281 | } |
| 9270 | 9282 | ||
| 9271 | void | 9283 | void |