The GPE window manager doesn"t like SetSizeHints().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2003-07-31 18:27:11 +00:00
parent 9e039e3753
commit cc744424c1
2 changed files with 54 additions and 30 deletions

View File

@@ -32,6 +32,7 @@
#include "wx/dcclient.h"
#include "wx/gtk/private.h"
#include "wx/timer.h"
#include "wx/settings.h"
#include <glib.h>
#include <gdk/gdk.h>
@@ -711,18 +712,29 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
m_width = width;
m_height = height;
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
set in wxFrame::Create so it is used to check what kind of frame we
have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
importantly) m_mainWidget */
// wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
// wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
// set in wxFrame::Create so it is used to check what kind of frame we
// have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
// skip the part which handles m_frameMenuBar, m_frameToolBar and (most
// importantly) m_mainWidget
int minWidth = GetMinWidth(),
minHeight = GetMinHeight(),
maxWidth = GetMaxWidth(),
maxHeight = GetMaxHeight();
if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA)
{
// GPE's window manager doesn't like size hints
// at all, esp. when the user has to use the
// virtual keyboard.
minWidth = -1;
minHeight = -1;
maxWidth = -1;
maxHeight = -1;
}
if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;

View File

@@ -32,6 +32,7 @@
#include "wx/dcclient.h"
#include "wx/gtk/private.h"
#include "wx/timer.h"
#include "wx/settings.h"
#include <glib.h>
#include <gdk/gdk.h>
@@ -711,18 +712,29 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
m_width = width;
m_height = height;
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
set in wxFrame::Create so it is used to check what kind of frame we
have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
importantly) m_mainWidget */
// wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
// wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
// set in wxFrame::Create so it is used to check what kind of frame we
// have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
// skip the part which handles m_frameMenuBar, m_frameToolBar and (most
// importantly) m_mainWidget
int minWidth = GetMinWidth(),
minHeight = GetMinHeight(),
maxWidth = GetMaxWidth(),
maxHeight = GetMaxHeight();
if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA)
{
// GPE's window manager doesn't like size hints
// at all, esp. when the user has to use the
// virtual keyboard.
minWidth = -1;
minHeight = -1;
maxWidth = -1;
maxHeight = -1;
}
if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;