Call mplayerLoadSubtitle() after destruction of the file selector window.
authorib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 13 Apr 2018 09:02:51 +0000 (09:02 +0000)
committerib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 13 Apr 2018 09:02:51 +0000 (09:02 +0000)
In case of an error, it allows X to redraw the parts of the windows
previously covered by the file selector prior to displaying the error
message box.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38076 b3059339-0415-0410-9bf9-f77b7e298cf2

gui/dialog/fileselect.c

index b7fced4..ad7670a 100644 (file)
@@ -503,7 +503,6 @@ static void fs_Ok_released(GtkButton *button, gpointer user_data)
 
     case FILESELECT_SUBTITLE:
         setddup(&guiInfo.SubtitleFilename, fsSelectedDirectory, fsSelectedFile);
-        mplayerLoadSubtitle(guiInfo.SubtitleFilename);
         break;
 
     case FILESELECT_AUDIO:
@@ -550,6 +549,9 @@ static void fs_Ok_released(GtkButton *button, gpointer user_data)
         uiEvent(ev, 0);
     } else
         gui(GUI_SET_STATE, (void *)GUI_STOP);
+
+    if (fsType == FILESELECT_SUBTITLE)
+        mplayerLoadSubtitle(guiInfo.SubtitleFilename);
 }
 
 /**