diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
| commit | f9039b2ae21988783feae9b362818e7923e82d14 (patch) | |
| tree | 6d6fe3679d73448758f9794e7d4d4f6b22a4adad /src/Fl_Window_fullscreen.cxx | |
| parent | 67e89232f9ba067825a158734a09e0fa21aacbe3 (diff) | |
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Window_fullscreen.cxx')
| -rw-r--r-- | src/Fl_Window_fullscreen.cxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx new file mode 100644 index 000000000..332a52cc4 --- /dev/null +++ b/src/Fl_Window_fullscreen.cxx @@ -0,0 +1,46 @@ +// Turning the border on/off by changing the motif_wm_hints property +// works on Irix 4DWM. Does not appear to work for any other window +// manager. Fullscreen still works on some window managers (fvwm is one) +// because they allow the border to be placed off-screen. + +// Unfortunatly most X window managers ignore changes to the border +// and refuse to position the border off-screen, so attempting to make +// the window full screen will lose the size of the border off the +// bottom and right. + +#include <FL/Fl.H> +#include <FL/x.H> + +void Fl_Window::border(int b) { + if (b) { + if (border()) return; + clear_flag(FL_NOBORDER); + } else { + if (!border()) return; + set_flag(FL_NOBORDER); + } +#ifdef WIN32 + // not yet implemented, but it's possible + // for full fullscreen we have to make the window topmost as well +#else + if (shown()) Fl_X::i(this)->sendxjunk(); +#endif +} + +void Fl_Window::fullscreen() { + border(0); + if (!x()) x(1); // force it to call XResizeWindow() + resize(0,0,Fl::w(),Fl::h()); +} + +void Fl_Window::fullscreen_off(int X,int Y,int W,int H) { +#ifdef WIN32 + border(1); + resize(X,Y,W,H); +#else + // this order produces less blinking on IRIX: + resize(X,Y,W,H); + border(1); +#endif +} + |
