Re: Gdk problem.
- From: Michael J M Thomson <mjmt internode on net>
- To: PerBeatus <perbeatus os pl>
- Cc: gtkmm-list gnome org
- Subject: Re: Gdk problem.
- Date: Fri, 03 Nov 2006 06:23:23 +1100
Simple question. Why it compiles ok, and at run prints "segmentation
Gtk::Main main(argc, argv);
Glib::RefPtr<Gdk::Window> gdk_w = w.get_frame();
I don't think Gtk::Window::get_frame() does what you're expecting. It actually
only returns a valid Gdk::Window when GTK is providing its own window frames*,
which on most platforms (X, Windows, etc) isn't the case, given window frames
are provided by a separate window manager process or the OS, so it isn't really
useful for GTK to give programs access to them. Instead get_frame() returns a
Glib::RefPtr<Gdk::Window> containing NULL, hence your segfault.
By the way, not everybody likes red. ;) If you want to draw attention to your
window, try Gtk::Window::set_urgency_hint(). Or possibly you were just looking for:
[*] I think GTK only does this with DirectFB, which doesn't or didn't always
provide window management.
] [Thread Prev