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:
@@ -32,6 +32,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
@@ -711,18 +712,29 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
|||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
|
|
||||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
// wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
// 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
|
// 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
|
// 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
|
// skip the part which handles m_frameMenuBar, m_frameToolBar and (most
|
||||||
importantly) m_mainWidget */
|
// importantly) m_mainWidget
|
||||||
|
|
||||||
int minWidth = GetMinWidth(),
|
int minWidth = GetMinWidth(),
|
||||||
minHeight = GetMinHeight(),
|
minHeight = GetMinHeight(),
|
||||||
maxWidth = GetMaxWidth(),
|
maxWidth = GetMaxWidth(),
|
||||||
maxHeight = GetMaxHeight();
|
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 ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
|
||||||
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
|
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
|
||||||
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
@@ -711,18 +712,29 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
|||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
|
|
||||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
// wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
// 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
|
// 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
|
// 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
|
// skip the part which handles m_frameMenuBar, m_frameToolBar and (most
|
||||||
importantly) m_mainWidget */
|
// importantly) m_mainWidget
|
||||||
|
|
||||||
int minWidth = GetMinWidth(),
|
int minWidth = GetMinWidth(),
|
||||||
minHeight = GetMinHeight(),
|
minHeight = GetMinHeight(),
|
||||||
maxWidth = GetMaxWidth(),
|
maxWidth = GetMaxWidth(),
|
||||||
maxHeight = GetMaxHeight();
|
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 ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
|
||||||
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
|
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
|
||||||
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
||||||
|
Reference in New Issue
Block a user