Introduction
Introduction Statistics Contact Development Disclaimer Help
tclosing bars when unfocusing them. - surf - customized build of surf, the suck…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 82b712fdf71f4e019978306efc35293f76694993
parent 8f8abc6146fce495427fdc0ecf97c80ed99bdf44
Author: Enno Boland (tox) <[email protected]>
Date: Thu, 10 Sep 2009 09:44:21 +0200
closing bars when unfocusing them.
Diffstat:
M config.def.h | 1 +
M surf.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/config.def.h b/config.def.h
t@@ -1,6 +1,7 @@
/* modifier 0 means no modifier */
static gchar *progress = "#FF0000";
static gchar *progress_trust = "#00FF00";
+static gchar *background = "#000000";
#define MODKEY GDK_CONTROL_MASK
static Key keys[] = {
/* modifier keyval function arg Foc…
diff --git a/surf.c b/surf.c
t@@ -111,6 +111,7 @@ static void showsearch(Client *c, const Arg *arg);
static void showurl(Client *c, const Arg *arg);
static void stop(Client *c, const Arg *arg);
static void titlechange(WebKitWebView* view, WebKitWebFrame* frame, const gcha…
+static gboolean unfocusbar(GtkWidget *w, GdkEventFocus *e, Client *c);
static void usage(void);
static void update(Client *c);
static void zoom(Client *c, const Arg *arg);
t@@ -196,7 +197,7 @@ drawindicator(Client *c) {
TRUE, 0, 0, w->allocation.width, w->allocation.height);
gdk_draw_rectangle(w->window, gc, TRUE, 0, 0, width,
w->allocation.height);
- g_object_unref(gc);/*g_free(gc);*/
+ g_object_unref(gc);
}
gboolean
t@@ -408,10 +409,12 @@ newclient(void) {
/* urlbar */
c->urlbar = gtk_entry_new();
gtk_entry_set_has_frame(GTK_ENTRY(c->urlbar), FALSE);
+ g_signal_connect(G_OBJECT(c->urlbar), "focus-out-event", G_CALLBACK(un…
/* searchbar */
c->searchbar = gtk_entry_new();
gtk_entry_set_has_frame(GTK_ENTRY(c->searchbar), FALSE);
+ g_signal_connect(G_OBJECT(c->searchbar), "focus-out-event", G_CALLBACK…
/* indicator */
c->indicator = gtk_drawing_area_new();
t@@ -626,6 +629,13 @@ titlechange(WebKitWebView *v, WebKitWebFrame *f, const gc…
update(c);
}
+gboolean
+unfocusbar(GtkWidget *w, GdkEventFocus *e, Client *c) {
+ hidesearch(c, NULL);
+ hideurl(c, NULL);
+ return TRUE;
+}
+
void
usage(void) {
fputs("surf - simple browser\n", stderr);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.