Skip to content

Commit

Permalink
x11/mlterm: Fix build on current
Browse files Browse the repository at this point in the history
  • Loading branch information
MANTANI Nobutaka authored and MANTANI Nobutaka committed Jul 1, 2023
1 parent 4df4983 commit 1a1b4f3
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
46 changes: 46 additions & 0 deletions x11/mlterm/files/patch-gtk_vte.c
@@ -0,0 +1,46 @@
--- gtk/vte.c.orig 2023-04-01 13:54:40 UTC
+++ gtk/vte.c
@@ -1327,8 +1327,8 @@ static void init_screen(VteTerminal *terminal, ui_font

PVT(terminal)->screen->xterm_listener.set_window_name = set_window_name;
PVT(terminal)->screen->xterm_listener.set_icon_name = set_icon_name;
- PVT(terminal)->xterm_resize = PVT(terminal)->screen->xterm_listener.resize;
- PVT(terminal)->screen->xterm_listener.resize = xterm_resize;
+ PVT(terminal)->xterm_resize = (void (*)(void *, u_int, u_int, int))PVT(terminal)->screen->xterm_listener.resize;
+ PVT(terminal)->screen->xterm_listener.resize = (void (*)(void *, u_int, u_int, int, int))xterm_resize;

orig_select_in_window = PVT(terminal)->screen->sel_listener.select_in_window;
PVT(terminal)->screen->sel_listener.select_in_window = select_in_window;
@@ -3369,19 +3369,19 @@ void vte_terminal_set_color_dim_rgba(VteTerminal *term

#if GTK_CHECK_VERSION(2, 99, 0)
void vte_terminal_set_color_bold_rgba(VteTerminal *terminal, const GdkRGBA *bold) {
- set_color_bold(terminal, bold, gdk_rgba_to_string2);
+ set_color_bold(terminal, bold, (gchar *(*)(const void *))gdk_rgba_to_string2);
}

void vte_terminal_set_color_foreground_rgba(VteTerminal *terminal, const GdkRGBA *foreground) {
- set_color_foreground(terminal, foreground, gdk_rgba_to_string2);
+ set_color_foreground(terminal, foreground, (gchar *(*)(const void *))gdk_rgba_to_string2);
}

void vte_terminal_set_color_background_rgba(VteTerminal *terminal, const GdkRGBA *background) {
- set_color_background(terminal, background, gdk_rgba_to_string2);
+ set_color_background(terminal, background, (gchar *(*)(const void *))gdk_rgba_to_string2);
}

void vte_terminal_set_color_cursor_rgba(VteTerminal *terminal, const GdkRGBA *cursor_background) {
- set_color_cursor(terminal, cursor_background, gdk_rgba_to_string2);
+ set_color_cursor(terminal, cursor_background, (gchar *(*)(const void *))gdk_rgba_to_string2);
}

#if VTE_CHECK_VERSION(0, 44, 0)
@@ -3418,7 +3418,7 @@ void vte_terminal_set_color_highlight_foreground_rgba(
void vte_terminal_set_colors_rgba(VteTerminal *terminal, const GdkRGBA *foreground,
const GdkRGBA *background, const GdkRGBA *palette,
gsize palette_size) {
- if (set_colors(terminal, palette, palette_size, sizeof(GdkRGBA), gdk_rgba_to_string2) &&
+ if (set_colors(terminal, palette, palette_size, sizeof(GdkRGBA), (gchar *(*)(const char *))gdk_rgba_to_string2) &&
palette_size > 0) {
if (foreground == NULL) {
foreground = &palette[7];
11 changes: 11 additions & 0 deletions x11/mlterm/files/patch-uitoolkit_libtype_ui__window__cairo.c
@@ -0,0 +1,11 @@
--- uitoolkit/libtype/ui_window_cairo.c.orig 2023-07-01 12:37:30 UTC
+++ uitoolkit/libtype/ui_window_cairo.c
@@ -54,7 +54,7 @@ static void adjust_glyphs(ui_font_t *font, cairo_glyph

static void flush_glyphs(cairo_t *cr) {
if (num_glyph_buf > 0) {
- u_long pixel = cairo_get_user_data(cr, (cairo_user_data_key_t*)2);
+ u_long pixel = (u_long)cairo_get_user_data(cr, (cairo_user_data_key_t*)2);

cairo_set_scaled_font(cr, cairo_get_user_data(cr, (cairo_user_data_key_t*)1));
cairo_set_source_rgba(cr,

0 comments on commit 1a1b4f3

Please sign in to comment.