how to remove titlebar from window?



  hi!
  i use gtk-1.2.tried removing title bar from the window using this code..but when i executed my application ,i got segmentation fault..any idea whats wrong? i am not sure if this is what i exactly have to do..

GtkWidget *window;
Window xwin=None,ParentWindow=None;
char * list[1] ;
int count = 1 ;
XTextProperty text ;
list[0] = title ;

appwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize( GTK_WIDGET(appwindow ) ,  238,  290 ) ;
gtk_window_set_policy(GTK_WINDOW(appwindow), FALSE, FALSE, FALSE);
//appwindow=set_style(appwindow, bg, peachpuff, notext, nobutton);
gtk_container_add(GTK_CONTAINER(appwindow), child);

if( XStringListToTextProperty( list, count, &text ) )
{
xwin = GDK_WINDOW_XWINDOW( GTK_WIDGET( window )->window ) ;   
XSetWMName( GDK_DISPLAY( ), xwin, &text ) ;
}
> if( screen == 1 )
> ParentWindow = xwin ;
> if( screen == 2 )
> XReparentWindow( GDK_DISPLAY( ), xwin, ParentWindow, 1, 1 ) ;

any help is appreciated!





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