]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/minifram.cpp
1. status bar can now be positioned on top (and anywhere, in fact)
[wxWidgets.git] / src / gtk / minifram.cpp
index bdcc5ef8a99f2e61c266e8969a07e48a72f057a2..7b0c2ad4334dafaace26fcaead1df9d11b6cdd49 100644 (file)
@@ -35,8 +35,9 @@ extern bool g_isIdle;
 // data
 //-----------------------------------------------------------------------------
 
-extern bool   g_blockEventsOnDrag;
-extern bool   g_blockEventsOnScroll;
+extern bool        g_blockEventsOnDrag;
+extern bool        g_blockEventsOnScroll;
+extern GtkWidget  *wxRootWindow;
 
 //-----------------------------------------------------------------------------
 // local functions
@@ -317,12 +318,14 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
     
     wxFrame::Create( parent, id, title, pos, size, style, name );
 
+    if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget)))
+        gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
+
     if ((style & wxSYSTEM_MENU) &&
         ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
     {
         GdkBitmap *mask = (GdkBitmap*) NULL;
-        GdkWindow *parent = (GdkWindow*) &gdk_root_parent;
-        GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, cross_xpm );
+        GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d( wxRootWindow->window, &mask, NULL, cross_xpm );
     
         GtkWidget *pw = gtk_pixmap_new( pixmap, mask );
         gdk_bitmap_unref( mask );