Mercurial > mplayer.hg
changeset 35800:6a7be705643b
Change window reload order.
Main and video window must come first.
author | ib |
---|---|
date | Sat, 26 Jan 2013 00:17:08 +0000 |
parents | fa803d807b58 |
children | 98693cc5df48 |
files | gui/ui/actions.c |
diffstat | 1 files changed, 23 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/actions.c Sat Jan 26 00:07:38 2013 +0000 +++ b/gui/ui/actions.c Sat Jan 26 00:17:08 2013 +0000 @@ -602,25 +602,15 @@ } } - /* reload menu window */ + /* reload main window (must be first!) */ - if (was_menu && guiApp.menuIsPresent) { - free(menuDrawBuffer); - menuDrawBuffer = calloc(1, guiApp.menu.Bitmap.ImageSize); + uiMainDone(); + uiMainInit(); - if (!menuDrawBuffer) { - gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); - mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); - } + wsWindowVisibility(&guiApp.mainWindow, wsShowWindow); + mainVisible = True; - wsWindowResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); - wsImageResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); - wsWindowShape(&guiApp.menuWindow, guiApp.menu.Mask.Image); - wsWindowVisibility(&guiApp.menuWindow, wsHideWindow); - } else - uiMenuInit(); - - /* reload video window */ + /* reload video window (must be second!) */ if (guiApp.video.Bitmap.Image) wsImageResize(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height); @@ -643,13 +633,25 @@ uiPlaybarInit(); - /* reload main window */ + /* reload menu window */ + + if (was_menu && guiApp.menuIsPresent) { + free(menuDrawBuffer); + menuDrawBuffer = calloc(1, guiApp.menu.Bitmap.ImageSize); - uiMainDone(); - uiMainInit(); + if (!menuDrawBuffer) { + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); + } - wsWindowVisibility(&guiApp.mainWindow, wsShowWindow); - mainVisible = True; + wsWindowResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); + wsImageResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); + wsWindowShape(&guiApp.menuWindow, guiApp.menu.Mask.Image); + wsWindowVisibility(&guiApp.menuWindow, wsHideWindow); + } else + uiMenuInit(); + + /* */ btnModify(evSetVolume, guiInfo.Volume); btnModify(evSetBalance, guiInfo.Balance);