Re: window handle



My apologies.  I should have included the source code.
 here it is:

#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/box.h>
#include <gdkmm.h>


using namespace Gtk;

int main( int argc, char** argv )
{

    Main kit( argc, argv );
    Window window;
    HBox box;

    window.add( box );

    GdkWindow* win;
    win = window.get_window()->gobj();

    Main::run( window );
    return 0;
}


When the following lines are commented out, I get no
segfaults:
    GdkWindow* win;
    win = window.get_window()->gobj();

any ideas?

--- Paul Rivera <paul_mrivera yahoo com> wrote:
> Thanks for the reply.  Anyway, I tried it and I'm
> getting a segmentation fault.  I did an strace and
> found this:
> 
>
access("/usr/share/themes/Default/gtk-2.0-key/gtkrc.en_US",
> F_OK) = -1 ENOENT (No such file or directory)
>
access("/usr/share/themes/Default/gtk-2.0-key/gtkrc.en",
> F_OK) = -1 ENOENT (No such file or directory)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> 
> 
> Why is it that I don't have these files?  I do have
> gtkrc though.  I tried making a soft link to gtkrc
> but
> more 'No such file or directory' errors came up
> afterwards.
> 
> 
> --- Murray Cumming <murrayc murrayc com> wrote:
> > On Wed, 2005-04-27 at 18:25 -0700, Paul Rivera
> > wrote:
> > > Guys, I would just like to follow up on my
> > question. 
> > > I'm really stumped on this one.  Any help would
> be
> > > greatly appreciated!  Thanks.
> > 
> > http://www.gtk.org/faq/#AEN540
> > 
> > Use widget->get_window()->gobj() to get the
> > GdkWindow* in gtkmm.
> > 
> > -- 
> > Murray Cumming
> > murrayc murrayc com
> > www.murrayc.com
> > www.openismus.com
> > 
> > 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]