+
+ // set the decorations and functions
+ switch (_type) {
+ case Type_Normal:
+ // normal windows retain all of the possible decorations and
+ // functionality
+ _decorations = Decor_Titlebar | Decor_Handle | Decor_Border |
+ Decor_Iconify | Decor_Maximize;
+ _functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize;
+
+ case Type_Dialog:
+ // dialogs cannot be maximized
+ _decorations &= ~Decor_Maximize;
+ _functions &= ~Func_Maximize;
+ break;
+
+ case Type_Menu:
+ case Type_Toolbar:
+ case Type_Utility:
+ // these windows get less functionality
+ _decorations &= ~(Decor_Iconify | Decor_Handle);
+ _functions &= ~(Func_Iconify | Func_Resize);
+ break;
+
+ case Type_Desktop:
+ case Type_Dock:
+ case Type_Splash:
+ // none of these windows are manipulated by the window manager
+ _decorations = 0;
+ _functions = 0;
+ break;
+ }
+
+ getMwmHints(); // this fucks (in good ways) with the decors and functions