On 21.07.2017 01:43 Nimday Satria wrote:
> Thanks for replying.
Welcome.
> I wanted to put this window on the bottom layer, just like wbar.
> Even without border, my window manager can see this window, and that's
> why i added xlib code.
Window manager may behave differently. My current WM shows windows with
border(0) in the task bar as well.
> I will try Fl_Window::fullscreen() and maybe post a screenshot.
Here is my working demo for a real fullscreen program. In this case it
doesn't matter if the window manager would show the window because the
full screen area is occluded by the window.
// fullscreen test program
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <stdio.h>
int main(int argc, char **argv) {
int sx, sy, sw, sh;
Fl::screen_xywh(sx, sy, sw, sh, 0);
printf("screen 0 = (%d, %d, %d, %d)\n", sx, sy, sw, sh);
fflush(stdout);
// sw = 600; sh = 200; // uncomment this to test with smaller size
Fl_Window *window = new Fl_Window(sx, sy, sw, sh);
Fl_Box *box = new Fl_Box((sw-300)/2, (sh-100)/2, 300, 100,
"Hello, World!");
box->box(FL_UP_BOX);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->border(0);
window->fullscreen();
window->show(argc, argv);
return Fl::run();
}
// end of fullscreen test program
This program works as expected on Windows, no matter if I uncomment the
statements sw = 600; sh = 200; as it should (IMHO).
@Manolo: how is it intended to work? window->fullscreen() should IMHO
always make the window fullscreen, no matter what size it has
originally, right? If I uncomment the size making the window smaller
then the window doesn't fill the entire screen - its size and position
are as given (0, 0, 600, 200). This is so with my current WM (Metacity)
and with the Cygwin X server on my Windows host, no matter if I use FLTK
1.3.4 or 1.4 svn.