]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Stop calling gdk_input_add() with a zero flags word. If we don't
authorSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2007 07:28:55 +0000 (07:28 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2007 07:28:55 +0000 (07:28 +0000)
want to know about any input events on a socket, it's simpler not to
call gdk_input_add() on it at all.

I hesitate to say `fixes', but ... this change _causes to go away_
the weird problem I had with blank host key dialogs. I have no
understanding of the chain of cause and effect between gdk_input_add
with zero flags and missing redraw events, but it seems like a
change I should make anyway, so I'm going to do so and hope the
problem doesn't come back :-/

[originally from svn r7164]

unix/GTK2.TODO
unix/gtkwin.c

index be34c96b969d5059c9ae981d22fff1a0fbf79d75..1f1c8b0e0c9b90f054df5a75da31e0f1aad2a420 100644 (file)
@@ -40,9 +40,6 @@ Items from Colin's original mail:
 
 Other items:
 
- - The host key security alert dialog box is coming up the right
-   size but totally blank! Find out why and fix it.
-
  - Since Colin's patch was originally prepared I committed r7117
    (fold up treeview branches at depth 2 or greater), and this is
    not currently replicated in the GTK2 version of the treeview
index e121971ba58774a7580dc6cbc26f10075ffe55cf..c615367a509216c71139dcbb68500487efe8b102 100644 (file)
@@ -2695,11 +2695,15 @@ int uxsel_input_add(int fd, int rwx) {
     if (rwx & 1) flags |= GDK_INPUT_READ;
     if (rwx & 2) flags |= GDK_INPUT_WRITE;
     if (rwx & 4) flags |= GDK_INPUT_EXCEPTION;
-    return gdk_input_add(fd, flags, fd_input_func, NULL);
+    if (flags)
+       return gdk_input_add(fd, flags, fd_input_func, NULL);
+    else
+       return -1;
 }
 
 void uxsel_input_remove(int id) {
-    gdk_input_remove(id);
+    if (id > 0)
+       gdk_input_remove(id);
 }
 
 char *guess_derived_font_name(GdkFont *font, int bold, int wide)