patch 9.2.0514: GTK4: build errors when socketserver is enabled

Problem:  GTK4: build errors when socketserver is enabled
          (after v9.2.0512)
Solution: Drop unused functions (Foxe Chen)

closes: #20293

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Foxe Chen
2026-05-22 22:18:03 +00:00
committed by Christian Brabandt
parent 25e4e46c58
commit ea71d5bb01
3 changed files with 2 additions and 62 deletions
-60
View File
@@ -112,13 +112,6 @@ vim_parse_geometry(const char *str, int *x, int *y,
return mask;
}
#ifdef FEAT_SOCKETSERVER
# include <glib-unix.h>
// Used to track the source for the listening socket
static guint socket_server_source_id = 0;
#endif
#if defined(FEAT_MOUSESHAPE)
// Last set mouse pointer shape
static int last_shape = 0;
@@ -2991,59 +2984,6 @@ gui_get_x11_windis(Window *win UNUSED, Display **dis UNUSED)
return FAIL;
}
#if defined(FEAT_SOCKETSERVER)
/*
* Callback for new events from the socket server listening socket.
*/
static int
socket_server_poll_in(int fd UNUSED, GIOCondition cond,
void *user_data UNUSED)
{
if (cond & G_IO_IN)
socket_server_accept_client();
else if (cond & (G_IO_ERR | G_IO_HUP))
{
socket_server_uninit();
return FALSE;
}
return TRUE;
}
#endif // FEAT_SOCKETSERVER
/*
* Initialize socket server for use in the GUI (does not actually initialize
* the socket server, only attaches a source).
*/
void
gui_gtk_init_socket_server(void)
{
#if defined(FEAT_SOCKETSERVER)
if (socket_server_source_id > 0)
return;
// Register source for file descriptor to global default context
socket_server_source_id = g_unix_fd_add(socket_server_get_fd(),
G_IO_IN | G_IO_ERR | G_IO_HUP, socket_server_poll_in, NULL);
#endif
}
/*
* Remove the source for the socket server listening socket.
*/
void
gui_gtk_uninit_socket_server(void)
{
#if defined(FEAT_SOCKETSERVER)
if (socket_server_source_id > 0)
{
g_source_remove(socket_server_source_id);
socket_server_source_id = 0;
}
#endif
}
void
gui_gtk_set_mnemonics(int enable UNUSED)
{
-2
View File
@@ -70,8 +70,6 @@ void gui_mch_destroy_sign(void *sign);
int gui_gtk_draw_string_ext(int row, int col, char_u *s, int len, int flags, int force_pango);
int gui_gtk_draw_string(int row, int col, char_u *s, int len, int flags);
int gui_get_x11_windis(Window *win, Display **dis);
void gui_gtk_init_socket_server(void);
void gui_gtk_uninit_socket_server(void);
void gui_gtk_set_mnemonics(int enable);
void gui_make_popup(char_u *path_name, int mouse_pos);
int get_menu_tool_width(void);
+2
View File
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
514,
/**/
513,
/**/