+
+/* deal with work list items */
+void fgPlatformInitWork(SFG_Window* window)
+{
+ /* Notify windowStatus/visibility, position and size get notified on window creation with message handlers above
+ * XXX CHECK: do the messages happen too early like on windows, so client code cannot have registered
+ * a callback yet and the message is thus never received by client?
+ * -> this is a no-op
+ */
+ return;
+}
+
+void fgPlatformPosResZordWork(SFG_Window* window, unsigned int workMask)
+{
+ if (workMask & GLUT_FULL_SCREEN_WORK)
+ fgPlatformFullScreenToggle( window );
+ if (workMask & GLUT_POSITION_WORK)
+ fgPlatformPositionWindow( window, window->State.DesiredXpos, window->State.DesiredYpos );
+ if (workMask & GLUT_SIZE_WORK)
+ fgPlatformReshapeWindow ( window, window->State.DesiredWidth, window->State.DesiredHeight );
+ if (workMask & GLUT_ZORDER_WORK)
+ {
+ if (window->State.DesiredZOrder < 0)
+ fgPlatformPushWindow( window );
+ else
+ fgPlatformPopWindow( window );
+ }
+}
+
+void fgPlatformVisibilityWork(SFG_Window* window)
+{
+ /* Visibility status of window gets updated in the window message handlers above
+ * XXX: is this really the case? check
+ */
+ SFG_Window *win = window;
+ switch (window->State.DesiredVisibility)
+ {
+ case DesireHiddenState:
+ fgPlatformHideWindow( window );
+ break;
+ case DesireIconicState:
+ /* Call on top-level window */
+ while (win->Parent)
+ win = win->Parent;
+ fgPlatformIconifyWindow( win );
+ break;
+ case DesireNormalState:
+ fgPlatformShowWindow( window );
+ break;
+ }
+}
+