From 16e8bf31bb4ba1f6374ea86f1ef1dcb1872fda69 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 14 Mar 2002 10:21:07 +0000 Subject: [PATCH] Removed duplicate WM line from motif/frame.cpp Added window style to minimal sample Failed attempt to get border-only toplevel window style git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/minimal/minimal.cpp | 7 ++++--- src/motif/frame.cpp | 2 -- src/x11/toplevel.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 5ba383e3c3..29c30397a5 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -61,7 +61,8 @@ class MyFrame : public wxFrame { public: // ctor(s) - MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); + MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, + long style = wxDEFAULT_FRAME_STYLE); // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); @@ -137,8 +138,8 @@ bool MyApp::OnInit() // ---------------------------------------------------------------------------- // frame constructor -MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame(NULL, -1, title, pos, size) +MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxFrame(NULL, -1, title, pos, size, style) { // set the frame icon SetIcon(wxICON(mondrian)); diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 14b660afe3..cd5b22c681 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -304,8 +304,6 @@ bool wxFrame::Create(wxWindow *parent, decor |= MWM_DECOR_TITLE; if (style & wxTHICK_FRAME) decor |= MWM_DECOR_BORDER; - if (style & wxTHICK_FRAME) - decor |= MWM_DECOR_BORDER; if (style & wxMINIMIZE_BOX) decor |= MWM_DECOR_MINIMIZE; if (style & wxMAXIMIZE_BOX) diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index 1f683ae6cd..68f9b1b4c7 100644 --- a/src/x11/toplevel.cpp +++ b/src/x11/toplevel.cpp @@ -511,7 +511,7 @@ bool wxSetWMDecorations(Window w, long style) hints.decorations |= MWM_DECOR_TITLE; } - if ((style & wxTHICK_FRAME) || (style & wxSIMPLE_BORDER) || (style & wxCAPTION)) + if ((style & wxTHICK_FRAME) || (style & wxCAPTION)) { // wxLogDebug("MWM_DECOR_BORDER"); hints.flags |= MWM_HINTS_DECORATIONS; -- 2.45.2