diff options
| author | Po Lu | 2023-08-01 10:34:33 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-01 10:34:33 +0800 |
| commit | 74d6604eaa2d770626309181ac4bc4f2598e63e7 (patch) | |
| tree | da81fdaabe8e41afa9b5518bdbee8ecdaa605a79 /src/pgtkterm.c | |
| parent | bfb7c58ac5c322d6363e83f68afa88fc88ba2a0f (diff) | |
| download | emacs-74d6604eaa2d770626309181ac4bc4f2598e63e7.tar.gz emacs-74d6604eaa2d770626309181ac4bc4f2598e63e7.zip | |
Fix stipple support on PGTK
* src/image.c (image_create_pattern_from_pixbuf): Remove function.
(image_bitmap_to_cr_pattern): New function.
(image_create_bitmap_from_data):
(image_create_bitmap_from_file): Create patterns with the correct
mask values directly from bitmap data. Also, don't rely on GDK
to read XPMs, as that format isn't supported anymore.
* src/pgtkterm.c (pgtk_bitmap_icon): Disable already nonfunctional
code.
(pgtk_display_x_warning): Wrap warning message.
* src/pgtkterm.h (struct pgtk_bitmap_record): Remove `img' field.
(bug#64969)
Diffstat (limited to 'src/pgtkterm.c')
| -rw-r--r-- | src/pgtkterm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c index dc2d6477bb5..9c1fc7bef4e 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c | |||
| @@ -3147,11 +3147,15 @@ pgtk_scroll_run (struct window *w, struct run *run) | |||
| 3147 | 3147 | ||
| 3148 | /* Icons. */ | 3148 | /* Icons. */ |
| 3149 | 3149 | ||
| 3150 | /* Make the x-window of frame F use the gnu icon bitmap. */ | ||
| 3151 | |||
| 3152 | static bool | 3150 | static bool |
| 3153 | pgtk_bitmap_icon (struct frame *f, Lisp_Object file) | 3151 | pgtk_bitmap_icon (struct frame *f, Lisp_Object file) |
| 3154 | { | 3152 | { |
| 3153 | /* This code has never worked anyway for the reason that Wayland | ||
| 3154 | uses icons set within desktop files, and has been disabled | ||
| 3155 | because leaving it intact would require image.c to retain a | ||
| 3156 | reference to a GdkPixbuf (which are no longer used) within new | ||
| 3157 | bitmaps. */ | ||
| 3158 | #if 0 | ||
| 3155 | ptrdiff_t bitmap_id; | 3159 | ptrdiff_t bitmap_id; |
| 3156 | 3160 | ||
| 3157 | if (FRAME_GTK_WIDGET (f) == 0) | 3161 | if (FRAME_GTK_WIDGET (f) == 0) |
| @@ -3207,12 +3211,8 @@ pgtk_bitmap_icon (struct frame *f, Lisp_Object file) | |||
| 3207 | bitmap_id = FRAME_DISPLAY_INFO (f)->icon_bitmap_id; | 3211 | bitmap_id = FRAME_DISPLAY_INFO (f)->icon_bitmap_id; |
| 3208 | } | 3212 | } |
| 3209 | 3213 | ||
| 3210 | if (FRAME_DISPLAY_INFO (f)->bitmaps[bitmap_id - 1].img != NULL) | ||
| 3211 | gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | ||
| 3212 | FRAME_DISPLAY_INFO (f)->bitmaps[bitmap_id - 1].img); | ||
| 3213 | |||
| 3214 | f->output_data.pgtk->icon_bitmap = bitmap_id; | 3214 | f->output_data.pgtk->icon_bitmap = bitmap_id; |
| 3215 | 3215 | #endif /* 0 */ | |
| 3216 | return false; | 3216 | return false; |
| 3217 | } | 3217 | } |
| 3218 | 3218 | ||
| @@ -6685,12 +6685,12 @@ pgtk_display_x_warning (GdkDisplay *display) | |||
| 6685 | gtk_window_set_title (window, "Warning"); | 6685 | gtk_window_set_title (window, "Warning"); |
| 6686 | gtk_window_set_screen (window, screen); | 6686 | gtk_window_set_screen (window, screen); |
| 6687 | 6687 | ||
| 6688 | label = gtk_label_new ("You are trying to run Emacs configured with" | 6688 | label = gtk_label_new ("You are trying to run Emacs configured with\n" |
| 6689 | " the \"pure-GTK\" interface under the X Window" | 6689 | " the \"pure-GTK\" interface under the X Window\n" |
| 6690 | " System. That configuration is unsupported and" | 6690 | " System. That configuration is unsupported and\n" |
| 6691 | " will lead to sporadic crashes during transfer of" | 6691 | " will lead to sporadic crashes during transfer of\n" |
| 6692 | " large selection data. It will also lead to" | 6692 | " large selection data. It will also lead to\n" |
| 6693 | " various problems with keyboard input."); | 6693 | " various problems with keyboard input.\n"); |
| 6694 | gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); | 6694 | gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); |
| 6695 | gtk_container_add (GTK_CONTAINER (content_area), label); | 6695 | gtk_container_add (GTK_CONTAINER (content_area), label); |
| 6696 | gtk_widget_show (label); | 6696 | gtk_widget_show (label); |