]> source.dussan.org Git - tigervnc.git/commitdiff
Fix closing reconnect dialog logic
authorPierre Ossman <ossman@cendio.se>
Thu, 14 Oct 2021 10:42:05 +0000 (12:42 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 14 Oct 2021 10:44:23 +0000 (12:44 +0200)
If you close the reconnect dialog then we should assume that you want to
close things, not that you want to reconnect. Unfortunately FLTK returns
the first choice when closing the dialog, so that needs to be the
"Cancel" alternative.

(cherry picked from commit 7fe85cd4a7ce89b55662fd445b78d50001bad68a)

vncviewer/vncviewer.cxx

index d5c2f2bb911904fd9cc7d797ea74c3a73c0e706c..c8f5ef3b488a08d877a800cb79efba630bbd91a8 100644 (file)
@@ -211,10 +211,10 @@ static void mainloop(const char* vncserver, network::Socket* sock)
       int ret;
       ret = fl_choice(_("%s\n\n"
                         "Attempt to reconnect?"),
-                      fl_yes, fl_no, 0, exitError);
+                      NULL, fl_yes, fl_no, exitError);
       free(exitError);
       exitError = NULL;
-      if (ret == 0)
+      if (ret == 1)
         continue;
       else
         break;