aboutsummaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2024-03-17 07:59:30 +0100
committerQuentin Rameau <quinq@fifth.space>2024-03-17 08:22:18 +0100
commit2ea91766bbd2f0689df3fbc9793c10c4376c0389 (patch)
tree6c64d752370cf34fe1b39b0d692cadd7e694e95a /surf.c
parent7513a622e3d0d0fd2cc1a372dd1fd8b087922691 (diff)
webext: Remove unused functions
Communication from web extension to surf isn't used, this code can always be brought back if needed.
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/surf.c b/surf.c
index 209120f..f35cb05 100644
--- a/surf.c
+++ b/surf.c
@@ -189,7 +189,6 @@ static gboolean buttonreleased(GtkWidget *w, GdkEvent *e, Client *c);
static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event,
gpointer d);
static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c);
-static gboolean readsock(GIOChannel *s, GIOCondition ioc, gpointer unused);
static void showview(WebKitWebView *v, Client *c);
static GtkWidget *createwindow(Client *c);
static gboolean loadfailedtls(WebKitWebView *v, gchar *uri,
@@ -370,7 +369,6 @@ setup(void)
g_io_channel_set_flags(gchanin, g_io_channel_get_flags(gchanin)
| G_IO_FLAG_NONBLOCK, NULL);
g_io_channel_set_close_on_unref(gchanin, TRUE);
- g_io_add_watch(gchanin, G_IO_IN, readsock, NULL);
}
@@ -1226,30 +1224,6 @@ newview(Client *c, WebKitWebView *rv)
return v;
}
-static gboolean
-readsock(GIOChannel *s, GIOCondition ioc, gpointer unused)
-{
- static char msg[MSGBUFSZ];
- GError *gerr = NULL;
- gsize msgsz;
-
- if (g_io_channel_read_chars(s, msg, sizeof(msg), &msgsz, &gerr) !=
- G_IO_STATUS_NORMAL) {
- if (gerr) {
- fprintf(stderr, "surf: error reading socket: %s\n",
- gerr->message);
- g_error_free(gerr);
- }
- return TRUE;
- }
- if (msgsz < 2) {
- fprintf(stderr, "surf: message too short: %d\n", msgsz);
- return TRUE;
- }
-
- return TRUE;
-}
-
void
initwebextensions(WebKitWebContext *wc, Client *c)
{