From a01864b928fdc15fb0ec3921c9d96d7e0de8b51f Mon Sep 17 00:00:00 2001 From: PaulStoffregen Date: Wed, 16 Mar 2016 01:30:33 -0700 Subject: [PATCH] Fix window resize on Mac and Windows --- Makefile | 3 ++- cp_windows.sh | 10 ++++++++++ gui.cpp | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 cp_windows.sh diff --git a/Makefile b/Makefile index cd97a38..ed3760c 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,8 @@ gui: gui.o portlist.o $(OBJS) $(CXX) -s $(CFLAGS) $(LDFLAGS) -o $@ $^ `$(WXCONFIG) --libs all,opengl` gui.exe: gui - cp gui gui.exe + cp gui $@ + -./cp_windows.sh $@ gui.app: gui Info.plist mkdir -p $@/Contents/MacOS diff --git a/cp_windows.sh b/cp_windows.sh new file mode 100755 index 0000000..480ca64 --- /dev/null +++ b/cp_windows.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +# copy a file to Windows machine for testing + +ftp xp << EOT +pass +bin +put $1 +EOT + diff --git a/gui.cpp b/gui.cpp index dda4818..7aa28cf 100644 --- a/gui.cpp +++ b/gui.cpp @@ -110,7 +110,7 @@ MyFrame::MyFrame(wxWindow *parent, wxWindowID id, const wxString &title, WX_GL_DOUBLEBUFFER, 0}; m_canvas = new MyCanvas(this, wxID_ANY, gl_attrib); - m_canvas->SetMinSize(wxSize(340,340)); + m_canvas->SetMinSize(wxSize(400,400)); middlesizer->Add(m_canvas, 1, wxEXPAND | wxALL, 10); topsizer->SetSizeHints(this); @@ -248,7 +248,7 @@ bool MyApp::OnInit() wxPoint pos(100, 100); MyFrame *frame = new MyFrame(NULL, -1, wxT("IMU Read"), pos, wxSize(1120,760), - wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER)); + wxDEFAULT_FRAME_STYLE); frame->Show( true ); return true; }