From d66d9d5bf0569376318cfc0b83ab953929606a94 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 9 Aug 1999 20:49:34 +0000 Subject: [PATCH] A fix for wxTaskBarIcon (temporary wxFrame interfering with app shutdown); added event handler for tbtest.cpp so it'll quit properly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 7 +++ distrib/msw/gtk.rsp | 2 +- distrib/msw/makefile.rsp | 94 +------------------------------------- distrib/msw/motif.rsp | 1 - distrib/msw/tmake/vc.t | 4 ++ distrib/msw/user.rsp | 10 ---- distrib/msw/zipdist.bat | 4 ++ samples/taskbar/tbtest.cpp | 1 + src/msw/makefile.vc | 6 ++- src/msw/taskbar.cpp | 6 +++ src/msw/window.cpp | 2 +- 11 files changed, 30 insertions(+), 107 deletions(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index dc4edd4941..2b67cdbebc 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -39,6 +39,7 @@ docs/html/*.gif src/*.inc src/mkdir +src/Makefile src/common/*.cpp src/common/dosyacc.c @@ -46,6 +47,8 @@ src/common/doslex.c src/common/vmsyacc.c src/common/vmslex.c src/common/extended.c +src/common/unzip.c +src/common/unzip.h src/common/*.l src/common/*.y src/common/*.inc @@ -91,6 +94,10 @@ include/wx/wx_setup.vms include/wx/common/*.h include/wx/generic/*.h include/wx/unix/*.h +include/wx/html/*.h +include/wx/html/msw/*.bmp +include/wx/html/msw/*.ico +include/wx/html/msw/*.rc lib/dummy bin/*.* diff --git a/distrib/msw/gtk.rsp b/distrib/msw/gtk.rsp index 2d434b3bdf..584c874cf0 100644 --- a/distrib/msw/gtk.rsp +++ b/distrib/msw/gtk.rsp @@ -12,12 +12,12 @@ include/install-sh include/wx/install-sh src/Makefile -src/Makefile.in src/gtk.inc src/make.env src/makelib.env src/makeprog.env +src/gtk/Makefile src/gtk/*.cpp src/gtk/*.c src/gtk/*.inc diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index 4ea2beb18e..70323c5acd 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -1,97 +1,5 @@ -samples/bombs/Makefile.in -samples/bombs/Makefile -samples/checklst/Makefile.in -samples/checklst/Makefile -samples/config/Makefile.in -samples/config/Makefile -samples/controls/Makefile.in -samples/controls/Makefile -samples/db/Makefile.in -samples/db/Makefile -samples/dde/Makefile.in -samples/dde/Makefile -samples/dialogs/Makefile.in -samples/dialogs/Makefile -samples/dnd/Makefile.in -samples/dnd/Makefile -samples/docview/Makefile.in -samples/docview/Makefile -samples/docvwmdi/Makefile.in -samples/docvwmdi/Makefile -samples/dynamic/Makefile.in -samples/dynamic/Makefile -samples/forty/Makefile.in -samples/forty/Makefile -samples/fractal/Makefile.in -samples/fractal/Makefile -samples/grid/Makefile.in -samples/grid/Makefile -samples/help/Makefile.in -samples/help/Makefile -samples/image/Makefile.in -samples/image/Makefile -samples/internat/Makefile.in -samples/internat/Makefile -samples/layout/Makefile.in -samples/layout/Makefile -samples/listctrl/Makefile.in -samples/listctrl/Makefile -samples/mdi/Makefile.in -samples/mdi/Makefile -samples/memcheck/Makefile.in -samples/memcheck/Makefile -samples/minifram/Makefile.in -samples/minifram/Makefile -samples/minimal/Makefile.in -samples/minimal/Makefile -samples/notebook/Makefile.in -samples/notebook/Makefile -samples/png/Makefile.in -samples/png/Makefile -samples/printing/Makefile.in -samples/printing/Makefile -samples/proplist/Makefile.in -samples/proplist/Makefile -samples/resource/Makefile.in -samples/resource/Makefile -samples/sashtest/Makefile.in -samples/sashtest/Makefile -samples/splitter/Makefile.in -samples/splitter/Makefile -samples/tab/Makefile.in -samples/tab/Makefile -samples/thread/Makefile.in -samples/thread/Makefile -samples/toolbar/Makefile.in -samples/toolbar/Makefile -samples/treectrl/Makefile.in -samples/treectrl/Makefile -samples/typetest/Makefile.in -samples/typetest/Makefile -samples/validate/Makefile.in -samples/validate/Makefile -samples/wxpoem/Makefile.in -samples/wxpoem/Makefile -samples/wxsocket/Makefile.in -samples/wxsocket/Makefile -samples/scroll/Makefile.in -samples/scroll/Makefile -samples/caret/Makefile.in -samples/caret/Makefile -samples/drawing/Makefile.in -samples/drawing/Makefile -samples/richedit/Makefile.in -samples/richedit/Makefile -samples/html/Makefile.in -samples/html/Makefile -src/Makefile.in src/Makefile -utils/ogl/samples/ogledit/Makefile.in -utils/ogl/samples/ogledit/Makefile -utils/ogl/samples/studio/Makefile.in -utils/ogl/samples/studio/Makefile -utils/ogl/src/Makefile.in -utils/ogl/src/Makefile +locale/Makefile Makefile.am include/Makefile.am diff --git a/distrib/msw/motif.rsp b/distrib/msw/motif.rsp index 209f5d4566..86d7219a41 100644 --- a/distrib/msw/motif.rsp +++ b/distrib/msw/motif.rsp @@ -15,7 +15,6 @@ src/makeprog.env src/makelib.env src/Makefile -src/Makefile.in src/motif.inc src/motif/*.cpp diff --git a/distrib/msw/tmake/vc.t b/distrib/msw/tmake/vc.t index eb36fee89d..546b3298d2 100644 --- a/distrib/msw/tmake/vc.t +++ b/distrib/msw/tmake/vc.t @@ -361,10 +361,14 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm -erase $(OLEDIR)\$D\*.obj -erase $(OLEDIR)\$D\*.sbr -erase $(OLEDIR)\$D\*.pdb + -erase $(HTMLDIR)\$D\*.obj + -erase $(HTMLDIR)\$D\*.sbr + -erase $(HTMLDIR)\$D\*.pdb -rmdir $(D) -rmdir ole\$(D) -rmdir ..\generic\$(D) -rmdir ..\common\$(D) + -rmdir ..\html\$(D) cleanall: clean diff --git a/distrib/msw/user.rsp b/distrib/msw/user.rsp index f9908ffa90..0c604ff1f7 100644 --- a/distrib/msw/user.rsp +++ b/distrib/msw/user.rsp @@ -3,25 +3,15 @@ user/Makefile user/wxConvert/*.cpp user/wxConvert/*.h user/wxConvert/Makefile -user/wxConvert/Makefile.in user/wxFile/*.cpp user/wxFile/*.h user/wxFile/Makefile -user/wxFile/Makefile.in user/wxFile/*.xpm user/wxTest/*.cpp user/wxTest/*.h user/wxTest/Makefile -user/wxTest/Makefile.in user/wxTest/*.xpm user/wxTest/*.png -user/wxLayout/*.cpp -user/wxLayout/*.h -user/wxLayout/Makefile -user/wxLayout/Makefile.in -user/wxLayout/*.xpm -user/wxLayout/*.png - diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat index ae92d29bac..501e56dd14 100755 --- a/distrib/msw/zipdist.bat +++ b/distrib/msw/zipdist.bat @@ -20,10 +20,14 @@ cd %src echo Zipping... zip32 -@ %dest\wx200gen.zip < %src\distrib\msw\generic.rsp +zip32 -@ -u %dest\wx200gen.zip < %src\distrib\msw\makefile.rsp zip32 -@ %dest\wx200msw.zip < %src\distrib\msw\msw.rsp +zip32 -@ -u %dest\wx200msw.zip < %src\distrib\msw\makefile.rsp zip32 -@ %dest\wx200gtk.zip < %src\distrib\msw\gtk.rsp +zip32 -@ -u %dest\wx200gtk.zip < %src\distrib\msw\makefile.rsp zip32 -@ %dest\wx200stubs.zip < %src\distrib\msw\stubs.rsp zip32 -@ %dest\wx200mot.zip < %src\distrib\msw\motif.rsp +zip32 -@ -u %dest\wx200mot.zip < %src\distrib\msw\makefile.rsp zip32 -@ %dest\wx200user.zip < %src\distrib\msw\user.rsp zip32 -@ %dest\wx200doc.zip < %src\distrib\msw\docsrc.rsp diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 42ceee2723..114267dcae 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -47,6 +47,7 @@ bool MyApp::OnInit(void) BEGIN_EVENT_TABLE(MyDialog, wxDialog) EVT_BUTTON(wxID_OK, MyDialog::OnOK) EVT_BUTTON(wxID_EXIT, MyDialog::OnExit) + EVT_CLOSE(MyDialog::OnCloseWindow) END_EVENT_TABLE() diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index 02aa755a11..ad5badcb82 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -306,7 +306,7 @@ HTMLOBJS = \ # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. # Add $(HTMLOBJS) if wanting wxHTML classes -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) # Normal, static library all: dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm jpeg $(LIBTARGET) @@ -512,10 +512,14 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm -erase $(OLEDIR)\$D\*.obj -erase $(OLEDIR)\$D\*.sbr -erase $(OLEDIR)\$D\*.pdb + -erase $(HTMLDIR)\$D\*.obj + -erase $(HTMLDIR)\$D\*.sbr + -erase $(HTMLDIR)\$D\*.pdb -rmdir $(D) -rmdir ole\$(D) -rmdir ..\generic\$(D) -rmdir ..\common\$(D) + -rmdir ..\html\$(D) cleanall: clean diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 8c8fbe0b6f..e9ba5a03c6 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -166,10 +166,16 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) //, int x, int y); win = new wxFrame(NULL, -1, "", wxPoint(x,y), wxSize(-1,-1), 0); win->PushEventHandler(this); + // Remove from record of top-level windows, or will confuse wxWindows + // if we try to exit right now. + wxTopLevelWindows.DeleteObject(win); + rval = win->PopupMenu(menu, 0, 0); win->PopEventHandler(FALSE); win->Destroy(); + delete win; + return rval; } diff --git a/src/msw/window.cpp b/src/msw/window.cpp index b9dfdd75e1..956c30b92b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -822,7 +822,7 @@ void wxWindow::UnsubclassWin() { m_hWnd = 0; - wxCHECK_RET( ::IsWindow(hwnd), _T("invalid HWND in SubclassWin") ); + wxCHECK_RET( ::IsWindow(hwnd), _T("invalid HWND in UnsubclassWin") ); FARPROC farProc = (FARPROC) GetWindowLong(hwnd, GWL_WNDPROC); if ( (m_oldWndProc != 0) && (farProc != (FARPROC) m_oldWndProc) ) -- 2.45.2