From af97bc4d967deacaf299758b3f0b33dab1fb58f0 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sat, 14 Feb 2009 00:18:28 +0000 Subject: [PATCH] use correct method of accessing top-level window for transientization --- src/widgets/desktop-widget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 0751e5783..324e5b008 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -1069,9 +1069,10 @@ SPDesktopWidget::setWindowSize (gint w, gint h) void SPDesktopWidget::setWindowTransient (void *p, int transient_policy) { - GtkWindow *w =GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(this))); - if (w) + Gtk::Window *window = (Gtk::Window*)gtk_object_get_data (GTK_OBJECT(this), "window"); + if (window) { + GtkWindow *w = (GtkWindow *) window->gobj(); gtk_window_set_transient_for (GTK_WINDOW(p), w); /* @@ -1082,7 +1083,6 @@ SPDesktopWidget::setWindowTransient (void *p, int transient_policy) * (so that its transients also could raise) */ if (transient_policy == 2) - // without this, a transient window not always emerges on top gtk_window_present (w); } -- 2.30.2