#include "wx/gtk/win_gtk.h"
#include "wx/cursor.h"
+/*
+#include "gdk/gdkprivate.h"
+#include "gdk/gdkx.h"
+*/
+
//-----------------------------------------------------------------------------
// idle system
//-----------------------------------------------------------------------------
extern wxList wxPendingDelete;
+/*
+//-----------------------------------------------------------------------------
+// instruct X to set the WM hint for positioning
+//-----------------------------------------------------------------------------
+
+extern "C" {
+
+static void gdk_window_set_position_hint( GdkWindow *window, gint x, gint y )
+{
+ GdkWindowPrivate *priv;
+ XSizeHints size_hints;
+
+ g_return_if_fail (window != NULL);
+
+ priv = (GdkWindowPrivate*) window;
+ if (priv->destroyed) return;
+
+ size_hints.flags = PPosition;
+ size_hints.x = x;
+ size_hints.y = y;
+
+ XSetWMNormalHints (priv->xdisplay, priv->xwindow, &size_hints);
+}
+
+}
+*/
+
//-----------------------------------------------------------------------------
// "delete_event"
//-----------------------------------------------------------------------------
position in "realize" and "map" */
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
+/*
+ gdk_window_set_position_hint( widget->window, win->m_x, win->m_y );
+*/
+
/* reset the icon */
if (win->m_icon != wxNullIcon)
{
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
- wxFAIL_MSG( _T("wxDialog creation failed") );
+ wxFAIL_MSG( T("wxDialog creation failed") );
return FALSE;
}
void wxDialog::SetTitle( const wxString& title )
{
m_title = title;
- if (m_title.IsNull()) m_title = _T("");
+ if (m_title.IsNull()) m_title = T("");
gtk_window_set_title( GTK_WINDOW(m_widget), m_title.mbc_str() );
}
void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
{
- wxASSERT_MSG( (m_widget != NULL), _T("invalid dialog") );
+ wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
#if wxUSE_CONSTRAINTS
if (GetAutoLayout())
void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxASSERT_MSG( (m_widget != NULL), _T("invalid dialog") );
- wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid dialog") );
+ wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
+ wxASSERT_MSG( (m_wxwindow != NULL), T("invalid dialog") );
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
void wxDialog::Centre( int direction )
{
- wxASSERT_MSG( (m_widget != NULL), _T("invalid dialog") );
+ wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
int x = 0;
int y = 0;
{
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
GtkOnSize( m_x, m_y, m_width, m_height );
+
+ wxWindow::OnInternalIdle();
}
bool wxDialog::Show( bool show )
else
if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL;
*/
- wxFAIL_MSG( _T("wxDialog:SetModal obsolete now") );
+ wxFAIL_MSG( T("wxDialog:SetModal obsolete now") );
}
int wxDialog::ShowModal()
{
if (IsModal())
{
- wxFAIL_MSG( _T("wxDialog:ShowModal called twice") );
+ wxFAIL_MSG( T("wxDialog:ShowModal called twice") );
return GetReturnCode();
}
if (!IsModal())
{
- wxFAIL_MSG( _T("wxDialog:EndModal called twice") );
+ wxFAIL_MSG( T("wxDialog:EndModal called twice") );
return;
}