>
> On 29.12.2008, at 02:54, Danny Parker wrote:
>
> > I've been looking into FLTK for a project a friend of mine and I are
> > working on and everything looks really good so far.  However, I'm
> > using using Unbuntu Hardy Heron and I have problems with the Gnome
> > panels appearing over many fullscreen applications.
> >
> > This also appears to happen with the fullscreen demo in the FLTK
> > test folder.
> >
> > Does anyone know of a way around this when coding a fullscreen app
> > in FLTK?
>
>
> The FLTK Fullscreen option is not meant to put the screen on the very
> top. For X11 (Ubuntu and other Linux/Unix OSs's), lifting the window
> on top over all other windows is a Window Manager function. You can
> send a request to the window manager to make your window the top-most,
> but it is up to the window manager to do it (or not).
>
> So, FLTK does not provide an "on top of everything" window, but you
> may be able to get one by adding a few X calls right after
> Fl_Window::show().
>
> ----
> http://robowerk.com/
>
>

I've been confused by the fullscreen() function.  What is the rationale for a 
different process for X11 than for Windows and Mac?  Here is the function:

void Fl_Window::fullscreen() {
#ifndef WIN32
  //this would clobber the fake wm, since it relies on the border flags to
  //determine its thickness
  border(0);
#endif
#if defined(__APPLE__) || defined(WIN32)
  int sx, sy, sw, sh;
  Fl::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
  // if we are on the main screen, we will leave the system menu bar 
unobstructed
  if (Fl::x()>=sx && Fl::y()>=sy && Fl::x()+Fl::w()<=sx+sw && 
Fl::y()+Fl::h()<=sy+sh) {
    sx = Fl::x(); sy = Fl::y();
    sw = Fl::w(); sh = Fl::h();
  }
  if (x()==sx) x(sx+1); // make sure that we actually execute the resize
  resize(sx, sy, sw, sh);
#else
  if (!x()) x(1); // force it to call XResizeWindow()
  resize(0,0,Fl::w(),Fl::h());
#endif
}

I find that the fullscreen behaves incorrectly relative to the GNOME taskbar 
and multiple displays, but if I just make all the different platforms use the 
same process:

void Fl_Window::fullscreen() {
#ifndef WIN32
  //this would clobber the fake wm, since it relies on the border flags to
  //determine its thickness
  border(0);
#endif
  int sx, sy, sw, sh;
  Fl::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
  // if we are on the main screen, we will leave the system menu bar 
unobstructed
  if (Fl::x()>=sx && Fl::y()>=sy && Fl::x()+Fl::w()<=sx+sw && 
Fl::y()+Fl::h()<=sy+sh) {
    sx = Fl::x(); sy = Fl::y();
    sw = Fl::w(); sh = Fl::h();
  }
  if (x()==sx) x(sx+1); // make sure that we actually execute the resize
  resize(sx, sy, sw, sh);
}

The fullscreen() function behaves as I would expect.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to