FInding out whether a window will fit onscreen



When creating a window, the application I'm working on won't know whether the contents will fit onscreen or 
not.  I won't go into details, but suffice it to say that the contents can vary greatly in the required 
size.  The window manager deals with that just fine up to a point.  But if a poorly behaved user packs too 
much content into the window, the window manager will happily create a window that runs off the side and/or 
bottom of the screen.  What I would like to do is create an outer viewport, but only do that if necessary, so 
as not to clutter up the window with useless scroll bars in the 99% of the time case where the content fits 
just fine.

I'm able to get the screen geometry using gdk_screen_get_monitor_at_window and 
gdk_screen_get_monitor_geometry.  I'm also able to deduce the size of the window frame.  What I need to do 
now is find out where the user has placed the panels.  Is there a way to do this?

Thank you.







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