Re: [gtk-list] AW: Re: windows sizing



Try something similar to this:

GtkWidget open_fullscreen_window()
{
  int x, y;
  GtkWidget *w;

  gdk_window_get_size( gdk_root_parent, &x, &y );
  w = gtk_window_new( GTK_WINDOW_POPUP ); /* override-redirect window. */
  gtk_widget_set_usize( w, x, y );       /* full screen sized         */

  return w;
}


or, in Pike GTK (should be similar in c++, java etc)

class FullScreenWindow
{
  inherit GTK.Window;
  void create()
  {
    ::create( GTK.WindowPopup ); // call parent constructor
    mapping g = GTK.RootWindow()->get_geometry();
    set_usize( g->width, g->height );
  }
}

Please note that the C-version is untested code. 
The corresponding Pike GTK code works just fine, though.


-- 
Per Hedbor                                              http://per.hedbor.org/



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