Maximized window that's not full screen



I am trying to create a window that has an absolute max size.  By
setting the max size via gtk_window_set_geometry_hints, my window's max
size is obeyed when the user drags the edge of the window to resize.
However, when the user clicks the "Maximize Window" button on the window
decoration, the window fills the screen.  I am using GTK+ 2.12.6 and
Gnome 2.20.  The best I have come up with so far is to handle the
"window-state-event" where the new state is GDK_WINDOW_STATE_MAXIMIZED
by resizing the window to the desired max.  But the second resize is
noticeable and looks a little clunky.  It appears that the
"window-state-event" is signaled after the window is resized, because
returning true from my handler doesn't prevent the resize.  Is there a
way to capture the maximize signal before any other handlers?  Any other
suggestions?

Additional note:  When using the CDE window manager, the max size is
obeyed for both edge drag resize and maximize clicks. 

Thanks,
Anthony Vallone



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