1. L Nix
  2. vimprobable

Commits

hpdeifel  committed f44c6bd

Don't modify the input bar if it's focused

Prevents echo() from setting the text of the input bar if it has the
focus (i.e. the user is currently typing something).

committer: Hannes Schueller <hannes@yllr.net>

  • Participants
  • Parent commits 5351121
  • Branches default

Comments (0)

Files changed (1)

File main.c

View file
     if (index < Info || index > Error)
         return TRUE;
 
-    set_widget_font_and_color(inputbox, urlboxfont[index], urlboxbgcolor[index], urlboxcolor[index]);
-    gtk_entry_set_text(GTK_ENTRY(inputbox), !arg->s ? "" : arg->s);
+    if (!gtk_widget_is_focus(GTK_WIDGET(inputbox))) {
+        set_widget_font_and_color(inputbox, urlboxfont[index], urlboxbgcolor[index], urlboxcolor[index]);
+        gtk_entry_set_text(GTK_ENTRY(inputbox), !arg->s ? "" : arg->s);
+    }
 
     return TRUE;
 }