On 5 Jun 2009, at 14:44, Loic wrote: >> OK, on second thoughts, it might be better to do: >> >> XWindowAttributes xwa; >> XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &xwa); >> >> Then you can get the width and height from xwa.width and xwa.height > > It seems indeed much easyer... > but dpy is not defined in your example... > I tried Fl::dpy but doesn't seem to work better... > > How can I get the pointer to the current display?
Sorry - I cut'n'pasted that without checking it through. If you refer to Appendix F of the manual, you will see that the current display is accessed through a global called fl_display, so the code would look like: XGetWindowAttributes(fl_display, DefaultRootWindow(dpy), &xwa); or similar. I'm on a Mac just now so can't easily test that, but it should be OK, give it a whirl, see if it works. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

