Yes it seems to be the good things to do. I had to try that because my solution is not the true fix it's a workaournd i think. I will try monday.
Cheers Robert Osfield wrote: > HI Leif, > > I'm curious about you comments. Is it your belief that MotifHints > should work fine under Gnome? Is it just the internal response to the > resize that you believe is the issue? Removing the usleep() and > relying on the configure event sounds plausible solution. > > Robert. > > On 10/4/07, Leif Delgass <[EMAIL PROTECTED]> wrote: > >> On 10/4/07, Cedric Pinson <[EMAIL PROTECTED]> wrote: >> >>> Hi >>> It's a patch to have fullscreen toggle working on gnome, it concerns >>> only X11 implementation. >>> the problem: >>> when i run osgviewer i can't go in windowed mode. When i want to go in >>> windowed mode the screen flash i see the viewport (only the gl viewport >>> not the window) to have the size of the window size asked by osg and the >>> frame after. It fails and rest in fullscreen. After some test i saw that >>> the problem was the MOTIF decoration setup. Metacity seems to not handle >>> correctly the window if there is no decoration. >>> >>> answer: >>> The idea is to not use the MOTIF decoration setup, and to send an ICCM >>> fullscreen event when it's appropriate. It means if the window has the >>> size of the screen and the decoration wanted is false then we send the >>> fullscreen event, else we send the event to disable the fullscreen mode. >>> The problem of this method is you can't have a window in a windowed >>> mode without decoration. It's not a perfect solution. >>> >>> I tested it with compositviewer and osgviewer and it works great. I know >>> that most of WM now use ICCM features so i hope it will not be a problem >>> on other WM. Some feedback will be appreciate on others windows manager. >>> >>> Thanks to [EMAIL PROTECTED] for the piece of code. >>> >>> >>> Cheers >>> >>> >>> -- >>> +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] >>> http://www.plopbyte.net >>> >> Hi Cedric, >> >> I have some comments on the changes: I don't believe the motif hints >> are the problem per se, but your original comment about the >> isFullScreen test in ViewerEventHandlers is correct. The motif >> decoration hints actually do work for me with GNOME/metacity, and can >> be used to get a non-fullscreen, undecorated window. The problem is >> that when you remove decorations and attempt to resize the window to >> fullscreen without using the fullscreen hint, metacity makes the >> window smaller than screen size to account for the panels. The >> toggleFullscreen in ViewerEventHandlers then fails to recognize that >> the window is "fullscreen" since the window manager modified the >> requested window size, so toggleFullscreen tries to make the window >> fullscreen on every toggle. >> >> The behavior you saw with the GL viewport not matching the window size >> is probably a consequence of the way resizing is implemented in >> GraphicsWindowX11. The setWindowRectangleImplementation assumes it >> will get the requested size and adds a usleep to wait for the window >> manager. I think this is a hack around the asynchronous nature of >> Xlib. Really, the resize should not be assumed to work and should not >> be acted on (resizing the GL context) until a ConfigureNotify event is >> received with the actual new size of the window. The window manager >> can refuse the resize altogether or it can resize to a different size >> than was requested. >> >> -- >> Leif Delgass >> [EMAIL PROTECTED] >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >> >> > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
