From d9957b7526593c195e4434728906022f09a6d6bb Mon Sep 17 00:00:00 2001 From: george82 Date: Fri, 11 Mar 2005 14:22:14 +0000 Subject: [PATCH] ChoosePixelFormatDialog, OptionsDialog and GotoPosDialog must have a parent window (player's main window). git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@243 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- rfbplayer/ChoosePixelFormatDialog.h | 4 ++-- rfbplayer/GotoPosDialog.h | 4 ++-- rfbplayer/OptionsDialog.h | 4 ++-- rfbplayer/rfbplayer.cxx | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rfbplayer/ChoosePixelFormatDialog.h b/rfbplayer/ChoosePixelFormatDialog.h index b85d4d99..130da4bc 100644 --- a/rfbplayer/ChoosePixelFormatDialog.h +++ b/rfbplayer/ChoosePixelFormatDialog.h @@ -26,8 +26,8 @@ public: pf(_pf), combo(0) {} // - Show the dialog and return true if OK was clicked, // false in case of error or Cancel - virtual bool showDialog() { - return Dialog::showDialog(MAKEINTRESOURCE(IDD_PIXELFORMAT)); + virtual bool showDialog(HWND parent) { + return Dialog::showDialog(MAKEINTRESOURCE(IDD_PIXELFORMAT), parent); } const long getPF() const {return pf;} protected: diff --git a/rfbplayer/GotoPosDialog.h b/rfbplayer/GotoPosDialog.h index 6758be21..ddbbe53a 100644 --- a/rfbplayer/GotoPosDialog.h +++ b/rfbplayer/GotoPosDialog.h @@ -25,8 +25,8 @@ public: GotoPosDialog() : Dialog(GetModuleHandle(0)) {} // - Show the dialog and return true if OK was clicked, // false in case of error or Cancel - virtual bool showDialog() { - return Dialog::showDialog(MAKEINTRESOURCE(IDD_GOTO)); + virtual bool showDialog(HWND parent) { + return Dialog::showDialog(MAKEINTRESOURCE(IDD_GOTO), parent); } const long getPos() const {return pos;} protected: diff --git a/rfbplayer/OptionsDialog.h b/rfbplayer/OptionsDialog.h index c7affca0..7cc0a52f 100644 --- a/rfbplayer/OptionsDialog.h +++ b/rfbplayer/OptionsDialog.h @@ -28,8 +28,8 @@ public: : Dialog(GetModuleHandle(0)), options(_options), combo(0) {} // - Show the dialog and return true if OK was clicked, // false in case of error or Cancel - virtual bool showDialog() { - return Dialog::showDialog(MAKEINTRESOURCE(IDD_OPTIONS)); + virtual bool showDialog(HWND parent) { + return Dialog::showDialog(MAKEINTRESOURCE(IDD_OPTIONS), parent); } protected: diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx index 81fc7c2b..a9931cc6 100644 --- a/rfbplayer/rfbplayer.cxx +++ b/rfbplayer/rfbplayer.cxx @@ -344,7 +344,7 @@ RfbPlayer::processMainMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case ID_GOTO: { GotoPosDialog gotoPosDlg; - if (gotoPosDlg.showDialog()) { + if (gotoPosDlg.showDialog(getMainHandle())) { long gotoTime = min(gotoPosDlg.getPos(), sessionTimeMs); setPos(gotoTime); updatePos(gotoTime); @@ -377,7 +377,7 @@ RfbPlayer::processMainMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case ID_OPTIONS: { OptionsDialog optionsDialog(&options); - optionsDialog.showDialog(); + optionsDialog.showDialog(getMainHandle()); } break; case ID_EXIT: @@ -877,7 +877,7 @@ void RfbPlayer::serverInit() { static long pixelFormat = PF_AUTO; if (options.askPixelFormat) { ChoosePixelFormatDialog choosePixelFormatDialog(pixelFormat); - if (choosePixelFormatDialog.showDialog()) { + if (choosePixelFormatDialog.showDialog(getMainHandle())) { pixelFormat = choosePixelFormatDialog.getPF(); } else { is->pausePlayback(); -- 2.39.5