]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/minifram.cpp
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / src / gtk / minifram.cpp
index 013d3af5c0665c92ba9baeeb84e0d0eeb23871aa..6d07a6d893036b5b60c7ad5bd12d27fd5aa36dc8 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/minifram.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -104,14 +103,12 @@ static gboolean expose_event(GtkWidget* widget, GdkEventExpose* gdk_event, wxMin
 
     int style = win->GetWindowStyle();
 
-#ifndef __WXGTK3__
     if (style & wxRESIZE_BORDER)
     {
         dc.SetBrush( *wxGREY_BRUSH );
         dc.SetPen( *wxTRANSPARENT_PEN );
         dc.DrawRectangle( win->m_width - 14, win->m_height-14, 14, 14 );
     }
-#endif
 
     if (win->m_miniTitle && !win->GetTitle().empty())
     {
@@ -156,7 +153,6 @@ gtk_window_button_press_callback(GtkWidget* widget, GdkEventButton* gdk_event, w
     int y = (int)gdk_event->y;
     int x = (int)gdk_event->x;
 
-#ifndef __WXGTK3__
     if ((style & wxRESIZE_BORDER) &&
         (x > win->m_width-14) && (y > win->m_height-14))
     {
@@ -177,7 +173,6 @@ gtk_window_button_press_callback(GtkWidget* widget, GdkEventButton* gdk_event, w
 
         return TRUE;
     }
-#endif
 
     if (win->m_miniTitle && (style & wxCLOSE_BOX))
     {
@@ -303,7 +298,6 @@ gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event,
 
     if (!win->m_isDragging)
     {
-#ifndef __WXGTK3__
         if (win->GetWindowStyle() & wxRESIZE_BORDER)
         {
             if ((x > win->m_width-14) && (y > win->m_height-14))
@@ -312,7 +306,6 @@ gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event,
                gdk_window_set_cursor(gtk_widget_get_window(widget), NULL);
             win->GTKUpdateCursor(false);
         }
-#endif
         return TRUE;
     }
 
@@ -403,7 +396,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
     if (style & wxRESIZE_BORDER)
        m_gdkFunc = GDK_FUNC_RESIZE;
     gtk_window_set_default_size(GTK_WINDOW(m_widget), m_width, m_height);
-    m_decorSize.Set(0, 0);
+    memset(&m_decorSize, 0, sizeof(m_decorSize));
     m_deferShow = false;
 
     if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)))
@@ -441,6 +434,10 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
 void wxMiniFrame::DoGetClientSize(int* width, int* height) const
 {
     wxFrame::DoGetClientSize(width, height);
+
+    if (m_useCachedClientSize)
+        return;
+
     if (width)
     {
         *width -= 2 * m_miniEdge;